summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MLKForm.m1
-rw-r--r--MLKPackage.m2
-rw-r--r--MLKRoot.m8
-rw-r--r--special-symbols.h2
4 files changed, 9 insertions, 4 deletions
diff --git a/MLKForm.m b/MLKForm.m
index 024ac2d..3f529dc 100644
--- a/MLKForm.m
+++ b/MLKForm.m
@@ -130,7 +130,6 @@
id car = [object car];
if (car == CATCH) return [MLKCatchForm class];
- else if (car == EVAL) return [MLKFunctionCallForm class];
else if (car == EVAL_WHEN) return [MLKEvalWhenForm class];
else if (car == _FOREIGN_LAMBDA) return [MLKForeignLambdaForm class];
else if (car == FUNCTION) return [MLKFunctionForm class];
diff --git a/MLKPackage.m b/MLKPackage.m
index 6d97652..d432465 100644
--- a/MLKPackage.m
+++ b/MLKPackage.m
@@ -98,7 +98,6 @@ static NSMutableDictionary *packages = nil;
[cl export:[cl intern:@"DECLARE"]];
[cl export:[cl intern:@"QUOTE"]];
[cl export:[cl intern:@"VALUES"]];
- [cl export:[cl intern:@"EVAL"]];
[cl export:[cl intern:@"SPECIAL"]];
[cl export:[cl intern:@"UNWIND-PROTECT"]];
[cl export:[cl intern:@"MULTIPLE-VALUE-CALL"]];
@@ -155,6 +154,7 @@ static NSMutableDictionary *packages = nil;
[sys export:[sys intern:@"COMPILE"]];
[sys export:[sys intern:@"SET"]];
[sys export:[sys intern:@"APPLY"]];
+ [sys export:[sys intern:@"EVAL"]];
[sys export:[sys intern:@"OBJC-CLASS-OF"]];
[sys export:[sys intern:@"OBJC-SUBCLASSP"]];
diff --git a/MLKRoot.m b/MLKRoot.m
index 361ce16..8045f54 100644
--- a/MLKRoot.m
+++ b/MLKRoot.m
@@ -776,4 +776,12 @@ as provided by method %@ of object %@",
? (id)[arglist array]
: (id)[NSArray array])];
}
+
++(NSArray *) eval:(NSArray *)args
+{
+ id evaluand = denullify ([args objectAtIndex:0]);
+ return [MLKInterpreter eval:evaluand
+ inLexicalContext:[MLKLexicalContext globalContext]
+ withEnvironment:[MLKLexicalEnvironment globalEnvironment]];
+}
@end
diff --git a/special-symbols.h b/special-symbols.h
index 806c758..d0f93b0 100644
--- a/special-symbols.h
+++ b/special-symbols.h
@@ -38,7 +38,6 @@ static MLKSymbol *LET;
static MLKSymbol *LOCALLY;
static MLKSymbol *FUNCALL;
static MLKSymbol *FUNCTION;
-static MLKSymbol *EVAL;
static MLKSymbol *EVAL_WHEN;
static MLKSymbol *QUOTE;
static MLKSymbol *SETQ;
@@ -87,7 +86,6 @@ ensure_symbols ()
_FLET = [sys intern:@"%FLET"];
_MACROLET = [sys intern:@"%MACROLET"];
_LOOP = [sys intern:@"%LOOP"];
- EVAL = [cl intern:@"EVAL"];
EVAL_WHEN = [cl intern:@"EVAL-WHEN"];
FUNCALL = [cl intern:@"FUNCALL"];
FUNCTION = [cl intern:@"FUNCTION"];