Index: src/code-stub-assembler.cc |
diff --git a/src/code-stub-assembler.cc b/src/code-stub-assembler.cc |
index 43983ae5db7aa2cd736c23837521b04517771f18..a4fa87ad4f0d9c6a711c3c0435fce7d8bbf9fe7e 100644 |
--- a/src/code-stub-assembler.cc |
+++ b/src/code-stub-assembler.cc |
@@ -1823,8 +1823,9 @@ 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, |
+ Branch(Uint32LessThan(Int32Constant(Smi::kMaxValue), value), &if_overflow, |
&if_not_overflow); |
+ |
Bind(&if_not_overflow); |
{ |
if (Is64()) { |