Commits on Source 51

  • Ian Price's avatar
    Fix build of (language cps compile-js) · 23f829b1
    Ian Price authored
    * module/language/cps/compile-js.scm (compile-js): Use lower-cps
      from (language cps compile-bytecode) rather than optimize, which is no
      longer there.
    23f829b1
  • Ian Price's avatar
    compile-js uses the new cps representation · 0e4fb092
    Ian Price authored
    * module/language/cps/compile-js.scm: Rewrite to use cps
    0e4fb092
  • Ian Price's avatar
    Handle multiple conts in a function body · 8777c20e
    Ian Price authored
    * module/language/cps/compile-js.scm (compile-clause, compile-clauses):
      Extract all conts in the function body, and bind in clauses.
      (extract-and-compile-conts): New Procedure
    8777c20e
  • Ian Price's avatar
    Update primitives in no-values-primitives · 602bfb55
    Ian Price authored
    * module/language/js-il/inlining.scm (no-values-primitives): Update.
    602bfb55
  • Ian Price's avatar
    Add #:js-inline? and #:js-flatten? debugging options · 723fc850
    Ian Price authored
    * 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.
    723fc850
  • Ian Price's avatar
    JS-IL inliner has different count-calls for different clauses · e7712410
    Ian Price authored
    * 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.
    e7712410
  • Ian Price's avatar
    Add some primitives to runtime.js · 936050c6
    Ian Price authored
    * module/language/js-il/runtime.js(add/immediate, sub/immediate,
      load-u64, u64-=-scm, handle-interrupts): Add primitives.
    936050c6
  • Ian Price's avatar
    Rebuild nested scopes for js continuations · c2589b5c
    Ian Price authored
    * module/language/cps/compile-js.scm (compile-cont, compile-clause):
      Rebuild nested scopes for $kargs, using dominator information.
      (compile-fun, compile-clauses): Pass down dominator information.
    c2589b5c
  • Ian Price's avatar
    Compile Syntax Objects to Javascript · 536d94fe
    Ian Price authored
    * 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
    536d94fe
  • Ian Price's avatar
    Add more variables to no-values-primitives · 2204fb64
    Ian Price authored
    * module/language/js-il/inlining.scm (no-values-primitives):
      Add primitives
    2204fb64
  • Ian Price's avatar
    Implement cached-module-box · b3c0fcdb
    Ian Price authored
    * 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.
    b3c0fcdb
  • Ian Price's avatar
    Add macro type in runtime.js · ff7fff92
    Ian Price authored
    * module/language/js-il/runtime.js
      (scheme.Macro): Add type.
      (make-syntax-transformer): Add guile procedure.
    ff7fff92
  • Ian Price's avatar
    Implement Winding & Unwinding · 479294fc
    Ian Price authored
    * module/language/js-il/runtime.js
      (wind, unwind): Implement.
      (callcc): Wind when invoking continuation.
    479294fc
  • Ian Price's avatar
    Implement structs in runtime.js · cf1ddd46
    Ian Price authored
    * 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.
    cf1ddd46
  • Ian Price's avatar
    Implement immediate version of vector primitives. · 0b9b08a2
    Ian Price authored
    * module/language/js-il/runtime.js
      (make-vector/immediate, vector-set!/immediate,
      vector-ref/immediate): New Primitives.
    0b9b08a2
  • Ian Price's avatar
    Implement builtin list procedures. · 2a3c43a5
    Ian Price authored
    * module/language/js-il/runtime.js
      (make-list, length, list?, reverse, append, memq, member, delete!):
      New procedures
    2a3c43a5
  • Ian Price's avatar
    Implement built-in syntax procedures. · 5d49a5be
    Ian Price authored
    * module/language/js-il/runtime.js
      (syntax?, make-syntax, syntax-expression, syntax-wrap,
      syntax-module): New procedures.
    5d49a5be
  • Ian Price's avatar
    Implement built-in symbol procedures. · 2adebea5
    Ian Price authored
    * module/language/js-il/runtime.js
      (symbol->string, gensym): New procedures.
    2adebea5
  • Ian Price's avatar
    Implement built-in string procedures. · 2273eb4d
    Ian Price authored
    * module/language/js-il/runtime.js
      (string-append): Extend to more than 2 arguments.
      (string-join): New procedure.
    2273eb4d
  • Ian Price's avatar
    Implement struct built-ins. · ebe9d001
    Ian Price authored
    * module/language/js-il/runtime.js
      (struct?): New primitive.
      (<applicable-struct-vtable>, record-type-vtable,
      set-struct-vtable-name!, make-struct): Implement built-ins.
    ebe9d001
  • Ian Price's avatar
    define! primitive only takes one argument. · 30dc57cb
    Ian Price authored
    * module/language/js-il/runtime.js (define!): Ignore argument.
    30dc57cb
  • Ian Price's avatar
    scm_struct_init skips hidden fields. · 30cc1e07
    Ian Price authored
    * module/language/js-il/runtime.js (scm_struct_init): skip 'h' fields.
    30cc1e07
  • Ian Price's avatar
    Implement hashtable built-ins · bfaf0709
    Ian Price authored
    * 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.
    bfaf0709
  • Ian Price's avatar
    Implement procedure built-ins. · 3d29f287
    Ian Price authored
    * module/language/js-il/runtime.js
      (procedure?, set-procedure-property!, make-procedure-with-setter): Implement.
    3d29f287
  • Ian Price's avatar
    Implement module built-ins. · 3c62ab81
    Ian Price authored
    * module/language/js-il/runtime.js
      (variable?): New Primitive.
      (primitive-load-path, module-local-variable, module-variable,
      %get-pre-modules-obarray, set-current-module): Implement built-ins.
    3c62ab81
  • Ian Price's avatar
    Implement misc built-ins · 46fa3b2f
    Ian Price authored
    * module/language/js-il/runtime.js
      (scm->u64): New primitive
      (integer?, char=?, make-fluid, read-hash-extend, make-hook,
      simple-format, scm-error): Implement built-ins.
      (syntax-session-id, macroexpand, %exception-handler,
      print-exception, *features*, %load-hook, current-reader): Stubbed
      variables.
    46fa3b2f
  • Ian Price's avatar
    Make child structs applicable. · 70c25b12
    Ian Price authored
    * module/language/js-il/runtime.js (scheme.Struct): When certain flags
      are set, child structs should be marked as applicable.
    70c25b12
  • Ian Price's avatar
    struct-set! primitive returns no values · 2da7a82d
    Ian Price authored
    * module/language/js-il/runtime.js (struct-set!): Don't return a value.
    2da7a82d
  • Ian Price's avatar
    Unwind prompt frames · 7438a192
    Ian Price authored
    * module/language/js-il/runtime.js(unwind): Unwind prompts.
    7438a192
  • Ian Price's avatar
    Add `guild jslink' to bundle JS programs · 56439a88
    Ian Price authored
    * module/Makefile.am (SOURCES): Install runtime.js and jslink.scm
    * module/language/js-il/compile-javascript.scm (compile-exp):
      Compilation units take a continuation to facilitate linking.
    * module/scripts/jslink.scm: New script.
    56439a88
  • Ian Price's avatar
    modules should be passed current continuation · 024bd93b
    Ian Price authored
    * module/language/js-il/runtime.js (primitive-load-path): modules
      should be passed the current continuation.
    024bd93b
  • Ian Price's avatar
    Implement basic `equal?' implementation · 3f9bc2db
    Ian Price authored
    * module/language/js-il/runtime.js (equal?): Remove primitive.
      Implement as builtin procedure. This version Only handles pairs.
    3f9bc2db
  • Ian Price's avatar
    Implement unboxed integer primitives. · 166def2d
    Ian Price authored
    * module/language/js-il/runtime.js (u64-=, u64->scm): New primitives.
    166def2d
  • Ian Price's avatar
    Reimplement JS module system primitives. · e57f9bc0
    Ian Price authored
    * module/language/js-il/runtime.js
      (scm_hash, scheme.HashTable): moved for bootstrapping purposes.
    
      (define!, cached-toplevel-box, cached-module-box, current-module,
      resolve): Reimplement primitives.
    
      (define!, module-local-variable, module-variable,
      %get-pre-modules-obarray, set-current-module): Reimplement builtin
      procedures.
    
      (make-undefined-variable): New builtin procedure.
    
      (scm_pre_modules_obarray, the_root_module, scm_public_lookup,
      scm_public_variable, scm_private_lookup, scm_current_module,
      scm_lookup, scm_module_ensure_local_variable, scm_module_variable,
      scm_module_define, module_system_is_booted,
      module_make_local_var_x_var, the_module, k_ensure,
      resolve_module_var, scm_post_boot_init_modules): New helper
      variables and procedures, designed to resemble C versions.
    
      (scheme.call): New helper procedure
    
      (def_guile0, def_guile_val): Reimplement helper procedure.
    e57f9bc0
  • Ian Price's avatar
    scheme.HashTable uses ES6 Map objects · 17e48e86
    Ian Price authored
    * module/language/js-il/runtime.js:
      (scheme.HashTable): Change object interface.
      (cached-module-box): Update primitive.
      (scm_module_ensure_local_variable, def_guile_val): Update helpers
      (scm_hash): Remove helper.
      (make-weak-key-hash-table, hash-clear!, hashq-remove! hashq-ref,
      hashq-set!, hash-for-each): Update builtins.
      (make-weak-value-hash-table, hash-map->list): New builtins.
    17e48e86
  • Ian Price's avatar
    Separate public / private module lookups · d3dea512
    Ian Price authored
    * module/language/js-il/runtime.js:
      (scm_public_variable, scm_module_public_interface,
      module_public_interface_var, scm_post_boot_init_modules):
      Implement Public Variable Lookup
      (scm_private_lookup, scm_private_variable): Implement Private Lookup
    d3dea512
  • Ian Price's avatar
    Search for variables in imports. · 84aa3697
    Ian Price authored
    * module/language/js-il/runtime.js:
      (scm_module_variable): Look in imports if not in obarray.
      (module_imported_variable): New procedure.
      (scm_module_index_obarray, scm_module_index_uses,
      scm_module_index_import_obarray): New variables.
    84aa3697
  • Ian Price's avatar
    Implement Hook Builtins · 7ee8973d
    Ian Price authored
    * module/language/js-il/runtime.js:
      (scheme.Hook): new constructor
      (make-hook, run-hook): Implement builtins.
    7ee8973d
  • Ian Price's avatar
    Implement list builtins · 8321baee
    Ian Price authored
    * module/language/js-il/runtime.js
      (cons, memq, member, delete!): Implement builtins
    8321baee
  • Ian Price's avatar
    *features* is an empty list · fd2445fc
    Ian Price authored
    * module/language/js-il/runtime.js(*features*): Stop stubbing
    fd2445fc
  • Ian Price's avatar
    Argument to make-fluid is optional · 7e5d9d94
    Ian Price authored
    * module/language/js-il/runtime.js(make-fluid): Supply default argument
    7e5d9d94
  • Ian Price's avatar
    pop-fluid uses field of frame not fluid · b8479794
    Ian Price authored
    * module/language/js-il/runtime.js(pop-fluid): Fix primitive.
    b8479794
  • Ian Price's avatar
    Implement variable-bound? builtin · c5fa12f3
    Ian Price authored
    * module/language/js-il/runtime.js(variable-bound?): Implement builtin
    c5fa12f3
  • Ian Price's avatar
    Add assignment js-type to (language javascript) · d4ef33f6
    Ian Price authored
    * module/language/javascript.scm
      (assign): new js-type
      (print-exp, unparse-js): Handle case.
    * module/language/javascript/simplify.scm (flatten-blocks):  Handle case.
    d4ef33f6
  • Ian Price's avatar
    Handle more JavaScript binary operators · 4ef95dd7
    Ian Price authored
    * module/language/javascript.scm (print-binop): Handle `begin' & `instanceof'
    4ef95dd7
  • Ian Price's avatar
    Keywords cannot be both keyword and optional · 062e413c
    Ian Price authored
    * module/language/js-il/compile-javascript.scm
      (compile-jump-table, bind-opt-kw-args): Keywords should not be
      parsed as optional arguments when both are present.
    062e413c
  • Ian Price's avatar
    Create stub module forms for dependecies · 11378b73
    Ian Price authored
    * module/scripts/jslink.scm: Module files need a module form, or
      functions like resolve-module won't work correctly.
    11378b73
  • Ian Price's avatar
    read argument to --depends switch · 37369c0c
    Ian Price authored
    * module/scripts/jslink.scm: Need to use `read' on --depends switch to
      pass a pair.
    37369c0c
  • Ian Price's avatar
    extra-dependencies go before boot-dependencies · c7554f27
    Ian Price authored
    * module/scripts/jslink.scm (link-file): psyntax needs to come last in
      the list of dependencies, so need to append extra-dependencies
      before boot-dependencies
    c7554f27
  • Ian Price's avatar
    Mention all arguments to guild jslink in --help · 6c5c5d06
    Ian Price authored
    * module/scripts/jslink.scm (show-help): Add missing switches.
    6c5c5d06
  • Ian Price's avatar
    Update Copyright Headers · 05c57a6a
    Ian Price authored
    * module/Makefile.am:
    * module/language/cps/compile-js.scm:
    * module/language/cps/spec.scm:
    * module/language/javascript.scm:
    * module/language/javascript/spec.scm:
    * module/language/js-il.scm:
    * module/language/js-il/compile-javascript.scm:
    * module/language/js-il/inlining.scm:
    * module/language/js-il/runtime.js: Update copyright headers
    05c57a6a
Loading
Loading