Ian Price
bfaf07091a
Implement hashtable built-ins
...
* module/language/js-il/runtime.js
(scheme.HashTable): New Constructor.
(make-hash-table, hash-clear!, hashq-remove!, hashq-ref, hashq-set!,
hash-for-each): Implement built-ins.
2017-08-03 00:02:45 +01:00
Ian Price
30cc1e0751
scm_struct_init skips hidden fields.
...
* module/language/js-il/runtime.js (scm_struct_init): skip 'h' fields.
2017-08-02 22:55:00 +01:00
Ian Price
30dc57cb04
define! primitive only takes one argument.
...
* module/language/js-il/runtime.js (define!): Ignore argument.
2017-08-02 22:46:13 +01:00
Ian Price
ebe9d00153
Implement struct built-ins.
...
* module/language/js-il/runtime.js
(struct?): New primitive.
(<applicable-struct-vtable>, record-type-vtable,
set-struct-vtable-name!, make-struct): Implement built-ins.
2017-08-02 22:44:27 +01:00
Ian Price
2273eb4d06
Implement built-in string procedures.
...
* module/language/js-il/runtime.js
(string-append): Extend to more than 2 arguments.
(string-join): New procedure.
2017-08-02 21:17:22 +01:00
Ian Price
2adebea5d0
Implement built-in symbol procedures.
...
* module/language/js-il/runtime.js
(symbol->string, gensym): New procedures.
2017-08-02 21:14:57 +01:00
Ian Price
5d49a5be18
Implement built-in syntax procedures.
...
* module/language/js-il/runtime.js
(syntax?, make-syntax, syntax-expression, syntax-wrap,
syntax-module): New procedures.
2017-08-02 21:12:47 +01:00
Ian Price
2a3c43a5a9
Implement builtin list procedures.
...
* module/language/js-il/runtime.js
(make-list, length, list?, reverse, append, memq, member, delete!):
New procedures
2017-08-02 21:11:02 +01:00
Ian Price
0b9b08a28d
Implement immediate version of vector primitives.
...
* module/language/js-il/runtime.js
(make-vector/immediate, vector-set!/immediate,
vector-ref/immediate): New Primitives.
2017-08-02 21:03:11 +01:00
Ian Price
cf1ddd466b
Implement structs in runtime.js
...
* module/language/js-il/runtime.js:
(scheme.Struct): new type.
(allocate-struct/immediate, struct-vtable, struct-set!, struct-ref,
struct-set!/immediate, struct-ref/immediate): Implement primitives.
(def_guile_val): New helper.
(string=?, string-append): Implement string functions.
(standard-vtable-fields, <standard-vtable>, vtable-index-layout,
vtable-index-printer, vtable-offset-user, make-struct/no-tail,
make-vtable, struct-vtable?): Implement struct functions.
2017-06-28 17:15:57 +01:00
Ian Price
479294fc05
Implement Winding & Unwinding
...
* module/language/js-il/runtime.js
(wind, unwind): Implement.
(callcc): Wind when invoking continuation.
2017-06-28 15:03:03 +01:00
Ian Price
ff7fff920d
Add macro type in runtime.js
...
* module/language/js-il/runtime.js
(scheme.Macro): Add type.
(make-syntax-transformer): Add guile procedure.
2017-06-28 10:38:00 +01:00
Ian Price
b3c0fcdb25
Implement cached-module-box
...
* module/language/js-il/runtime.js (scheme): Add module_cache field.
(scheme.primitives) Add cached-module-box primitive.
(def_guile0) Convenience for adding to (guile) module cache.
2017-06-22 16:59:02 +01:00
Ian Price
2204fb64f6
Add more variables to no-values-primitives
...
* module/language/js-il/inlining.scm (no-values-primitives):
Add primitives
2017-06-20 23:12:09 +01:00
Ian Price
536d94feb3
Compile Syntax Objects to Javascript
...
* module/language/js-il/compile-javascript.scm (compile-const):
Handle the new syntax object struct.
* module/language/js-il/runtime.js(scheme.Syntax): Add Syntax Object type
2017-06-20 22:50:06 +01:00
Ian Price
936050c657
Add some primitives to runtime.js
...
* module/language/js-il/runtime.js(add/immediate, sub/immediate,
load-u64, u64-=-scm, handle-interrupts): Add primitives.
2017-06-16 21:48:27 +01:00
Ian Price
e771241020
JS-IL inliner has different count-calls for different clauses
...
* module/language/js-il/inlining.scm(inline-single-calls): Factor into
another function inline-clause, so that count-calls is only called on
the clause.
2017-06-16 17:42:49 +01:00
Ian Price
723fc850f6
Add #:js-inline? and #:js-flatten? debugging options
...
* module/language/js-il/compile-javascript.scm (compile-javascript):
Check for #:js-inline? and #:js-flatten?, and turn off
inline-single-calls and flatten-blocks respectively.
2017-06-15 22:34:39 +01:00
Ian Price
602bfb559d
Update primitives in no-values-primitives
...
* module/language/js-il/inlining.scm (no-values-primitives): Update.
2017-06-15 20:25:24 +01:00
Ian Price
89029a54f4
Explicitly test for undefined arguments to handle false values like 0
2015-06-24 19:57:28 +01:00
Ian Price
88c052214f
Handle more identifier characters
2015-06-23 15:46:26 +01:00
Ian Price
a680a4cb9d
Change local type representation and remove var type
2015-06-22 16:18:18 +01:00
Ian Price
e9f37e6a31
Change function type representation
2015-06-22 16:18:12 +01:00
Ian Price
a7b2dfa581
Change program type representation
2015-06-22 16:08:20 +01:00
Ian Price
f0537e39ee
Rewrite js-il inliner
2015-06-22 16:08:20 +01:00
Ian Price
2e10f55426
Different types for Continuation and Variable identifiers
2015-06-22 16:08:02 +01:00
Ian Price
78cacbe450
Implement fluid primitives
2015-06-18 04:14:44 +01:00
Ian Price
46597b49dc
Use scheme.frame.Prompt objects for prompts on dynstack
2015-06-18 04:14:44 +01:00
Ian Price
6f77715457
Implement apply correctly
2015-06-18 04:14:43 +01:00
Ian Price
b939d51f8a
values takes multiple arguments
2015-06-18 04:14:43 +01:00
Ian Price
ee42731b57
abort-to-prompt takes multiple arguments
2015-06-18 04:14:43 +01:00
Ian Price
cf905a7004
Implement call-with-values
2015-06-18 04:14:43 +01:00
Ian Price
56e6c33264
Primitives create multiple argument continuations.
2015-06-18 04:14:43 +01:00
Ian Price
5827ad4f03
Compile cps $prompt form to javascript
2015-06-18 04:14:43 +01:00
Ian Price
48e84c5a2c
Add more Scheme Primitives to runtime.js
2015-06-18 04:14:43 +01:00
Ian Price
4622269e68
Primitives should return Scheme Booleans
2015-06-18 04:14:43 +01:00
Ian Price
e84f839463
Implement keyword argument parsing
2015-06-18 04:14:43 +01:00
Ian Price
46905ec322
Simplify output Javascript
2015-06-18 04:14:43 +01:00
Ian Price
e9d0f97410
Add more types of constants
2015-06-18 04:14:43 +01:00
Ian Price
941f8fac01
Implement Optional arguments
2015-06-18 04:14:43 +01:00
Ian Price
f83c651f46
Remove superfluous space
2015-06-18 04:14:42 +01:00
Ian Price
44e04eae0a
Handle case-lambda via a jump table
2015-06-18 04:14:42 +01:00
Ian Price
41023d5b4c
Mangle js identifiers
2015-06-18 04:14:42 +01:00
Ian Price
a4003003e2
Compile string constants
2015-06-18 04:14:42 +01:00
Ian Price
86fabef4ca
Compile rest args
2015-06-18 04:14:42 +01:00
Ian Price
f8618a522f
conditional->branch
2015-06-18 04:14:42 +01:00
Ian Price
3b32d180b1
Simple inlining of immediate calls
2015-06-18 04:14:42 +01:00
Ian Price
d1a663baec
Get rid of comments and dead branches
2015-06-18 04:14:42 +01:00
Ian Price
54ce470cf8
separate js-il functions into actual functions and those for continuations
2015-06-18 04:14:42 +01:00
Ian Price
b70b39e478
Remove jscall type
2015-06-18 04:14:41 +01:00