# HG changeset patch # User lindquist # Date 1215907465 -7200 # Node ID 351c0077d0b3be158fb424870005dd863b350abb # Parent 385a18242485b66fe363cc6c14ce96b83703f6c6 [svn r361] Removed some dead code. diff -r 385a18242485 -r 351c0077d0b3 gen/arrays.cpp --- a/gen/arrays.cpp Sun Jul 13 01:29:49 2008 +0200 +++ b/gen/arrays.cpp Sun Jul 13 02:04:25 2008 +0200 @@ -106,21 +106,6 @@ ////////////////////////////////////////////////////////////////////////////////////////// -typedef const LLType* constLLVMTypeP; - -static size_t checkRectArrayInit(const LLType* pt, const LLType* t) -{ - const LLArrayType* arrty = isaArray(pt); - if (pt != t && arrty) { - size_t n = checkRectArrayInit(arrty->getElementType(), t); - size_t ne = arrty->getNumElements(); - if (n) return n * ne; - return ne; - } - - return 0; -} - void DtoArrayInit(DValue* array, DValue* value) { Logger::println("DtoArrayInit"); diff -r 385a18242485 -r 351c0077d0b3 gen/runtime.cpp --- a/gen/runtime.cpp Sun Jul 13 01:29:49 2008 +0200 +++ b/gen/runtime.cpp Sun Jul 13 02:04:25 2008 +0200 @@ -31,35 +31,6 @@ LLVM_D_BuildRuntimeModule(); return true; - - /* - if (!global.params.runtimeImppath) { - error("You must set the runtime import path with -E"); - fatal(); - } - std::string filename(global.params.runtimeImppath); - filename.append("/llvmdcore.bc"); - llvm::MemoryBuffer* buffer = llvm::MemoryBuffer::getFile(filename.c_str(), filename.length()); - if (!buffer) { - Logger::println("Failed to load runtime library from disk"); - runtime_failed = true; - return false; - } - - std::string errstr; - bool retval = false; - M = llvm::ParseBitcodeFile(buffer, &errstr); - if (M) { - retval = true; - } - else { - Logger::println("Failed to load runtime: %s", errstr.c_str()); - runtime_failed = true; - } - - delete buffer; - return retval; - */ } void LLVM_D_FreeRuntime() diff -r 385a18242485 -r 351c0077d0b3 gen/toir.cpp --- a/gen/toir.cpp Sun Jul 13 01:29:49 2008 +0200 +++ b/gen/toir.cpp Sun Jul 13 02:04:25 2008 +0200 @@ -2702,91 +2702,17 @@ ////////////////////////////////////////////////////////////////////////////////////////// #define STUB(x) DValue *x::toElem(IRState * p) {error("Exp type "#x" not implemented: %s", toChars()); fatal(); return 0; } -//STUB(IdentityExp); -//STUB(CondExp); -//STUB(EqualExp); -//STUB(InExp); -//STUB(CmpExp); -//STUB(AndAndExp); -//STUB(OrOrExp); -//STUB(AndExp); -//STUB(AndAssignExp); -//STUB(OrExp); -//STUB(OrAssignExp); -//STUB(XorExp); -//STUB(XorAssignExp); -//STUB(ShrExp); -//STUB(ShrAssignExp); -//STUB(ShlExp); -//STUB(ShlAssignExp); -//STUB(UshrExp); -//STUB(UshrAssignExp); -//STUB(DivExp); -//STUB(DivAssignExp); -//STUB(MulExp); -//STUB(MulAssignExp); -//STUB(ModExp); -//STUB(ModAssignExp); -//STUB(CatExp); -//STUB(CatAssignExp); -//STUB(AddExp); -//STUB(AddAssignExp); STUB(Expression); -//STUB(MinExp); -//STUB(MinAssignExp); -//STUB(PostExp); -//STUB(NullExp); -//STUB(ThisExp); -//STUB(CallExp); STUB(DotTypeExp); STUB(TypeDotIdExp); -//STUB(DotVarExp); -//STUB(AssertExp); -//STUB(FuncExp); -//STUB(DelegateExp); -//STUB(VarExp); -//STUB(DeclarationExp); -//STUB(NewExp); -//STUB(SymOffExp); STUB(ScopeExp); -//STUB(AssignExp); - STUB(TypeExp); -//STUB(RealExp); -//STUB(ComplexExp); -//STUB(StringExp); -//STUB(IntegerExp); STUB(BoolExp); - -//STUB(NotExp); -//STUB(ComExp); -//STUB(NegExp); -//STUB(PtrExp); -//STUB(AddrExp); -//STUB(SliceExp); -//STUB(CastExp); -//STUB(DeleteExp); -//STUB(IndexExp); -//STUB(CommaExp); -//STUB(ArrayLengthExp); -//STUB(HaltExp); -//STUB(RemoveExp); -//STUB(ArrayLiteralExp); -//STUB(AssocArrayLiteralExp); -//STUB(StructLiteralExp); STUB(TupleExp); #define CONSTSTUB(x) LLConstant* x::toConstElem(IRState * p) {error("const Exp type "#x" not implemented: '%s' type: '%s'", toChars(), type->toChars()); fatal(); return NULL; } CONSTSTUB(Expression); -//CONSTSTUB(IntegerExp); -//CONSTSTUB(RealExp); -//CONSTSTUB(NullExp); -//CONSTSTUB(ComplexExp); -//CONSTSTUB(StringExp); -//CONSTSTUB(VarExp); -//CONSTSTUB(ArrayLiteralExp); CONSTSTUB(AssocArrayLiteralExp); -//CONSTSTUB(StructLiteralExp); unsigned Type::totym() { return 0; } @@ -2947,17 +2873,18 @@ return 0; } -void obj_includelib(char*){} - -void -backend_init() +void obj_includelib(char*) +{ +// FIXME: we want to support pragma(lib) +} + +void backend_init() { // now lazily loaded //LLVM_D_InitRuntime(); } -void -backend_term() +void backend_term() { LLVM_D_FreeRuntime(); }