1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-01 04:10:18 +02:00

further ecmascript work

* libguile/vm-i-system.c (drop, return): Declare drop and return as
  popping one arg from the stack.

* module/language/ghil/compile-glil.scm:
* module/language/glil/compile-assembly.scm (make-meta): Adjust so that
  we declare 'drop and 'return calls as popping one arg from the stack.

* module/language/ecmascript/compile-ghil.scm (comp, comp-body): Flesh
  out a bit more. Most significantly, scoping within functions obeys
  javascript semantics better, modulo bits about with() forms.

* module/language/ecmascript/impl.scm: Define some runtime helper
  routines.
* module/language/Makefile.am (SOURCES): Add impl.scm.

* module/language/ecmascript/parse.scm (parse-ecmascript): Minor tweaks.

* module/language/ecmascript/tokenize.scm (read-identifier): Identifiers
  now read as symbols, not strings.
This commit is contained in:
Andy Wingo 2009-02-19 13:55:55 +01:00
parent 8fa6886d7a
commit 131f7d6c71
8 changed files with 271 additions and 18 deletions

View file

@ -64,7 +64,7 @@ VM_DEFINE_INSTRUCTION (2, break, "break", 0, 0, 0)
NEXT;
}
VM_DEFINE_INSTRUCTION (3, drop, "drop", 0, 0, 0)
VM_DEFINE_INSTRUCTION (3, drop, "drop", 0, 1, 0)
{
DROP ();
NEXT;
@ -971,7 +971,7 @@ VM_DEFINE_INSTRUCTION (47, goto_cc, "goto/cc", 0, 1, 1)
}
}
VM_DEFINE_INSTRUCTION (48, return, "return", 0, 0, 1)
VM_DEFINE_INSTRUCTION (48, return, "return", 0, 1, 1)
{
vm_return:
EXIT_HOOK ();