Index: src/arm/code-stubs-arm.cc |
=================================================================== |
--- src/arm/code-stubs-arm.cc (revision 8053) |
+++ src/arm/code-stubs-arm.cc (working copy) |
@@ -1926,11 +1926,17 @@ |
__ bind(&slow_allocate_heapnumber); |
__ EnterInternalFrame(); |
- __ push(r1); |
- __ CallRuntime(Runtime::kNumberAlloc, 0); |
- __ pop(r1); |
+ __ push(r0); // Push the heap number, not the untagged int32. |
Lasse Reichstein
2011/05/25 08:44:49
Are you sure that AllocateHeapNumber above doesn't
|
+ __ CallRuntime(Runtime::kNumberAlloc, 0); |
+ // Get the heap number into r2, now that the new heap number is in r0. |
+ __ pop(r2); |
__ LeaveInternalFrame(); |
+ // Convert the heap number in r2 to an untagged integer in r1. |
+ // This can't go slow-case because it's the same number we already |
+ // converted once again. |
+ __ ConvertToInt32(r2, r1, r3, r4, d0, slow); |
Lasse Reichstein
2011/05/25 08:44:49
Don't forget to negate the result.
(If this isn't
|
+ |
__ bind(&heapnumber_allocated); |
} |