diff options
author | Andy Wingo <wingo@pobox.com> | 2009-02-21 14:04:53 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2009-02-21 20:28:28 +0100 |
commit | 81d677eb121834945bf0f9ebec28480e6e945cd0 (patch) | |
tree | c451546a9a5b788376dec178f8e06089f0a1cb04 /libguile/vm-i-system.c | |
parent | e9c5639d48fe95f8b0e5aed90d9cc3d30b93bae9 (diff) | |
download | guile-81d677eb121834945bf0f9ebec28480e6e945cd0.tar.gz |
implement break and continue, work around overly recursive pmatch expansion
* libguile/vm-i-system.c (goto/args): On a tail call to a different
procedure, init the locals to valid scheme values. Shouldn't matter for
well-compiled scheme, but inspecting uninitialized locals could give
garbage, or badly-compiled code could cause a crash.
* module/language/Makefile.am (NOCOMP_SOURCES): For the moment, don't
compile compile-ghil.scm. I need to fix this.
* module/language/ecmascript/compile-ghil.scm (load-toplevel): Sigh, and
disable stack checking in the evaluator too. Grr.
(comp): Implement (unnamed) break and continue.
* module/language/ecmascript/parse.scm (parse-ecmascript): Fix var
statements in `for' -- though it still doesn't work.
Diffstat (limited to 'libguile/vm-i-system.c')
-rw-r--r-- | libguile/vm-i-system.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libguile/vm-i-system.c b/libguile/vm-i-system.c index a105c52d9..18e9a781b 100644 --- a/libguile/vm-i-system.c +++ b/libguile/vm-i-system.c @@ -631,6 +631,10 @@ VM_DEFINE_INSTRUCTION (40, goto_args, "goto/args", 1, -1, 1) CONS (external, SCM_UNDEFINED, external); SCM_FRAME_DATA_ADDRESS (fp)[0] = external; + /* Init locals to valid SCM values */ + for (i = 0; i < bp->nlocs; i++) + LOCAL_SET (i + bp->nargs, SCM_UNDEFINED); + /* Call itself */ ip = bp->base; APPLY_HOOK (); |