author | Alan Dipert
<alan@dipert.org> 2020-01-12 03:48:43 UTC |
committer | Alan Dipert
<alan@dipert.org> 2020-01-12 03:48:43 UTC |
parent | c29b9eedf289a796157e541ed93243535a01b279 |
jacl.js | +2 | -0 |
todo.org | +18 | -2 |
diff --git a/jacl.js b/jacl.js index bcb405e..b01b4fc 100644 --- a/jacl.js +++ b/jacl.js @@ -96,6 +96,7 @@ class LispSymbol { this.stack = []; this.isMacro = false; this.isConstant = false; + this.isSpecial = false; } val() { if (this.value === UNDEFINED) @@ -371,6 +372,7 @@ for (const [k,v] of JSCONSTS) { } const PACKAGE = CLPKG.intern('*PACKAGE*', true); +PACKAGE.isSpecial = true; PACKAGE.value = Package.get('JACL'); JACLPKG.usePackage(CLPKG); diff --git a/todo.org b/todo.org index 6a53573..91d9cca 100644 --- a/todo.org +++ b/todo.org @@ -1,11 +1,27 @@ -* TODO PROGN +* DONE PROGN ** necessary as independent special form because of relationship to EVAL-WHEN and the concept of top-level +* TODO Dynamic binding of symbols +** How are special variables created? +*** DONE cl:*package* is special +*** TODO LispSymbol has an isSpecial flag +*** DEFVAR and DEFPARAMETER +**** DEFPARAMETER whether or not defined +***** Even inside let where bound +**** DEFVAR only if not already defined +***** What happens if you DEFVAR in a LET? +****** SBCL: DEFVAR has no effect in LET where special bound +** How are special variables (re)-bound? +*** LET +*** Function parameters * TODO EVAL-WHEN +** Maintain situations in a variable in JACL package * TODO BLOCK/RETURN/RETURN-FROM +** SBCL has a concept of "named lambdas" +** Related to RETURN-FROM? Related to tail calls? +** Current function name as part of dynamic environment * TODO FLET * TODO File compilation * TODO Multiple value returns -** SBCL has a concept of "named lambdas", what does that unlock? * SETF/accessors * TODO Direct linking * TODO Tree shaking