From 1d741f977203814b9c5b0b5d524af25eff27a3c1 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Wed, 13 Aug 2008 01:00:09 +0200 Subject: LLVM compiler: Bind the lambda list. --- MLKLLVMCompiler.mm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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]; } -- cgit v1.2.3