Chromium Code Reviews| Index: src/code-stub-assembler.cc |
| diff --git a/src/code-stub-assembler.cc b/src/code-stub-assembler.cc |
| index 43983ae5db7aa2cd736c23837521b04517771f18..65ee78a16d6c466f6ab0d82db7437b020c922256 100644 |
| --- a/src/code-stub-assembler.cc |
| +++ b/src/code-stub-assembler.cc |
| @@ -1823,8 +1823,13 @@ Node* CodeStubAssembler::ChangeUint32ToTagged(Node* value) { |
| if_join(this); |
| Variable var_result(this, MachineRepresentation::kTagged); |
| // If {value} > 2^31 - 1, we need to store it in a HeapNumber. |
| - Branch(Int32LessThan(value, Int32Constant(0)), &if_overflow, |
| + Node* int32_value = value; |
| + if (Is64()) { |
| + int32_value = Word32Shl(value, Int32Constant(0)); |
| + } |
| + Branch(Int32LessThan(int32_value, Int32Constant(0)), &if_overflow, |
| &if_not_overflow); |
|
Benedikt Meurer
2016/08/11 13:01:27
This should probably use Uint32LessThan with kMaxS
|
| + |
| Bind(&if_not_overflow); |
| { |
| if (Is64()) { |