summaryrefslogtreecommitdiff
path: root/MLKLexicalContext-MLKLLVMCompilation.mm
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <matthias@benkard.de>2008-09-02 10:22:24 +0200
committerMatthias Andreas Benkard <matthias@benkard.de>2008-09-02 10:22:24 +0200
commit1e1bbbf51144d68dcef7d1abf8dab0f3ade3fb1a (patch)
tree36601b862fa547ac51e253cf0456c8e0f0e021f3 /MLKLexicalContext-MLKLLVMCompilation.mm
parent1dc0cdf8416eb0e98017d1f833ac1e9e6077fda5 (diff)
LLVM compiler: Access closure variables through the closure data pointer.
Diffstat (limited to 'MLKLexicalContext-MLKLLVMCompilation.mm')
-rw-r--r--MLKLexicalContext-MLKLLVMCompilation.mm13
1 files changed, 10 insertions, 3 deletions
diff --git a/MLKLexicalContext-MLKLLVMCompilation.mm b/MLKLexicalContext-MLKLLVMCompilation.mm
index e670151..4285d1e 100644
--- a/MLKLexicalContext-MLKLLVMCompilation.mm
+++ b/MLKLexicalContext-MLKLLVMCompilation.mm
@@ -44,7 +44,7 @@ id MLKDummyUseLLVMLexicalContext = nil;
-(BOOL) variableHeapAllocationForSymbol:(id)name;
{
- id flag = [self deepPropertyForVariable:name
+ id flag = [self propertyForVariable:name
key:@"LLVM.heap-flag"];
if (flag)
@@ -85,11 +85,18 @@ id MLKDummyUseLLVMLexicalContext = nil;
-(Value *) bindingValueForSymbol:(id)name
{
- return (Value *) [[self deepPropertyForVariable:name
+ return (Value *) [[self propertyForVariable:name
key:@"LLVM.variable-binding"]
pointerValue];
}
+-(void) locallySetBindingValue:(Value *)value forSymbol:(id)name
+{
+ [self addShallowProperty:[NSValue valueWithPointer:value]
+ forVariable:name
+ key:@"LLVM.variable-binding"];
+}
+
-(void) setBindingValue:(Value *)value forSymbol:(id)name
{
[self setDeepProperty:[NSValue valueWithPointer:value]
@@ -99,7 +106,7 @@ id MLKDummyUseLLVMLexicalContext = nil;
-(Value *) valueValueForSymbol:(id)name
{
- return (Value *) [[self deepPropertyForVariable:name
+ return (Value *) [[self propertyForVariable:name
key:@"LLVM.variable-value"]
pointerValue];
}