From 189d02b12aa33fc18eaff9558675d9fa9d6ba668 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Fri, 27 Jun 2008 14:42:33 +0200 Subject: MLKInterpreter: Fix APPLY and %LAMBDA. --- MLKInterpretedClosure.m | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'MLKInterpretedClosure.m') 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 #import +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); -- cgit v1.2.3