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

1328 commits

Author SHA1 Message Date
Robin Templeton
e3d13813aa use standard evaluator
(Best-ability ChangeLog annotation added by Christopher Allan Webber.)

* module/language/elisp/compile-tree-il.scm: Remove import of
  "(language tree-il eval)".
  (defmacro): Use standard "eval".
* module/language/elisp/runtime.scm: Remove import of "(language tree-il eval)".
2016-03-25 12:00:14 -07:00
Robin Templeton
03dfb00880 guile-backtrace function
* module/language/elisp/boot.el (guile-backtrace): New function
  extracted from `backtrace'.
  (backtrace): Use it.
2016-03-25 12:00:13 -07:00
Robin Templeton
02bb985c98 use guile eval for elisp tree-il
(Best-ability ChangeLog annotation added by Christopher Allan Webber.)

* module/language/elisp/boot.el (eval): Update with simplified definition.
* module/language/elisp/compile-tree-il.scm: Import "(language tree-il eval)".
  (eval-when-compile): Use eval-elisp.
  (defmacro): Use eval-tree-il.
* module/language/elisp/runtime.scm: Import "(language tree-il eval)".
  (eval-elisp): Use "eval" to evaluate compiled form within current-module.
2016-03-25 12:00:13 -07:00
Robin Templeton
7bfd2ba132 deprecated eval-when situations
(Best-ability ChangeLog annotation added by Christopher Allan Webber.)

* module/language/elisp/compile-tree-il.scm (eval-when): Update.
2016-03-25 12:00:13 -07:00
Robin Templeton
4455381dc7 execute top level require forms
(Best-ability ChangeLog annotation added by Christopher Allan Webber.)

* module/language/elisp/boot.el (require): New compiler macro.
2016-03-25 12:00:13 -07:00
Robin Templeton
b5701278c9 top level fixes
(Best-ability ChangeLog annotation added by Christopher Allan Webber.)

* module/language/elisp/compile-tree-il.scm (compile-pair): Use
  compile-expr-1 instead of compile-expr.
2016-03-25 12:00:13 -07:00
Robin Templeton
93b8b53c65 only evaluate top-level macro definitions
(Best-ability ChangeLog annotation added by Christopher Allan Webber.)

* module/language/elisp/compile-tree-il.scm (defmacro): Check to see
  whether toplevel? is true before compiling a macro.
2016-03-25 12:00:13 -07:00
Robin Templeton
4c6ef2b4cb degenerate let forms
(Best-ability ChangeLog annotation added by Christopher Allan Webber.)

* module/language/elisp/compile-tree-il.scm (let): Conditionally invoke
  make-body within make-dynlet or just on its own depending on whether
  or not dynamic? is null?.
2016-03-25 12:00:13 -07:00
Robin Templeton
d9284d3bcd eval-when
(Best-ability ChangeLog annotation added by Christopher Allan Webber.)

* module/language/elisp/compile-tree-il.scm (progn): Use compile-expr-1
  instead of compile-expr.
  (toplevel?, compile-time-too?): New fluids.
  (eval-when): New special form.
  (compile-expr, compile-expr-1): compile-expr is renamed to
  compile-expr-1, and compile-expr  is now a procedure which, if
  fulid-ref of toplevel? is true, will call compile-expr-1 with
  toplevel? fulid bound to #f.  Otherwise, continue with compile-expr-1.
  (compile-tree-il): Set toplevel? and compile-time-too? fluids to #t
  during evaluation.
2016-03-25 12:00:13 -07:00
Robin Templeton
3587fb1a9e fset macro
(Best-ability ChangeLog annotation added by Christopher Allan Webber.)

* module/language/elisp/boot.el (fset): Update to handle macros.
2016-03-25 12:00:12 -07:00
Robin Templeton
9f316dd753 use defsubst
(Best-ability ChangeLog annotation added by Christopher Allan Webber.)

* module/language/elisp/boot.el (null, consp, listp, car, cdr): Update
  to use defsubst.
  (atom): New variable, using defsubst.
2016-03-25 12:00:12 -07:00
Robin Templeton
69b80315b5 defsubst
(Best-ability ChangeLog annotation added by Christopher Allan Webber.)

* module/language/elisp/boot.el (defsubst): New macro.
2016-03-25 12:00:12 -07:00
Robin Templeton
bf142ba6af compiler macros
(Best-ability ChangeLog annotation added by Christopher Allan Webber.)

* module/language/elisp/boot.el (%define-compiler-macro): New macro.
* module/language/elisp/compile-tree-il.scm: New function.
  (compile-pair): Update to handle %compiler-macro condition.
2016-03-25 12:00:12 -07:00
Robin Templeton
bfc3ffe7d5 defconst, defvar: proclaim special at compile-time
(Best-ability ChangeLog annotation added by Christopher Allan Webber.)

* module/language/elisp/compile-tree-il.scm (defconst, defvar): Use
  proclaim-special!.
2016-03-25 12:00:12 -07:00
Robin Templeton
1d2aa4a9cf elisp @@ macro
(Best-ability ChangeLog annotation added by Christopher Allan Webber.)

* module/language/elisp/boot.el (@@): New macro.
2016-03-25 12:00:12 -07:00
Robin Templeton
cd809c8937 compile-elisp fn
(Best-ability ChangeLog annotation added by Christopher Allan Webber.)

* module/language/elisp/runtime.scm (compile-elisp): New procedure.
2016-03-25 12:00:12 -07:00
Robin Templeton
7c1b42e826 fix `nil?' type inference
(Best-ability ChangeLog annotation added by Christopher Allan Webber.)

