summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Benkard <mulk@minimulk.mst-plus>2008-08-13 00:27:04 +0200
committerMatthias Benkard <mulk@minimulk.mst-plus>2008-08-13 00:27:04 +0200
commitd858e84c0778dc1851b3a0e324caaf0bef05f274 (patch)
tree39cbc3fdcae3e1ef926a71b683389d2a66ff5eb7
parent02f0cad354a6e2d5c990e18b0090160eb74142cc (diff)
parent5e51a3a7b0ff7044c60a57afc66738699f38e076 (diff)
Merge branch 'master' of http://matthias.benkard.de/code/mulklisp
-rw-r--r--MLKLexicalContext-MLKLLVMCompilation.h4
-rw-r--r--MLKLexicalContext-MLKLLVMCompilation.mm28
2 files changed, 32 insertions, 0 deletions
diff --git a/MLKLexicalContext-MLKLLVMCompilation.h b/MLKLexicalContext-MLKLLVMCompilation.h
index 37e80dc..0e9056b 100644
--- a/MLKLexicalContext-MLKLLVMCompilation.h
+++ b/MLKLexicalContext-MLKLLVMCompilation.h
@@ -38,5 +38,9 @@ using namespace llvm;
-(Value *) closureDataPointerForSymbol:(id)name;
-(Value *) bindingForSymbol:(id)name;
-(Value *) valueForSymbol:(id)name;
+-(void) setFunctionCell:(Value *)cellPtr forSymbol:(id)name;
+-(void) setClosureDataPointer:(Value *)pointer forSymbol:(id)name;
+-(void) setBinding:(Value *)binding forSymbol:(id)name;
+-(void) setValue:(Value *)value forSymbol:(id)name;
#endif
@end
diff --git a/MLKLexicalContext-MLKLLVMCompilation.mm b/MLKLexicalContext-MLKLLVMCompilation.mm
index 7e81ccb..8be1f24 100644
--- a/MLKLexicalContext-MLKLLVMCompilation.mm
+++ b/MLKLexicalContext-MLKLLVMCompilation.mm
@@ -72,4 +72,32 @@ using namespace std;
key:@"LLVM.variable-value"]
pointerValue];
}
+
+-(void) setFunctionCell:(Value *)cellPtr forSymbol:(id)name
+{
+ [self setDeepProperty:[NSValue valueWithPointer:cellPtr]
+ forFunction:name
+ key:@"LLVM.function-cell"];
+}
+
+-(void) setClosureDataPointer:(Value *)pointer forSymbol:(id)name
+{
+ [self setDeepProperty:[NSValue valueWithPointer:pointer]
+ forFunction:name
+ key:@"LLVM.closure-data"];
+}
+
+-(void) setBinding:(Value *)binding forSymbol:(id)name
+{
+ [self setDeepProperty:[NSValue valueWithPointer:binding]
+ forVariable:name
+ key:@"LLVM.variable-binding"];
+}
+
+-(void) setValue:(Value *)value forSymbol:(id)name
+{
+ [self setDeepProperty:[NSValue valueWithPointer:value]
+ forVariable:name
+ key:@"LLVM.variable-value"];
+}
@end