Mercurial > projects > dang
changeset 138:b61de188cd0d
Removed some unused code
author | Anders Halager <halager@gmail.com> |
---|---|
date | Fri, 18 Jul 2008 13:17:02 +0200 |
parents | efbf51d85f4d |
children | a22e3663de89 |
files | gen/CodeGen.d |
diffstat | 1 files changed, 1 insertions(+), 42 deletions(-) [+] |
line wrap: on
line diff
--- a/gen/CodeGen.d Fri Jul 18 13:10:53 2008 +0200 +++ b/gen/CodeGen.d Fri Jul 18 13:17:02 2008 +0200 @@ -252,6 +252,7 @@ break; default: + break; } } @@ -265,34 +266,6 @@ } /** - Takes two iX and overwrite the smaller one, with a sign-extended version - so both values can be operated on without worrying about the exact types. - - Used when adding a int and a long or similar. - - Currently unused - **/ - void sextSmallerToLarger(ref Value left, ref Value right) - { - if (left.type != right.type) - { - // try to find a convertion - only works for iX - IntegerType l = cast(IntegerType) left.type; - IntegerType r = cast(IntegerType) right.type; - if (l is null || r is null) - assert(0, PE.NoImplicitConversion); - /* - .arg(left.type.toString) - .arg(right.type.toString);*/ - - if (l.numBits() < r.numBits()) - left = b.buildSExt(left, r, ".cast"); - else - right = b.buildSExt(right, l, ".cast"); - } - } - - /** Generate a single expression. This is the most general way of generating expressions and therefore @@ -490,20 +463,6 @@ assert(0, PE.VoidRetInNonVoidFunc); RValue v = genExpression(ret.exp); -/* if (v.type != t) - { - IntegerType v_t = cast(IntegerType) v.type; - IntegerType i_t = cast(IntegerType) t; - if (v_t is null || i_t is null) - throw error(__LINE__, PE.NoImplicitConversion) - .arg(v.type.toString) - .arg(t.toString); - - if (v_t.numBits() < i_t.numBits()) - v = b.buildSExt(v, t, ".cast"); - else - v = b.buildTrunc(v, t, ".cast"); - }*/ b.buildRet(v.value); break; case StmtType.Decl: