Chromium Code Reviews| Index: sdk/lib/_internal/compiler/implementation/ssa/codegen.dart |
| =================================================================== |
| --- sdk/lib/_internal/compiler/implementation/ssa/codegen.dart (revision 30666) |
| +++ sdk/lib/_internal/compiler/implementation/ssa/codegen.dart (working copy) |
| @@ -189,18 +189,6 @@ |
| return generateAtUseSite.contains(instruction); |
| } |
| - bool isNonNegativeInt32Constant(HInstruction instruction) { |
| - if (instruction.isConstantInteger()) { |
| - HConstant constantInstruction = instruction; |
| - PrimitiveConstant primitiveConstant = constantInstruction.constant; |
| - int value = primitiveConstant.value; |
| - if (value >= 0 && value < (1 << 31)) { |
| - return true; |
| - } |
| - } |
| - return false; |
| - } |
| - |
| bool hasNonBitOpUser(HInstruction instruction, Set<HPhi> phiSet) { |
| for (HInstruction user in instruction.usedBy) { |
| if (user is HPhi) { |
| @@ -220,17 +208,8 @@ |
| // operations we do not have to convert to an unsigned |
| // integer. Also, if we are using & with a positive constant we know |
|
floitsch
2013/11/26 15:08:20
Update comment.
ngeoffray
2013/11/26 15:19:12
Done.
|
| // that the result is positive already and need no conversion. |
| - bool requiresUintConversion(HInstruction instruction) { |
| - if (instruction is HShiftRight) { |
| - return false; |
| - } |
| - if (instruction is HBitAnd) { |
| - HBitAnd bitAnd = instruction; |
| - if (isNonNegativeInt32Constant(bitAnd.left) || |
| - isNonNegativeInt32Constant(bitAnd.right)) { |
| - return false; |
| - } |
| - } |
| + bool requiresUintConversion(instruction) { |
| + if (instruction.isUInt31(compiler)) return false; |
| return hasNonBitOpUser(instruction, new Set<HPhi>()); |
| } |