summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MLKLexicalContext-MLKLLVMCompilation.h5
-rw-r--r--MLKLexicalContext-MLKLLVMCompilation.mm12
2 files changed, 10 insertions, 7 deletions
diff --git a/MLKLexicalContext-MLKLLVMCompilation.h b/MLKLexicalContext-MLKLLVMCompilation.h
index eaae1f3..d42140e 100644
--- a/MLKLexicalContext-MLKLLVMCompilation.h
+++ b/MLKLexicalContext-MLKLLVMCompilation.h
@@ -26,6 +26,7 @@
#include <vector>
#include <llvm/Value.h>
#include <llvm/BasicBlock.h>
+#include <llvm/Instructions.h>
using namespace llvm;
#endif
@@ -34,8 +35,8 @@ using namespace llvm;
#ifdef __cplusplus
-(void) setVariableHeapAllocation:(BOOL)heapp forSymbol:(id)name;
-(BOOL) variableHeapAllocationForSymbol:(id)name;
--(Value *) functionCellValueForSymbol:(id)name;
--(Value *) closureDataPointerValueForSymbol:(id)name;
+-(Instruction *) functionCellValueForSymbol:(id)name;
+-(Instruction *) closureDataPointerValueForSymbol:(id)name;
-(Value *) bindingValueForSymbol:(id)name;
-(Value *) valueValueForSymbol:(id)name;
//-(void) setFunctionCellValue:(Value *)cellPtr forSymbol:(id)name;
diff --git a/MLKLexicalContext-MLKLLVMCompilation.mm b/MLKLexicalContext-MLKLLVMCompilation.mm
index 9ca18e4..744351a 100644
--- a/MLKLexicalContext-MLKLLVMCompilation.mm
+++ b/MLKLexicalContext-MLKLLVMCompilation.mm
@@ -48,19 +48,21 @@ using namespace std;
return (flag && [flag boolValue]);
}
--(Value *) functionCellValueForSymbol:(id)name
+-(Instruction *) functionCellValueForSymbol:(id)name
{
std::vector<const Type *> types (1, PointerType::get(Type::Int8Ty, 0));
return (new IntToPtrInst (ConstantInt::get(Type::Int64Ty,
(uint64_t)[self functionCellForSymbol:name],
false),
- PointerType::get(FunctionType::get(PointerType::get(Type::Int8Ty, 0),
- types,
- true),
+ PointerType::get(PointerType::get(FunctionType::get(PointerType::get(Type::Int8Ty,
+ 0),
+ types,
+ true),
+ 0),
0)));
}
--(Value *) closureDataPointerValueForSymbol:(id)name
+-(Instruction *) closureDataPointerValueForSymbol:(id)name
{
return (new IntToPtrInst (ConstantInt::get(Type::Int64Ty,
(uint64_t)[self closureDataPointerForSymbol:name],