diff options
author | Matthias Andreas Benkard <matthias@benkard.de> | 2008-06-27 14:42:33 +0200 |
---|---|---|
committer | Matthias Andreas Benkard <matthias@benkard.de> | 2008-06-27 14:42:33 +0200 |
commit | 189d02b12aa33fc18eaff9558675d9fa9d6ba668 (patch) | |
tree | bbaa136bcb5961452e89f103fa907cff65a9863e /MLKInterpretedClosure.m | |
parent | cb23a76bbd3b7b1ccf4a5ec8894437e449a9047d (diff) |
MLKInterpreter: Fix APPLY and %LAMBDA.
Diffstat (limited to 'MLKInterpretedClosure.m')
-rw-r--r-- | MLKInterpretedClosure.m | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/MLKInterpretedClosure.m b/MLKInterpretedClosure.m index 48f1805..edf7e17 100644 --- a/MLKInterpretedClosure.m +++ b/MLKInterpretedClosure.m @@ -19,20 +19,31 @@ #import "MLKCons.h" #import "MLKInterpretedClosure.h" #import "MLKInterpreter.h" +#import "MLKPackage.h" #import "runtime-compatibility.h" #import <Foundation/NSDictionary.h> #import <Foundation/NSSet.h> +static MLKSymbol *PROGN; + + @implementation MLKInterpretedClosure --(id) initWithBodyForm:(id)form - lambdaListName:(MLKSymbol *)symbol - context:(MLKLexicalContext *)lexctx - environment:(MLKLexicalEnvironment *)lexenv ++(void) initialize +{ + MLKPackage *cl; + cl = [MLKPackage findPackage:@"COMMON-LISP"]; + PROGN = [cl intern:@"PROGN"]; +} + +-(id) initWithBodyForms:(id)forms + lambdaListName:(MLKSymbol *)symbol + context:(MLKLexicalContext *)lexctx + environment:(MLKLexicalEnvironment *)lexenv { self = [super init]; - ASSIGN (bodyForm, form); + ASSIGN (bodyForm, [MLKCons cons:PROGN with:forms]); ASSIGN (context, lexctx); ASSIGN (environment, lexenv); ASSIGN (lambdaListName, symbol); |