diff options
Diffstat (limited to 'src/compile.cpp')
-rw-r--r-- | src/compile.cpp | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/src/compile.cpp b/src/compile.cpp index 170c198..30a8a95 100644 --- a/src/compile.cpp +++ b/src/compile.cpp @@ -40,22 +40,7 @@ ASymbol::compile(CEnv& cenv) CVal AFn::compile(CEnv& cenv) { - AType* aFnT = cenv.type(this); - /*const Type* fnT = llType(aFnT); - return fnT ? static_cast<Function*>(impls.find(aFnT)) : NULL;*/ - return impls.find(aFnT); - - /*vector<const Type*> types; - types.push_back(PointerType::get(fnT, 0)); - types.push_back(PointerType::get(Type::VoidTy, 0)); - LLVMEngine* engine = reinterpret_cast<LLVMEngine*>(cenv.engine()); - IRBuilder<> builder = engine->builder; - Value* tag = ConstantInt::get(Type::Int8Ty, GC::TAG_FRAME); - StructType* tupT = StructType::get(types, false); - Value* tupSize = ConstantInt::get(Type::Int32Ty, sizeof(void*) * 2); - Value* tup = builder.CreateCall2(engine->alloc, tupSize, tag, "fn"); - Value* tupPtr = builder.CreateBitCast(tup, PointerType::get(tupT, 0)); - return tupPtr;*/ + return impls.find(cenv.type(this)); } CVal |