diff options
author | Matthias Andreas Benkard <matthias@benkard.de> | 2008-08-16 21:56:34 +0200 |
---|---|---|
committer | Matthias Andreas Benkard <matthias@benkard.de> | 2008-08-16 22:02:00 +0200 |
commit | a78119062f100f3da6e1243ce464c2819da64a2b (patch) | |
tree | 1f3a50b735f987c1a4e8cd2212c1ab196d206851 | |
parent | a3ce495d346709238b24a381ef2ab80a8cf03c95 (diff) |
MLKLexicalContext(MLKLLVMCompilation): Further fix value types.
-rw-r--r-- | MLKLexicalContext-MLKLLVMCompilation.h | 5 | ||||
-rw-r--r-- | MLKLexicalContext-MLKLLVMCompilation.mm | 12 |
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], |