changeset 340:351c0077d0b3 trunk

[svn r361] Removed some dead code.
author lindquist
date Sun, 13 Jul 2008 02:04:25 +0200
parents 385a18242485
children 1bb99290e03a
files gen/arrays.cpp gen/runtime.cpp gen/toir.cpp
diffstat 3 files changed, 7 insertions(+), 124 deletions(-) [+]
line wrap: on
line diff
--- 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");
--- 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()
--- 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();
 }