summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MLKForm.h1
-rw-r--r--MLKForm.m5
-rw-r--r--MLKLLVMCompiler.mm4
3 files changed, 8 insertions, 2 deletions
diff --git a/MLKForm.h b/MLKForm.h
index a62089d..24d4920 100644
--- a/MLKForm.h
+++ b/MLKForm.h
@@ -44,6 +44,7 @@
-(NSArray *) subforms;
-(NSSet *) freeVariables;
+-(MLKLexicalContext *) context;
@end
diff --git a/MLKForm.m b/MLKForm.m
index 3821886..94df172 100644
--- a/MLKForm.m
+++ b/MLKForm.m
@@ -100,6 +100,11 @@
return freeVariables;
}
+-(MLKLexicalContext *) context
+{
+ return _context;
+}
+
-(void) dealloc
{
LDESTROY (_form);
diff --git a/MLKLLVMCompiler.mm b/MLKLLVMCompiler.mm
index 83246c1..89795b1 100644
--- a/MLKLLVMCompiler.mm
+++ b/MLKLLVMCompiler.mm
@@ -227,8 +227,8 @@ static Constant
for (j = 0; j < [freeVariables count]; j++)
{
id variable = [freeVariables objectAtIndex:j];
- [variable setVariableHeapAllocation:YES
- forSymbol:variable];
+ [[form context] setVariableHeapAllocation:YES
+ forSymbol:variable];
}
}
}