diff gen/CodeGen.d @ 117:54955003765b

merge
author Anders Halager <halager@gmail.com>
date Sun, 25 May 2008 18:20:13 +0200
parents 0cd8d6ab3f89 e89c42733e10
children 54585ad7e426
line wrap: on
line diff
--- a/gen/CodeGen.d	Sun May 25 18:19:09 2008 +0200
+++ b/gen/CodeGen.d	Sun May 25 18:20:13 2008 +0200
@@ -11,8 +11,7 @@
        ast.Exp,
        ast.Module : DModule = Module;
 
-import misc.Error,
-       basic.SmallArray;
+import basic.SmallArray;
 
 import lexer.Token;
 
@@ -282,9 +281,10 @@
             IntegerType l = cast(IntegerType) left.type;
             IntegerType r = cast(IntegerType) right.type;
             if (l is null || r is null)
-                throw error(__LINE__, PE.NoImplicitConversion)
+                assert(0, PE.NoImplicitConversion);
+            /*
                     .arg(left.type.toString)
-                    .arg(right.type.toString);
+                    .arg(right.type.toString);*/
 
             if (l.numBits() < r.numBits())
                 left = b.buildSExt(left, r, ".cast");
@@ -460,7 +460,7 @@
                         return;
                     }
                     else
-                        throw error(__LINE__, PE.VoidRetInNonVoidFunc);
+                        assert(0, PE.VoidRetInNonVoidFunc);
 
                 RValue v = genExpression(ret.exp);
 /*                if (v.type != t)
@@ -724,11 +724,6 @@
         b.buildCall(llvm_memcpy, args[], null);
     }
 
-    Error error(uint line, char[] msg)
-    {
-        return new Error(msg);
-    }
-
     /**
       Get the LLVM Type corresponding to a DType.