From f24c4a95ab655cf47bcea1a2f20b6a1f76329c68 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Sun, 17 Aug 2008 12:00:52 +0200 Subject: LLVM compiler: Implement LET. --- MLKLLVMCompiler.mm | 42 +++++++++++++++++++++++++++++++++++++----- 1 file changed, 37 insertions(+), 5 deletions(-) (limited to 'MLKLLVMCompiler.mm') diff --git a/MLKLLVMCompiler.mm b/MLKLLVMCompiler.mm index 4313ac9..3b011d5 100644 --- a/MLKLLVMCompiler.mm +++ b/MLKLLVMCompiler.mm @@ -126,7 +126,7 @@ static Constant // JIT-compile. fn = (id (*)()) execution_engine->getPointerToFunction (function); - module->dump(); + //module->dump(); NSLog (@"%p", fn); // Execute. @@ -314,10 +314,7 @@ static Constant { NSEnumerator *e = [_bodyForms objectEnumerator]; MLKForm *form; - Value *value = NULL; - - if ([_bodyForms count] == 0) - value = ConstantPointerNull::get (PointerTy); + Value *value = ConstantPointerNull::get (PointerTy); while ((form = [e nextObject])) { @@ -405,6 +402,9 @@ static Constant args.push_back ([form processForLLVM]); } + //GlobalVariable *endmarker = module->getGlobalVariable ("MLKEndOfArgumentsMarker", false); + //endmarker->setConstant (true); + //GlobalVariable *endmarker = new GlobalVariable (PointerTy, true, GlobalValue::ExternalWeakLinkage); Value *endmarker = builder.CreateIntToPtr (ConstantInt::get(Type::Int64Ty, (uint64_t)MLKEndOfArgumentsMarker, false), @@ -569,3 +569,35 @@ static Constant return closure; } @end + + +@implementation MLKLetForm (MLKLLVMCompilation) +-(Value *) processForLLVM +{ + NSEnumerator *e = [_variableBindingForms objectEnumerator]; + Value *value = ConstantPointerNull::get (PointerTy); + MLKForm *form; + MLKVariableBindingForm *binding_form; + + while ((binding_form = [e nextObject])) + { + // FIXME: Handle heap allocation. + Value *binding_value = [[binding_form valueForm] processForLLVM]; + Value *binding_variable = builder.CreateAlloca (PointerTy, + NULL, + [(MLKPrintToString([binding_form name])) + UTF8String]); + builder.CreateStore (binding_value, binding_variable); + [_bodyContext setValueValue:binding_variable + forSymbol:[binding_form name]]; + } + + e = [_bodyForms objectEnumerator]; + while ((form = [e nextObject])) + { + value = [form processForLLVM]; + } + + return value; +} +@end -- cgit v1.2.3 From 68ce22adad85ff1ea04455b466f656ea6b175a5f Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Sun, 17 Aug 2008 12:12:30 +0200 Subject: LLVM compiler: Implement QUOTE. --- MLKLLVMCompiler.mm | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'MLKLLVMCompiler.mm') diff --git a/MLKLLVMCompiler.mm b/MLKLLVMCompiler.mm index 3b011d5..7767d48 100644 --- a/MLKLLVMCompiler.mm +++ b/MLKLLVMCompiler.mm @@ -601,3 +601,14 @@ static Constant return value; } @end + + +@implementation MLKQuoteForm (MLKLLVMCompilation) +-(Value *) processForLLVM +{ + return builder.CreateIntToPtr (ConstantInt::get(Type::Int64Ty, + (uint64_t)_quotedData, + false), + PointerTy); +} +@end -- cgit v1.2.3 From da47da35f268416e1131fa4e107e32fa6a667ae4 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Sun, 17 Aug 2008 13:09:08 +0200 Subject: LLVM compiler: Implement IF and support self-evaluating forms. --- MLKLLVMCompiler.mm | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) (limited to 'MLKLLVMCompiler.mm') diff --git a/MLKLLVMCompiler.mm b/MLKLLVMCompiler.mm index 7767d48..81aa764 100644 --- a/MLKLLVMCompiler.mm +++ b/MLKLLVMCompiler.mm @@ -18,6 +18,7 @@ #import "MLKLLVMCompiler.h" #import "globals.h" +#import "util.h" #import #import @@ -606,9 +607,61 @@ static Constant @implementation MLKQuoteForm (MLKLLVMCompilation) -(Value *) processForLLVM { + // FIXME: When to release _quotedData? At the same time the code is + // released, probably... + LRETAIN (_quotedData); return builder.CreateIntToPtr (ConstantInt::get(Type::Int64Ty, (uint64_t)_quotedData, false), PointerTy); } @end + + +@implementation MLKSelfEvaluatingForm (MLKLLVMCompilation) +-(Value *) processForLLVM +{ + // FIXME: When to release _form? At the same time the code is + // released, probably... + LRETAIN (_form); + return builder.CreateIntToPtr (ConstantInt::get(Type::Int64Ty, + (uint64_t)_form, + false), + PointerTy); +} +@end + + +@implementation MLKIfForm (MLKLLVMCompilation) +-(Value *) processForLLVM +{ + Function *function = builder.GetInsertBlock()->getParent(); + BasicBlock *thenBlock = BasicBlock::Create ("if_then", function); + BasicBlock *elseBlock = BasicBlock::Create ("if_else"); + BasicBlock *joinBlock = BasicBlock::Create ("if_join"); + + Value *thenValue, *elseValue; + + Value *test = builder.CreateICmpNE ([_conditionForm processForLLVM], + ConstantPointerNull::get (PointerTy)); + builder.CreateCondBr (test, thenBlock, elseBlock); + + builder.SetInsertPoint (thenBlock); + thenValue = [_consequentForm processForLLVM]; + builder.CreateBr (joinBlock); + + builder.SetInsertPoint (elseBlock); + function->getBasicBlockList().push_back (elseBlock); + elseValue = [_alternativeForm processForLLVM]; + builder.CreateBr (joinBlock); + + builder.SetInsertPoint (joinBlock); + function->getBasicBlockList().push_back (joinBlock); + + PHINode *value = builder.CreatePHI (PointerTy, "if_result"); + value->addIncoming (thenValue, thenBlock); + value->addIncoming (elseValue, elseBlock); + + return value; +} +@end -- cgit v1.2.3 From c22d1dfba82475d19896c04bd1c217677a97ad6e Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Sun, 17 Aug 2008 15:17:57 +0200 Subject: LLVM compiler: Support package TOILET-SYSTEM's intrinsic operations. --- MLKLLVMCompiler.mm | 55 +++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 46 insertions(+), 9 deletions(-) (limited to 'MLKLLVMCompiler.mm') diff --git a/MLKLLVMCompiler.mm b/MLKLLVMCompiler.mm index 81aa764..aba2bf1 100644 --- a/MLKLLVMCompiler.mm +++ b/MLKLLVMCompiler.mm @@ -17,6 +17,7 @@ */ #import "MLKLLVMCompiler.h" +#import "MLKPackage.h" #import "globals.h" #import "util.h" @@ -381,23 +382,59 @@ static Constant @implementation MLKFunctionCallForm (MLKLLVMCompilation) -(Value *) processForLLVM { + static MLKPackage *sys = [MLKPackage findPackage:@"TOILET-SYSTEM"]; + + BOOL special_dispatch = NO; + Value *functionCell; + Value *functionPtr; + Value *closureDataCell; + Value *closureDataPtr; + std::vector args; + if (![_context symbolNamesFunction:_head]) { - NSLog (@"Compiler: Don't know function %@", MLKPrintToString(_head)); - // XXX Issue a style warning. + if (_head && [_head homePackage] == sys) + { + special_dispatch = YES; + } + else + { + NSLog (@"Compiler: Don't know function %@", MLKPrintToString(_head)); + // XXX Issue a style warning. + } } - Value *functionCell = builder.Insert ([_context functionCellValueForSymbol:_head]); - Value *functionPtr = builder.CreateLoad (functionCell); - Value *closureDataCell = builder.Insert ([_context closureDataPointerValueForSymbol:_head]); - Value *closureDataPtr = builder.CreateLoad (closureDataCell); + if (!special_dispatch) + { + functionCell = builder.Insert ([_context functionCellValueForSymbol:_head]); + functionPtr = builder.CreateLoad (functionCell); + closureDataCell = builder.Insert ([_context closureDataPointerValueForSymbol:_head]); + closureDataPtr = builder.CreateLoad (closureDataCell); + + args.push_back (closureDataPtr); + } + else + { + std::vector argtypes (1, PointerTy); + functionPtr = builder.CreateIntToPtr (ConstantInt::get(Type::Int64Ty, + (uint64_t)MLKDispatchRootFunction, + false), + PointerType::get (FunctionType::get (PointerTy, + argtypes, + true), + 0)); + LRETAIN (_head); // FIXME: release sometime? On the other hand, + // these symbols will probably never be + // deallocated anyway. + args.push_back (builder.CreateIntToPtr (ConstantInt::get(Type::Int64Ty, + (uint64_t)_head, + false), + PointerTy)); + } NSEnumerator *e = [_argumentForms objectEnumerator]; MLKForm *form; - std::vector args; - args.push_back (closureDataPtr); - while ((form = [e nextObject])) { args.push_back ([form processForLLVM]); -- cgit v1.2.3 From 0c789f22fae8c0d318a189e8b8b73f5e5ef81976 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Sun, 17 Aug 2008 19:53:42 +0200 Subject: LLVM compiler: Implement SETQ. --- MLKLLVMCompiler.mm | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'MLKLLVMCompiler.mm') diff --git a/MLKLLVMCompiler.mm b/MLKLLVMCompiler.mm index aba2bf1..cfa50c3 100644 --- a/MLKLLVMCompiler.mm +++ b/MLKLLVMCompiler.mm @@ -702,3 +702,38 @@ static Constant return value; } @end + + +@implementation MLKSetQForm (MLKLLVMCompilation) +-(Value *) processForLLVM +{ + NSEnumerator *var_e, *value_e; + MLKForm *valueForm; + Value *value = ConstantPointerNull::get (PointerTy); + id variable; + + var_e = [_variables objectEnumerator]; + value_e = [_valueForms objectEnumerator]; + while ((valueForm = [value_e nextObject])) + { + variable = [var_e nextObject]; + value = [valueForm processForLLVM]; + if ([_context variableHeapAllocationForSymbol:variable]) + { + Value *binding = builder.CreateLoad ([_context + bindingValueForSymbol:variable]); + std::vector args (1, value); + + [_compiler insertVoidMethodCall:@"setValue:" + onObject:binding + withArgumentVector:&args]; + } + else + { + builder.CreateStore (value, [_context valueValueForSymbol:variable]); + } + } + + return value; +} +@end -- cgit v1.2.3 From 79b29bf6e41ca122d469040cd671d43ce81bd6df Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Sun, 17 Aug 2008 22:04:53 +0200 Subject: Formatting. --- MLKLLVMCompiler.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'MLKLLVMCompiler.mm') diff --git a/MLKLLVMCompiler.mm b/MLKLLVMCompiler.mm index cfa50c3..1fe4f4b 100644 --- a/MLKLLVMCompiler.mm +++ b/MLKLLVMCompiler.mm @@ -706,7 +706,7 @@ static Constant @implementation MLKSetQForm (MLKLLVMCompilation) -(Value *) processForLLVM -{ +{ NSEnumerator *var_e, *value_e; MLKForm *valueForm; Value *value = ConstantPointerNull::get (PointerTy); -- cgit v1.2.3 From eade591251f3f3deaa3502d73b6803206fc69d2d Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Mon, 18 Aug 2008 00:57:34 +0200 Subject: MLKLLVMCompiler: Add -eval:. --- MLKLLVMCompiler.mm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'MLKLLVMCompiler.mm') diff --git a/MLKLLVMCompiler.mm b/MLKLLVMCompiler.mm index 1fe4f4b..337caf6 100644 --- a/MLKLLVMCompiler.mm +++ b/MLKLLVMCompiler.mm @@ -152,7 +152,12 @@ static Constant //FIXME // If PROGN, do this... If EVAL-WHEN, do that... - +} + ++(id) eval:(id)object +{ + return [self compile:object + inContext:[MLKLexicalContext globalContext]]; } +(Value *) processForm:(MLKForm *)form -- cgit v1.2.3 From fc68a5a5c6b2b8d9b1a841d45b65701d30b4c612 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Mon, 18 Aug 2008 00:58:25 +0200 Subject: LLVM compiler: Enclose compilation in an autorelease pool. --- MLKLLVMCompiler.mm | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'MLKLLVMCompiler.mm') diff --git a/MLKLLVMCompiler.mm b/MLKLLVMCompiler.mm index 337caf6..1d6d471 100644 --- a/MLKLLVMCompiler.mm +++ b/MLKLLVMCompiler.mm @@ -16,12 +16,14 @@ * along with this program. If not, see . */ +#import "MLKDynamicContext.h" #import "MLKLLVMCompiler.h" #import "MLKPackage.h" #import "globals.h" #import "util.h" #import +#import #import #import @@ -102,6 +104,9 @@ static Constant +(id) compile:(id)object inContext:(MLKLexicalContext *)context { + NSAutoreleasePool *pool; + pool = [[NSAutoreleasePool alloc] init]; + Value *v = NULL; BasicBlock *block; std::vector noargs (0, Type::VoidTy); @@ -114,13 +119,14 @@ static Constant module); id lambdaForm; id (*fn)(); + MLKForm *form = [MLKForm formWithObject:object + inContext:context + forCompiler:self]; block = BasicBlock::Create ("entry", function); builder.SetInsertPoint (block); - v = [self processForm:[MLKForm formWithObject:object - inContext:context - forCompiler:self]]; + v = [self processForm:form]; builder.CreateRet (v); verifyFunction (*function); @@ -131,6 +137,9 @@ static Constant //module->dump(); NSLog (@"%p", fn); + [pool release]; + NSLog (@"Code compiled."); + // Execute. lambdaForm = fn(); -- cgit v1.2.3 From 81d52b3cc5a93f031f24e228f87ee47ac4d8299b Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Mon, 18 Aug 2008 00:58:40 +0200 Subject: LLVM compiler: Implement IN-PACKAGE. --- MLKLLVMCompiler.mm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'MLKLLVMCompiler.mm') diff --git a/MLKLLVMCompiler.mm b/MLKLLVMCompiler.mm index 1d6d471..ae0c083 100644 --- a/MLKLLVMCompiler.mm +++ b/MLKLLVMCompiler.mm @@ -751,3 +751,21 @@ static Constant return value; } @end + + +@implementation MLKInPackageForm (MLKLLVMCompilation) +-(Value *) processForLLVM +{ + id package = [MLKPackage findPackage:stringify(_packageDesignator)]; + + [[MLKDynamicContext currentContext] + setValue:package + forSymbol:[[MLKPackage findPackage:@"COMMON-LISP"] + intern:@"*PACKAGE*"]]; + + return builder.CreateIntToPtr (ConstantInt::get(Type::Int64Ty, + (uint64_t)package, + false), + PointerTy); +} +@end -- cgit v1.2.3 From 60993a5e474244a3f4f623bb81d5191f2ec50993 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Mon, 18 Aug 2008 01:20:58 +0200 Subject: LLVM compiler: Disable debugging messages. --- MLKLLVMCompiler.mm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'MLKLLVMCompiler.mm') diff --git a/MLKLLVMCompiler.mm b/MLKLLVMCompiler.mm index ae0c083..a7efa12 100644 --- a/MLKLLVMCompiler.mm +++ b/MLKLLVMCompiler.mm @@ -135,15 +135,15 @@ static Constant // JIT-compile. fn = (id (*)()) execution_engine->getPointerToFunction (function); //module->dump(); - NSLog (@"%p", fn); + //NSLog (@"%p", fn); [pool release]; - NSLog (@"Code compiled."); + //NSLog (@"Code compiled."); // Execute. lambdaForm = fn(); - NSLog (@"Closure built."); + //NSLog (@"Closure built."); return lambdaForm; } @@ -586,7 +586,7 @@ static Constant builder.CreateRet (value); - function->dump(); + //function->dump(); //NSLog (@"Verify..."); verifyFunction (*function); //NSLog (@"Optimise..."); @@ -596,7 +596,7 @@ static Constant // the function. execution_engine->getPointerToFunction (function); //NSLog (@"Done."); - function->dump(); + //function->dump(); //NSLog (@"Function built."); builder.SetInsertPoint (outerBlock); -- cgit v1.2.3 From 4447563e79bb32bbda14641733049fe544392917 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Mon, 18 Aug 2008 11:38:56 +0200 Subject: LLVM compiler: Implement dynamic variable access. --- MLKLLVMCompiler.mm | 46 ++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 42 insertions(+), 4 deletions(-) (limited to 'MLKLLVMCompiler.mm') diff --git a/MLKLLVMCompiler.mm b/MLKLLVMCompiler.mm index a7efa12..e7dc660 100644 --- a/MLKLLVMCompiler.mm +++ b/MLKLLVMCompiler.mm @@ -132,6 +132,8 @@ static Constant verifyFunction (*function); fpm->run (*function); + //function->dump(); + // JIT-compile. fn = (id (*)()) execution_engine->getPointerToFunction (function); //module->dump(); @@ -377,9 +379,26 @@ static Constant { Value *value; - if ([_context variableHeapAllocationForSymbol:_form]) + if (![_context variableIsLexical:_form]) + { + Value *mlkdynamiccontext = [_compiler insertClassLookup:@"MLKCons"]; + Value *dynctx = [_compiler insertMethodCall:@"currentContext" + onObject:mlkdynamiccontext]; + + LRETAIN (_form); // FIXME: release + Value *symbolV = builder.CreateIntToPtr (ConstantInt::get(Type::Int64Ty, + (uint64_t)_form, + false), + PointerTy); + + std::vector args (1, symbolV); + value = [_compiler insertMethodCall:@"valueForSymbol:" + onObject:dynctx + withArgumentVector:&args]; + } + else if ([_context variableHeapAllocationForSymbol:_form]) { - Value *binding = builder.CreateLoad ([_context bindingValueForSymbol:_form]); + Value *binding = builder.CreateLoad (builder.Insert ([_context bindingCellValueForSymbol:_form])); value = [_compiler insertMethodCall:@"value" onObject:binding]; } else @@ -732,10 +751,29 @@ static Constant { variable = [var_e nextObject]; value = [valueForm processForLLVM]; + if (![_context variableIsLexical:variable]) + { + Value *mlkdynamiccontext = [_compiler insertClassLookup:@"MLKCons"]; + Value *dynctx = [_compiler insertMethodCall:@"currentContext" + onObject:mlkdynamiccontext]; + + LRETAIN (variable); // FIXME: release + Value *symbolV = builder.CreateIntToPtr (ConstantInt::get(Type::Int64Ty, + (uint64_t)variable, + false), + PointerTy); + + std::vector args; + args.push_back (value); + args.push_back (symbolV); + [_compiler insertMethodCall:@"setValue:forSymbol:" + onObject:dynctx + withArgumentVector:&args]; + } if ([_context variableHeapAllocationForSymbol:variable]) { - Value *binding = builder.CreateLoad ([_context - bindingValueForSymbol:variable]); + Value *binding = builder.CreateLoad (builder.Insert ([_context + bindingCellValueForSymbol:variable])); std::vector args (1, value); [_compiler insertVoidMethodCall:@"setValue:" -- cgit v1.2.3 From 315e73730a0d1e3e00d8c567866465be8914ab03 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Mon, 18 Aug 2008 12:24:33 +0200 Subject: =?UTF-8?q?LLVM=20compiler=20=E2=80=94=20IF:=20For=20the=20return?= =?UTF-8?q?=20value,=20use=20alloca=20instead=20of=20phi.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MLKLLVMCompiler.mm | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'MLKLLVMCompiler.mm') diff --git a/MLKLLVMCompiler.mm b/MLKLLVMCompiler.mm index e7dc660..c5e463c 100644 --- a/MLKLLVMCompiler.mm +++ b/MLKLLVMCompiler.mm @@ -710,29 +710,24 @@ static Constant BasicBlock *elseBlock = BasicBlock::Create ("if_else"); BasicBlock *joinBlock = BasicBlock::Create ("if_join"); - Value *thenValue, *elseValue; - Value *test = builder.CreateICmpNE ([_conditionForm processForLLVM], ConstantPointerNull::get (PointerTy)); + Value *value = builder.CreateAlloca (PointerTy, NULL, "if_result"); builder.CreateCondBr (test, thenBlock, elseBlock); builder.SetInsertPoint (thenBlock); - thenValue = [_consequentForm processForLLVM]; + builder.CreateStore ([_consequentForm processForLLVM], value); builder.CreateBr (joinBlock); builder.SetInsertPoint (elseBlock); function->getBasicBlockList().push_back (elseBlock); - elseValue = [_alternativeForm processForLLVM]; + builder.CreateStore ([_alternativeForm processForLLVM], value); builder.CreateBr (joinBlock); builder.SetInsertPoint (joinBlock); function->getBasicBlockList().push_back (joinBlock); - PHINode *value = builder.CreatePHI (PointerTy, "if_result"); - value->addIncoming (thenValue, thenBlock); - value->addIncoming (elseValue, elseBlock); - - return value; + return builder.CreateLoad (value); } @end -- cgit v1.2.3 From 1e2602cbd46ab6587aa80f82661e6145e018d05f Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Mon, 18 Aug 2008 14:05:58 +0200 Subject: Add a couple of disabled debugging messages. --- MLKLLVMCompiler.mm | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'MLKLLVMCompiler.mm') diff --git a/MLKLLVMCompiler.mm b/MLKLLVMCompiler.mm index c5e463c..cf7cf29 100644 --- a/MLKLLVMCompiler.mm +++ b/MLKLLVMCompiler.mm @@ -379,8 +379,12 @@ static Constant { Value *value; + //NSLog (@"Symbol: %@", MLKPrintToString (_form)); + //[_compiler insertTrace:[NSString stringWithFormat:@"Symbol: %@", _form]]; + if (![_context variableIsLexical:_form]) { + //[_compiler insertTrace:@"Dynamic."]; Value *mlkdynamiccontext = [_compiler insertClassLookup:@"MLKCons"]; Value *dynctx = [_compiler insertMethodCall:@"currentContext" onObject:mlkdynamiccontext]; @@ -398,6 +402,7 @@ static Constant } else if ([_context variableHeapAllocationForSymbol:_form]) { + //[_compiler insertTrace:@"Global."]; Value *binding = builder.CreateLoad (builder.Insert ([_context bindingCellValueForSymbol:_form])); value = [_compiler insertMethodCall:@"value" onObject:binding]; } -- cgit v1.2.3 From 054dc70426505f72a1e9856c9e48c0ae3349d68d Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Mon, 18 Aug 2008 14:06:34 +0200 Subject: =?UTF-8?q?LLVM=20compiler=20=E2=80=94=20SETQ:=20Fix=20a=20typo.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MLKLLVMCompiler.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'MLKLLVMCompiler.mm') diff --git a/MLKLLVMCompiler.mm b/MLKLLVMCompiler.mm index cf7cf29..aa0ab79 100644 --- a/MLKLLVMCompiler.mm +++ b/MLKLLVMCompiler.mm @@ -770,7 +770,7 @@ static Constant onObject:dynctx withArgumentVector:&args]; } - if ([_context variableHeapAllocationForSymbol:variable]) + else if ([_context variableHeapAllocationForSymbol:variable]) { Value *binding = builder.CreateLoad (builder.Insert ([_context bindingCellValueForSymbol:variable])); -- cgit v1.2.3