* module/language/cps/type-fold.scm (nil?): Removed.
2016-03-25 12:00:12 -07:00
Robin Templeton
31afd07744 fix symbol-function
(Best-ability ChangeLog annotation added by Christopher Allan Webber.)

* module/language/elisp/runtime.scm (symbol-function): Adjust function.
2016-03-25 12:00:12 -07:00
Robin Templeton
ee48df0ec1 restore special operator handling
(Best-ability ChangeLog annotation added by Christopher Allan Webber.)

* module/language/elisp/boot.el
  (progn, eval-when-compile, if, defconst, defvar, setq, let, flet)
  (labels, let*, function, defmacro, quote): Removed.

* module/language/elisp/compile-tree-il.scm (special-operators): Removed.
  (compound-pair): Use find-operator to check if a 'special-operator
  rather than checking the now removed special-operators table.

* module/language/elisp/runtime.scm (defspecial): Update to use
  set-symbol-function!
2016-03-25 12:00:11 -07:00
Robin Templeton
54eec21dda define-module for elisp special modules
(Best-ability ChangeLog annotation added by Christopher Allan Webber.)

* module/language/elisp/runtime.scm (value-slot-module)
  (function-slot-module, plist-slot-module): Update to set #:pure to #t.
2016-03-25 12:00:11 -07:00
Robin Templeton
efc4163b56 defvar affects default value
(Best-ability ChangeLog annotation added by Christopher Allan Webber.)

* module/language/elisp/compile-tree-il.scm (defvar): Refactor appropriately.
2016-03-25 12:00:11 -07:00
Robin Templeton
f162edd28d symbol default value procedures
(Best-ability ChangeLog annotation added by Christopher Allan Webber.)

* module/language/elisp/runtime.scm:
  (symbol-default-bound?, symbol-default-value, set-symbol-default-value!):
  New procedure aliases.  Export their symbols.
  (emacs!): Update to accept new parameters dref, dset, dboundp.
2016-03-25 12:00:11 -07:00
Robin Templeton
e4464967f7 read nil/t as #nil/#t
(Best-ability ChangeLog annotation added by Christopher Allan Webber.)

* module/language/elisp/lexer.scm (lex): Update to handle #nil / #t.
2016-03-25 12:00:11 -07:00
Robin Templeton
707376055c elisp updates
(Best-ability ChangeLog annotation added by Christopher Allan Webber.)

* module/language/elisp/bindings.scm (get-lexical-binding)
  (get-function-binding): Use cadr instead of fluid-ref on slot.
  (with-fluids**): New procedure.
  (with-symbol-bindings, with-function-bindings): Use with-fluids**.
  Also stop using "make-fluid", use "(list #f #f)" instead as default
  lexical-bindings hashtable value.
  (with-lexical-bindings): Drop the error checking for invalid targets.

* module/language/elisp/boot.el (defun, save-excursion)
  (save-current-buffer, save-restriction, track-mouse, setq-default)
  (catch, condition-case): New macros.
  (omega, eval, gensym, interactive, autoload-do-load, fset, prin1)
  (backtrace-frame, backtrace, %set-eager-macroexpansion-mode): New functions.
  (null, consp, listp, car, cdr, make-symbol, signal): Wrap in eval-and-compile.
  (prog1, cond, or, while): Update to make use of gensym.
  (unwind-protect): Switch from funcall to %funcall.
  (%functionp): Rename from functionp.
  (%indirect-function): Update to use %functionp instead of functionp.
  Add check for if object is null, signaling void-function.  Instead of
  calling symbol-function directly, call via %funcall from the module
  "(language elisp runtime)".
  (fset): Significant additions and refactoring.
  (gload): Renamed from fload.
  (defvaralias, nthcdr, nth, eq): Move functions to a different location.
  (eq): Also stop using null.
  (dolist): Remove quasiquoting, build list manually.
  (random): Fix indentation.
  (progn, eval-when-compile, if, defconst, defvar, setq, let, flet)
  (labels, let*, function, defmacro, quote): Protect as special
  operators by raising error if invoked as a function.

* module/language/elisp/compile-tree-il.scm: Import "(ice-9 format)".
  Export compile-%function.
  (lexical-binding, handle-var-def, defun, valid-symbol-list-arg?)
  (process-options!): Remove.
  (reference-variable): Adjust functions passed to access-variable.
  (global?): Drop module parameter, use value-slot instead.
  (ensure-globals!, set-variable!, parse-body-1, parse-lambda-list)
  (compile-lambda, defconst, defvar, let, let*, compile-pair): Refactor.
  (reference-function): Use '(elisp-functions) instead of function-slot.
  (bind-lexically?): Drop module parameter, simplify.
  (make-dynlet): Switch from using make-primcall to make-call.
  (find-operator): Switch from using resolve-interface/resolve-module
  to using function-slot.
  (if, defconst, defvar, let, let*, flet, labels, guile-ref)
  (guile-private-ref, guile-primitive, defmacro, `, quote, %funcall)
  (%set-lexical-binding-mode): Add error checking.
  (setq): Pass in args to report-error.
  (function): Simplified, now calling %function.
  (%function): New function, based on prior "function".  Refactor, including
  adding support for matching against a closure.
  (%set-lexical-binding-mode): Switch from using fluid-set! to
  set-lexical-binding-mode.
  (special-operators): New variable.  Build from following for-each
  statement.
  (compile-tree-il): Drop call to "process-options!"

* module/language/elisp/lexer.scm: Import "(language elisp runtime)".
  (lex): Switch from using "list->string" to "make-lisp-string".

* module/language/elisp/runtime.scm: Use modules "(ice-9 format)",
  "(system base compile)".
  Remove from export list list, removing ensure-fluid!, symbol-fluid!,
  set-symbol-fluid!.  Add to export list ensure-dynamic!, symbol-name,
  symbol-plist, set-symbol-plist!, bind-symbol, symbol-desc, proclaim-symbol!
  special? emacs! unbound, lexical-binding?, set-lexical-binding-mode,
  log!, eval-elisp, local-eval-elisp, make-lisp-string, lisp-string?
  (make-list-string, lisp-string?) New function aliases.
  (value-slot-module, function-slot-module): Adjust module resolution.
  (nil_, t_): New variables.
  (ensure-fluid!, symbol-fluid, set-symbol-fluid!): Removed.
  (lexical-binding, unbound): New variables.
  (lexical-binding?, set-lexical-binding-mode, unbound, dynamic?)
  (make-dynamic, dynamic-ref, dynamic-set!, dynamic-unset!)
  (dynamic-bound?, dynamic-bind, ensure-present!, ensure-desc!)
  (schemify, symbol-name, symbol-desc, ensure-dynamic!, symbol-dynamic)
  (set-symbol-plist!, special?, proclaim-special!, emacs!, eval-elisp)
  (make-string): New procedures.
  (symbol-value): Use dynamic-ref! instead of fluid-ref!.
  (set-symbol-value!): Use dynamic-set! instead of fluid-set!.
  (symbol-function, set-symbol-function!, symbol-bound?)
  (symbol-fbound?, makunbound!, fmakunbound!): Refactor, including
  adjusting how module resolution is being done.

* module/language/elisp/spec.scm: Import module "(system vm vm)".
  Setup elisp-symbols, elisp-functions, elisp-plists.
  Use "set-default-vm-engine!" and "set-vm-engine!" to be set to
  'debug.
  (elisp): Comment out joiner.
2016-03-25 12:00:11 -07:00
Robin Templeton
4a14b7f7d8 allow arbitrary constants in cps
(Best-ability ChangeLog annotation added by Christopher Allan Webber.)

* module/language/cps/types.scm (constant-type): No longer error
  if type not determined.  Return &all-types instead.
2016-03-25 12:00:10 -07:00
BT Templeton
d3dabad7e9 guile-private-ref
* module/language/elisp/compile-tree-il.scm (compile-guile-private-ref):
  New special operator.
2016-03-25 12:00:10 -07:00
Robin Templeton
d808027782 intern arbitrary constants
(Best-ability ChangeLog annotation added by Christopher Allan Webber.)

* libguile/loader.c (load_thunk_from_memory): Refactor, adding
  "constants" argument and passing to "init" if appropriate.
  (load_thunk_from_file): Call "load-thunk-from-memory" with
  "constants" set to #f.
  (scm_load_thunk_from_memory): Instead of a bytevector, accept
  a cons of "(bytevector . constants)", where constants is either
  a vector or #f.  Pass this into "load_thunk_from_memory".
* module/language/bytecode/spec.scm: Adapt printer.
* module/language/cps/compile-bytecode.scm (compile-bytecode):
  New variable.
* module/system/repl/command.scm (disassemble):
  Adapt to expect pair which includes bytevector as its car.
* module/system/vm/assembler.scm <asm>: Add "to-file?" slot.
  (fresh-block): New variable.
  (make-assembler): Adapt to expect "to-file?" keyword argument.
  (intern-constant): Support "asm-to-file?" in checks.
  (emit-init-constants, link-data): Likewise.
  (link-assembly): Update logic for handling "(bytevector . constants)"
  pair, as well as the expectations of its invocation by compile-bytecode.
2016-03-25 12:00:10 -07:00
Andy Wingo
43a038f6e1 Fix lower-bound saturation in type inference
* module/language/cps/types.scm (type-entry-saturating-union): Fix range
  saturation in the negative direction.  Previously we were artificially
  truncating negative range ends to zero.
2016-03-14 11:17:08 +01:00
Andy Wingo
f61870979c Fix type inference of integer division
* module/language/cps/types.scm (define-binary-result!): Fix inference
  of integer division.
2016-01-17 16:58:36 +01:00
Andy Wingo
4137c224e2 Remove unused function in simplify.scm
* module/language/cps/simplify.scm (intset-add*): Remove unused
  function.
2016-01-04 23:33:24 +01:00
Andy Wingo
f56f580a4a Inline some helpers in intset.scm.
* module/language/cps/intset.scm (round-down): Inline.
  (clone-branch-and-set): Inline, and inline the vector-move-left!.
2016-01-04 22:48:30 +01:00
Andy Wingo
9091454c2e Include missing #:simplify? option in (language cps optimize).
* module/language/cps/optimize.scm (cps-default-optimization-options):
  Add missing #:simplify? option.  Otherwise the simplification pass was
  running even at -O0.
2016-01-04 22:43:30 +01:00
Andy Wingo
fb2f7b4e5f Better CPS conversion for tests in tests
* module/language/tree-il/compile-cps.scm (convert): Tests in tests have
  their consequents and alternates also converted in test context.
2016-01-03 18:18:51 +01:00
Andy Wingo
166703c5ce Better partial evaluation of tests in tests
* module/language/tree-il/peval.scm (peval): In test context,
  fold (let ((x EXP)) (if x x ALT)) to (if EXP #t ALT).  This reduces
  the number of boolean literals that the compiler has to reify, by
  causing EXP to evaluate in test context instead of value context.
  Also, rotate `let' out of the test part of conditionals, for the same
  reason.
2016-01-03 18:15:20 +01:00
Andy Wingo
52965e03ec Better folding of branches on $values
* module/language/cps/type-fold.scm (local-type-fold): Fold branches on
  $values, if we can.
2016-01-03 16:17:53 +01:00
Andy Wingo
39002f251e Eta-reduce branches
* module/language/cps/simplify.scm (compute-eta-reductions): Eta-reduce
  branches as well, so that passing a constant to a branch will fold to
  the true or false branch, provided that the test variable was just
  used in the branch.
2016-01-03 16:16:54 +01:00
Andy Wingo
5d171d998c Fix module for reification of srfi-4 primitives
* module/language/cps/reify-primitives.scm (primitive-module): Add cases
  for SRFI-4 primitives.  These primitives are only treated as such for
  the purposes of Tree-IL primitive expansion; perhaps the right fix is
  elsewhere, but it's here for now.
2015-12-30 17:14:22 +01:00
Andy Wingo
a9c2606451 Type inference copes better with unsorted graphs
* module/language/cps/types.scm (&min/0, &min/s64, &max/s64, &max/size)
  (&max/u64, &max/vector): New clamped variable range accessors.  Use
  them in type inferrers.
2015-12-26 22:12:09 +01:00
Andy Wingo
620b640a4e Fix bug in intmap-map
* module/language/cps/utils.scm (intmap-map): Use transient intmap-add!
  on an empty intmap to build the result instead of intmap-replace! on
  the argument.  Avoids spooky action-at-a-distance mutation of the
  argument if it happens to be a transient -- although the intmap-fold
  will correctly traverse a snapshot of the argument and the result will
  be correct, the argument value would be modified in place, causing
  strange results to calling code that passes in a transient.
2015-12-26 22:12:09 +01:00
Andy Wingo
3c271457f1 Fix build when threads are disabled
* module/language/cps/intmap.scm: Remove srfi-18 import.  We just need
  current-thread which is actually defined in (guile), and
  importing (srfi srfi-18) raises an error if Guile is compiled without
  threads support.
2015-12-16 09:48:37 +00:00
Andy Wingo
a1471e0244 Add another simplification pass to make rotate-loops work better
* module/language/cps/optimize.scm (optimize-first-order-cps): Toss in
  another simplification pass.
2015-12-03 09:12:25 +00:00
Andy Wingo
1d4b4ec39c Add support for comparing u64 values with SCM values
* libguile/vm-engine.c (BR_U64_SCM_COMPARISON): New helper.
  (br-if-u64-<=-scm, br-if-u64-<-scm, br-if-u64-=-scm)
  (br-if-u64->-scm, br-if-u64->=-scm): New instructions, to compare an
  untagged u64 with a tagged SCM.  Avoids many u64->scm operations.
* module/language/cps/compile-bytecode.scm (compile-function):
* module/language/cps/effects-analysis.scm:
* module/language/cps/type-fold.scm:
* module/system/vm/assembler.scm:
* module/system/vm/disassembler.scm (code-annotation, compute-labels):
* module/language/cps/primitives.scm (*branching-primcall-arities*): Add
  support for new opcodes.
* module/language/cps/specialize-numbers.scm
  (specialize-u64-scm-comparison): New helper.
* module/language/cps/specialize-numbers.scm (specialize-operations):
  Specialize u64 comparisons.
* module/language/cps/types.scm (true-comparison-restrictions): New helper.
  (define-comparison-inferrer): Use the new helper.  Add support for
  u64-<-scm et al.
2015-12-03 09:01:24 +01:00
Andy Wingo
9514dc7b95 Add ursh/immediate and ulsh/immediate ops
* libguile/vm-engine.c (ursh/immediate, ulsh/immediate): New ops.
* module/language/cps/effects-analysis.scm:
* module/language/cps/slot-allocation.scm (compute-var-representations)
  (compute-needs-slot):
* module/language/cps/specialize-primcalls.scm (specialize-primcalls):
* module/language/cps/compile-bytecode.scm (compile-function):
* module/system/vm/assembler.scm:
* module/language/cps/types.scm: Add support for new ops, and specialize
  ursh and ulsh.
2015-12-02 22:11:19 +01:00
Andy Wingo
73065c7131 Specialize u64 bit operations
* module/language/cps/specialize-numbers.scm (specialize-u64-binop):
  (specialize-operations): Specialize u64 bit operations.
2015-12-02 08:45:30 +01:00
Andy Wingo
3d6dd2f81c Add untagged bitwise operations
* libguile/vm-engine.c (ulogand, ulogior, ulogsub, ulsh, ursh)
  (scm->u64/truncate): New ops.
* module/language/cps/compile-bytecode.scm (compile-function):
* module/language/cps/effects-analysis.scm:
* module/language/cps/slot-allocation.scm (compute-var-representations):
* module/language/cps/specialize-primcalls.scm (specialize-primcalls):
* module/language/cps/types.scm:
* module/language/cps/utils.scm (compute-constant-values):
* module/system/vm/assembler.scm: Wire up support for the new ops.
2015-12-02 08:45:30 +01:00
Andy Wingo
82085252ec Add logsub op.
* libguile/vm-engine.c (logsub): New op.
* module/language/cps/effects-analysis.scm (logsub):
* module/language/cps/types.scm (logsub):
* module/system/vm/assembler.scm (system): Add support for the new op.

* module/language/tree-il/compile-cps.scm (canonicalize):
  Rewrite (logand x (lognot y)) to (logsub x y).
2015-12-01 15:42:24 +01:00
Andy Wingo
8c75a5eb1b Add current-thread VM op
* libguile/vm-engine.c (current-thread): New op.
* module/language/cps/effects-analysis.scm (&thread): New memory kind.

* module/language/cps/compile-bytecode.scm (compile-function):
* module/language/cps/effects-analysis.scm (current-thread):
* module/language/cps/types.scm (current-thread):
* module/language/tree-il/primitives.scm (*interesting-primitive-names*):
* module/system/vm/assembler.scm (emit-current-thread): Wire up the new
  op.
2015-12-01 15:42:24 +01:00
Andy Wingo
c3240d09b2 Unbox indexes of vectors, strings, and structs
* libguile/vm-engine.c (string-length, string-ref)
  (make-vector, vector-ref, vector-set!)
  (allocate-struct, struct-ref, struct-set!): Take indexes and return
  lengths as untagged u64 values.

* libguile/vm.c (vm_error_not_a_string): New helper.

* module/language/tree-il/compile-cps.scm (convert):
* module/language/cps/constructors.scm (inline-vector):
* module/language/cps/closure-conversion.scm (convert-one): Untag
  arguments to {string,vector,struct}-{ref,set!}, make-vector, and
  allocate-struct.  Tag return values from {string,vector}-length.

* module/language/cps/slot-allocation.scm (compute-var-representations):
  vector-length and string-length define u64 slots.

* module/language/cps/effects-analysis.scm: make-vector no longer causes
  a &type-check effect.

* module/language/cps/types.scm: Update to expect &u64 values for
  lengths and indexes.
2015-12-01 15:42:24 +01:00
Andy Wingo
a08b3d40f8 Untag values and indexes for all bytevector instructions
* libguile/vm-engine.c (bv-s8-ref, bv-s16-ref, bv-s32-ref, bv-s64-ref):
  Unbox index and return unboxed S32 value.
  (bv-s8-set!, bv-s16-set!, bv-s32-set!, bv-s64-set!): Unbox index and
  take unboxed S32 value.
  (bv-u8-ref, bv-u16-ref, bv-u32-ref, bv-u64-ref)
  (bv-s8-set!, bv-s16-set!, bv-s32-set!, bv-s64-set!): Likewise, but
  with unsigned values.
  (bv-f32-ref, bv-f32-set!, bv-f64-ref, bv-f64-set!): Use memcpy to
  access the value so we don't have to think about alignment.  GCC will
  inline this to a single instruction on architectures that support
  unaligned access.
* libguile/vm.c (vm_error_out_of_range_uint64)
  (vm_error_out_of_range_int64): New helpers.

* module/language/cps/slot-allocation.scm (compute-var-representations):
  All bytevector ref operations produce untagged values.

* module/language/cps/types.scm (define-bytevector-accessors): Update
  for bytevector untagged indices and values.

* module/language/cps/utils.scm (compute-constant-values): Fix s64
  case.

* module/language/tree-il/compile-cps.scm (convert): Box results of all
  bytevector accesses, and unbox incoming indices and values.
2015-12-01 15:42:24 +01:00
Andy Wingo
8bf77f7192 Add support for unboxed s64 values
* libguile/frames.c (enum stack_item_representation):
  (scm_to_stack_item_representation):
  (scm_frame_local_ref, scm_frame_local_set_x): Support for S64
  representations.

* libguile/frames.h (union scm_vm_stack_element): Add signed 64-bit
  integer field.

* libguile/vm-engine.c (scm->s64, s64->scm, load-s64): New
  instructions.

* module/language/cps/compile-bytecode.scm (compile-function):
* module/language/cps/cse.scm (compute-equivalent-subexpressions):
* module/language/cps/effects-analysis.scm:
* module/language/cps/slot-allocation.scm (compute-var-representations)
  (compute-needs-slot, allocate-slots):
* module/language/cps/utils.scm (compute-constant-values):
* module/language/cps/specialize-primcalls.scm (specialize-primcalls):
  Add support for new primcalls.

* module/language/cps/types.scm (&s64): New type.
  (&s64-min, &s64-max, &u64-max): New convenience definitions.
  (&range-min, &range-max): Use &s64-min and &u64-max names.
  (scm->s64, load-s64, s64->scm): Add support for new primcalls.

* module/system/vm/assembler.scm (emit-scm->s64, emit-s64->scm)
  (emit-load-s64): New exports.
* module/system/vm/assembler.scm (write-arities): Support for s64
  slots.

* module/system/vm/debug.scm (arity-definitions): Support for s64
  slots.
2015-12-01 15:42:19 +01:00