Mercurial > projects > dang
diff gen/CodeGen.d @ 114:3a0cd42de9cc
Removed misc/Error.d and is now using the error system all way through.
author | Anders Johnsen <skabet@gmail.com> |
---|---|
date | Sun, 25 May 2008 16:40:38 +0200 |
parents | 189c049cbfcc |
children | e89c42733e10 |
line wrap: on
line diff
--- a/gen/CodeGen.d Sun May 25 15:48:13 2008 +0200 +++ b/gen/CodeGen.d Sun May 25 16:40:38 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.