Mercurial > projects > ddmd
comparison dmd/CallExp.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 | b0d41ff5e0df |
children |
comparison
equal
deleted
inserted
replaced
190:80660782bffe | 191:52188e7e3fb5 |
---|---|
1163 e1.scanForNestedRef(sc); | 1163 e1.scanForNestedRef(sc); |
1164 arrayExpressionScanForNestedRef(sc, arguments); | 1164 arrayExpressionScanForNestedRef(sc, arguments); |
1165 } | 1165 } |
1166 | 1166 |
1167 version (DMDV2) { | 1167 version (DMDV2) { |
1168 override int isLvalue() | 1168 override bool isLvalue() |
1169 { | 1169 { |
1170 // if (type.toBasetype().ty == Tstruct) | 1170 // if (type.toBasetype().ty == Tstruct) |
1171 // return 1; | 1171 // return 1; |
1172 Type tb = e1.type.toBasetype(); | 1172 Type tb = e1.type.toBasetype(); |
1173 if (tb.ty == Tfunction && (cast(TypeFunction)tb).isref) | 1173 if (tb.ty == Tfunction && (cast(TypeFunction)tb).isref) |
1174 return 1; // function returns a reference | 1174 return true; // function returns a reference |
1175 return 0; | 1175 return false; |
1176 } | 1176 } |
1177 } | 1177 } |
1178 override Expression toLvalue(Scope sc, Expression e) | 1178 override Expression toLvalue(Scope sc, Expression e) |
1179 { | 1179 { |
1180 if (isLvalue()) | 1180 if (isLvalue()) |