summaryrefslogtreecommitdiff
path: root/MLKLexicalContext-MLKLLVMCompilation.mm
diff options
context:
space:
mode:
authorMatthias Benkard <mulk@minimulk.mst-plus>2008-10-01 10:32:17 +0200
committerMatthias Benkard <mulk@minimulk.mst-plus>2008-10-01 10:32:17 +0200
commit8c28cc5aaeeb3546e4c113734e18285699bf779e (patch)
tree61a9c97aa9e4c70314daed2f8d17b4f2bd36b39f /MLKLexicalContext-MLKLLVMCompilation.mm
parentf3cc34c256ed93e09541d1019e00e45012075920 (diff)
LLVM compiler: Support FUNCTION.
Diffstat (limited to 'MLKLexicalContext-MLKLLVMCompilation.mm')
-rw-r--r--MLKLexicalContext-MLKLLVMCompilation.mm9
1 files changed, 9 insertions, 0 deletions
diff --git a/MLKLexicalContext-MLKLLVMCompilation.mm b/MLKLexicalContext-MLKLLVMCompilation.mm
index 37f03f5..2d525a5 100644
--- a/MLKLexicalContext-MLKLLVMCompilation.mm
+++ b/MLKLexicalContext-MLKLLVMCompilation.mm
@@ -75,6 +75,15 @@ id MLKDummyUseLLVMLexicalContext = nil;
PointerType::get(PointerType::get(PointerType::get(Type::Int8Ty, 0), 0), 0)));
}
+-(Instruction *) closureDataLengthValueForSymbol:(id)name
+{
+ // The length cell isn't really a void** but an intptr_t*.
+ return (new IntToPtrInst (ConstantInt::get(Type::Int64Ty,
+ (uint64_t)[self closureDataLengthForSymbol:name],
+ false),
+ PointerType::get(PointerType::get(Type::Int8Ty, 0), 0)));
+}
+
-(Instruction *) globalBindingValueForSymbol:(id)name
{
return (new IntToPtrInst (ConstantInt::get(Type::Int64Ty,