1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 20:00:19 +02:00
Commit graph

31 commits

Author SHA1 Message Date
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
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
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
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
a4003003e2 Compile string constants 2015-06-18 04:14:42 +01:00
Ian Price
d57dc85fa8 Replace values object with values passed as continuation arguments 2015-06-18 04:14:41 +01:00
Ian Price
ce1cc2706c Temp commit 2015-06-18 04:14:41 +01:00