summaryrefslogtreecommitdiff
path: root/MLKInterpretedClosure.m
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <matthias@benkard.de>2008-06-27 14:42:33 +0200
committerMatthias Andreas Benkard <matthias@benkard.de>2008-06-27 14:42:33 +0200
commit189d02b12aa33fc18eaff9558675d9fa9d6ba668 (patch)
treebbaa136bcb5961452e89f103fa907cff65a9863e /MLKInterpretedClosure.m
parentcb23a76bbd3b7b1ccf4a5ec8894437e449a9047d (diff)
MLKInterpreter: Fix APPLY and %LAMBDA.
Diffstat (limited to 'MLKInterpretedClosure.m')
-rw-r--r--MLKInterpretedClosure.m21
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);