diff options
author | Matthias Benkard <mulk@minimulk.mst-plus> | 2008-08-18 16:13:54 +0200 |
---|---|---|
committer | Matthias Benkard <mulk@minimulk.mst-plus> | 2008-08-18 16:13:54 +0200 |
commit | eec88254d7e37ecb07b0503a9e87abfb81ce2460 (patch) | |
tree | d96aa76e24b4b090383623134b35eaf6a10f3431 /MLKLexicalContext-MLKLLVMCompilation.mm | |
parent | 5cd4de577c08637cb5d78d1c3376b1ff80e74065 (diff) | |
parent | 054dc70426505f72a1e9856c9e48c0ae3349d68d (diff) |
Merge branch 'master' of http://matthias.benkard.de/code/mulklisp
Diffstat (limited to 'MLKLexicalContext-MLKLLVMCompilation.mm')
-rw-r--r-- | MLKLexicalContext-MLKLLVMCompilation.mm | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/MLKLexicalContext-MLKLLVMCompilation.mm b/MLKLexicalContext-MLKLLVMCompilation.mm index 744351a..22d211d 100644 --- a/MLKLexicalContext-MLKLLVMCompilation.mm +++ b/MLKLexicalContext-MLKLLVMCompilation.mm @@ -45,7 +45,11 @@ using namespace std; id flag = [self deepPropertyForVariable:name key:@"LLVM.heap-flag"]; - return (flag && [flag boolValue]); + if (flag) + return [flag boolValue]; + else + return (![self contextForVariable:name] + || [self contextForVariable:name] == [MLKLexicalContext globalContext]); } -(Instruction *) functionCellValueForSymbol:(id)name @@ -70,12 +74,12 @@ using namespace std; PointerType::get(PointerType::get(Type::Int8Ty, 0), 0))); } --(Value *) bindingValueForSymbol:(id)name +-(Instruction *) bindingCellValueForSymbol:(id)name { return (new IntToPtrInst (ConstantInt::get(Type::Int64Ty, - (uint64_t)[self bindingForSymbol:name], + (uint64_t)[self bindingCellForSymbol:name], false), - PointerType::get(Type::Int8Ty, 0))); + PointerType::get(PointerType::get(Type::Int8Ty, 0), 0))); } -(Value *) valueValueForSymbol:(id)name |