From: Tim Vaughan Date: Fri, 28 Apr 2017 10:34:32 +0000 (+1200) Subject: Identified prob with MCE: macro hygiene. X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?a=commitdiff_plain;h=1c2a2cf4faaf55d97af61f5f1b400b0fb1e00a91;p=scheme.forth.jl.git Identified prob with MCE: macro hygiene. --- diff --git a/examples/metacirc.scm b/examples/metacirc.scm index 94787dd..d63e685 100644 --- a/examples/metacirc.scm +++ b/examples/metacirc.scm @@ -390,5 +390,4 @@ ')) (display object))) -(define the-global-environment - (setup-environment)) +;; (define the-global-environment (setup-environment)) diff --git a/src/scheme.4th b/src/scheme.4th index 669665a..63f8ace 100644 --- a/src/scheme.4th +++ b/src/scheme.4th @@ -77,7 +77,7 @@ make-exception unrecoverable-exception \ ---- List-structured memory ---- {{{ -10000 constant scheme-memsize +20000 constant scheme-memsize create car-cells scheme-memsize allot create car-type-cells scheme-memsize allot @@ -644,6 +644,12 @@ objvar macro-table ( Look up macro in macro table. Returns nil if no macro is found. ) : lookup-macro ( name_symbol -- proc ) + + symbol-type istype? invert if + \ Early exit if argument is not a symbol + 2drop nil exit + then + macro-table obj@ begin @@ -1673,6 +1679,13 @@ hide env :noname ( obj env -- result ) 2swap + \ --- DEBUG --- + ( + fg yellow ." Evaluating: " bold 2dup print reset-term + space fg green ." PS: " bold depth . reset-term + space fg blue ." RS: " bold RSP@ RSP0 - . reset-term cr + ) + self-evaluating? if 2swap 2drop exit @@ -2033,7 +2046,6 @@ variable gc-stack-depth ; : repl - empty-parse-str enable-gc