summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <matthias@benkard.de>2008-08-13 01:00:09 +0200
committerMatthias Andreas Benkard <matthias@benkard.de>2008-08-13 01:00:09 +0200
commit1d741f977203814b9c5b0b5d524af25eff27a3c1 (patch)
tree001633e677efc79f1f56aad5174642c634b38a02
parentf632ef49a7d5465943ac7ac7c666c0490887caad (diff)
LLVM compiler: Bind the lambda list.
-rw-r--r--MLKLLVMCompiler.mm4
1 files changed, 3 insertions, 1 deletions
diff --git a/MLKLLVMCompiler.mm b/MLKLLVMCompiler.mm
index 3ad0c10..72571a7 100644
--- a/MLKLLVMCompiler.mm
+++ b/MLKLLVMCompiler.mm
@@ -108,7 +108,6 @@ static Constant
forCompiler:self]];
builder.CreateRet (v);
- function->dump();
verifyFunction (*function);
fpm->run (*function);
@@ -400,6 +399,8 @@ static Constant
Value *nsmutablearray = [_compiler insertClassLookup:@"NSMutableArray"];
Value *mlkcons = [_compiler insertClassLookup:@"MLKCons"];
+
+ // FIXME: Heap-allocate if appropriate.
Value *lambdaList = builder.CreateAlloca (PointerTy, NULL, "lambda_list");
builder.CreateStore ([_compiler insertMethodCall:@"array"
@@ -451,6 +452,7 @@ static Constant
while ((form = [e nextObject]))
{
//NSLog (@"%LAMBDA: Processing subform.");
+ [form->_context setValue:lambdaList forSymbol:_lambdaListName];
value = [form processForLLVM];
}