Mercurial > projects > ddmd
comparison dmd/Cast.d @ 191:52188e7e3fb5
Fixed deprecated features, now compiles with DMD2.058
Also changed Array allocation policy:
Now doesn't reallocate but malloc's, followed by a memcpy (no free).
(this fixes a crash while compiling druntime. Same bug in dmd)
author | korDen@korDen-pc |
---|---|
date | Sun, 25 Mar 2012 03:11:12 +0400 |
parents | af1bebfd96a4 |
children |
comparison
equal
deleted
inserted
replaced
190:80660782bffe | 191:52188e7e3fb5 |
---|---|
87 case TY.Tint32: result = cast(int)r; break; | 87 case TY.Tint32: result = cast(int)r; break; |
88 case TY.Tdchar: | 88 case TY.Tdchar: |
89 case TY.Tuns32: result = cast(uint)r; break; | 89 case TY.Tuns32: result = cast(uint)r; break; |
90 case TY.Tint64: result = cast(long)r; break; | 90 case TY.Tint64: result = cast(long)r; break; |
91 case TY.Tuns64: result = cast(ulong)r; break; | 91 case TY.Tuns64: result = cast(ulong)r; break; |
92 default: assert(false); | |
92 } | 93 } |
93 | 94 |
94 e = new IntegerExp(loc, result, type); | 95 e = new IntegerExp(loc, result, type); |
95 } | 96 } |
96 else if (type.isunsigned()) | 97 else if (type.isunsigned()) |