diff options
author | Andy Wingo <wingo@pobox.com> | 2017-11-09 14:18:01 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2017-11-11 22:08:14 +0100 |
commit | 8b5f9648ff806157f90489b1f5eb26fb1e05a8cf (patch) | |
tree | 0b4ab63153dc0e1663d4309af32dc4b73a3bab96 /module/language/cps/compile-bytecode.scm | |
parent | 7bfdd46ea5d915fd878be47d08fb1e781d20d163 (diff) | |
download | guile-8b5f9648ff806157f90489b1f5eb26fb1e05a8cf.tar.gz |
Add tag-fixnum instruction
* libguile/vm-engine.c (tag-fixnum): New instruction.
* 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/types.scm (&min/fixnum, &max/fixnum, tag-fixnum):
* module/system/vm/assembler.scm: Add support for the new instruction.
Diffstat (limited to 'module/language/cps/compile-bytecode.scm')
-rw-r--r-- | module/language/cps/compile-bytecode.scm | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/module/language/cps/compile-bytecode.scm b/module/language/cps/compile-bytecode.scm index ed2514864..2e3697bdf 100644 --- a/module/language/cps/compile-bytecode.scm +++ b/module/language/cps/compile-bytecode.scm @@ -271,6 +271,8 @@ (from-sp (slot expected)) (from-sp (slot desired)))) (($ $primcall 'untag-fixnum #f (src)) (emit-untag-fixnum asm (from-sp dst) (from-sp (slot src)))) + (($ $primcall 'tag-fixnum #f (src)) + (emit-tag-fixnum asm (from-sp dst) (from-sp (slot src)))) (($ $primcall name #f args) ;; FIXME: Inline all the cases. (let ((inst (prim-instruction name))) |