diff options
author | Matthias Andreas Benkard <matthias@benkard.de> | 2008-08-17 22:04:27 +0200 |
---|---|---|
committer | Matthias Andreas Benkard <matthias@benkard.de> | 2008-08-17 22:05:18 +0200 |
commit | 96870ab2cd94ba6e36585837b69048c544e6d6b6 (patch) | |
tree | 5550abe681f2e23dacc0f4ae39e74a1f552608c1 /MLKInterpreter.m | |
parent | 0c789f22fae8c0d318a189e8b8b73f5e5ef81976 (diff) |
Promote special operators SET and %FSET to intrinsics.
Diffstat (limited to 'MLKInterpreter.m')
-rw-r--r-- | MLKInterpreter.m | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/MLKInterpreter.m b/MLKInterpreter.m index 693c742..21adaea 100644 --- a/MLKInterpreter.m +++ b/MLKInterpreter.m @@ -1059,59 +1059,6 @@ else RETURN_VALUE (value); } - else if (car == SET) - { - id symbol = [[self eval:[[program cdr] car] - inLexicalContext:context - withEnvironment:lexenv - expandOnly:expandOnly] - objectAtIndex:0]; - id value = [[self eval:[[[program cdr] cdr] car] - inLexicalContext:context - withEnvironment:lexenv - expandOnly:expandOnly] - objectAtIndex:0]; - - if (expandOnly) - RETURN_VALUE ([MLKCons cons:SET - with:[MLKCons cons:symbol - with:[MLKCons cons:value - with:nil]]]); - - if ([dynamicContext bindingForSymbol:symbol]) - [dynamicContext setValue:value forSymbol:symbol]; - else - [[MLKDynamicContext globalContext] addValue:value - forSymbol:symbol]; - - return [NSArray arrayWithObject:symbol]; - } - else if (car == _FSET) - { - // Like SET, but for the function cell. - id symbol = [[self eval:[[program cdr] car] - inLexicalContext:context - withEnvironment:lexenv - expandOnly:expandOnly] - objectAtIndex:0]; - id value = [[self eval:[[[program cdr] cdr] car] - inLexicalContext:context - withEnvironment:lexenv - expandOnly:expandOnly] - objectAtIndex:0]; - - if (expandOnly) - RETURN_VALUE ([MLKCons cons:_FSET - with:[MLKCons cons:symbol - with:[MLKCons cons:value - with:nil]]]); - - [[MLKLexicalContext globalContext] addFunction:symbol]; - [[MLKLexicalEnvironment globalEnvironment] addFunction:value - forSymbol:symbol]; - - return [NSArray arrayWithObject:symbol]; - } else if (car == THROW) { id catchTag; |