Second half of number alloc change accidentally omitted from
last change. Review URL: http://codereview.chromium.org/2919001 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5039 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
c205ffe05c
commit
5bc0522ad4
@ -4870,12 +4870,8 @@ void CodeGenerator::GenerateRandomHeapNumber(
|
||||
__ jmp(&heapnumber_allocated);
|
||||
|
||||
__ bind(&slow_allocate_heapnumber);
|
||||
// To allocate a heap number, and ensure that it is not a smi, we
|
||||
// call the runtime function FUnaryMinus on 0, returning the double
|
||||
// -0.0. A new, distinct heap number is returned each time.
|
||||
__ mov(r0, Operand(Smi::FromInt(0)));
|
||||
__ push(r0);
|
||||
__ CallRuntime(Runtime::kNumberUnaryMinus, 1);
|
||||
// Allocate a heap number.
|
||||
__ CallRuntime(Runtime::kNumberAlloc, 0);
|
||||
__ mov(r4, Operand(r0));
|
||||
|
||||
__ bind(&heapnumber_allocated);
|
||||
|
@ -6678,11 +6678,8 @@ void CodeGenerator::GenerateRandomHeapNumber(
|
||||
__ jmp(&heapnumber_allocated);
|
||||
|
||||
__ bind(&slow_allocate_heapnumber);
|
||||
// To allocate a heap number, and ensure that it is not a smi, we
|
||||
// call the runtime function FUnaryMinus on 0, returning the double
|
||||
// -0.0. A new, distinct heap number is returned each time.
|
||||
__ push(Immediate(Smi::FromInt(0)));
|
||||
__ CallRuntime(Runtime::kNumberUnaryMinus, 1);
|
||||
// Allocate a heap number.
|
||||
__ CallRuntime(Runtime::kNumberAlloc, 0);
|
||||
__ mov(edi, eax);
|
||||
|
||||
__ bind(&heapnumber_allocated);
|
||||
|
@ -5608,6 +5608,14 @@ static Object* Runtime_NumberUnaryMinus(Arguments args) {
|
||||
}
|
||||
|
||||
|
||||
static Object* Runtime_NumberAlloc(Arguments args) {
|
||||
NoHandleAllocation ha;
|
||||
ASSERT(args.length() == 0);
|
||||
|
||||
return Heap::NumberFromDouble(9876543210.0);
|
||||
}
|
||||
|
||||
|
||||
static Object* Runtime_NumberDiv(Arguments args) {
|
||||
NoHandleAllocation ha;
|
||||
ASSERT(args.length() == 2);
|
||||
|
@ -4664,11 +4664,8 @@ void CodeGenerator::GenerateRandomHeapNumber(
|
||||
__ jmp(&heapnumber_allocated);
|
||||
|
||||
__ bind(&slow_allocate_heapnumber);
|
||||
// To allocate a heap number, and ensure that it is not a smi, we
|
||||
// call the runtime function FUnaryMinus on 0, returning the double
|
||||
// -0.0. A new, distinct heap number is returned each time.
|
||||
__ Push(Smi::FromInt(0));
|
||||
__ CallRuntime(Runtime::kNumberUnaryMinus, 1);
|
||||
// Allocate a heap number.
|
||||
__ CallRuntime(Runtime::kNumberAlloc, 0);
|
||||
__ movq(rbx, rax);
|
||||
|
||||
__ bind(&heapnumber_allocated);
|
||||
|
Loading…
Reference in New Issue
Block a user