| Index: src/arm/code-stubs-arm.cc
|
| ===================================================================
|
| --- src/arm/code-stubs-arm.cc (revision 8110)
|
| +++ src/arm/code-stubs-arm.cc (working copy)
|
| @@ -1617,6 +1617,8 @@
|
| // This stub does not handle the inlined cases (Smis, Booleans, undefined).
|
| // The stub returns zero for false, and a non-zero value for true.
|
| void ToBooleanStub::Generate(MacroAssembler* masm) {
|
| + // This stub overrides SometimesSetsUpAFrame() to return false. That means
|
| + // we cannot call anything that could cause a GC from this stub.
|
| // This stub uses VFP3 instructions.
|
| CpuFeatures::Scope scope(VFP3);
|
|
|
| @@ -1882,12 +1884,13 @@
|
| __ jmp(&heapnumber_allocated);
|
|
|
| __ bind(&slow_allocate_heapnumber);
|
| - __ EnterInternalFrame();
|
| - __ push(r0);
|
| - __ CallRuntime(Runtime::kNumberAlloc, 0);
|
| - __ mov(r1, Operand(r0));
|
| - __ pop(r0);
|
| - __ LeaveInternalFrame();
|
| + {
|
| + FrameScope scope(masm, StackFrame::INTERNAL);
|
| + __ push(r0);
|
| + __ CallRuntime(Runtime::kNumberAlloc, 0);
|
| + __ mov(r1, Operand(r0));
|
| + __ pop(r0);
|
| + }
|
|
|
| __ bind(&heapnumber_allocated);
|
| __ ldr(r3, FieldMemOperand(r0, HeapNumber::kMantissaOffset));
|
| @@ -1928,13 +1931,14 @@
|
| __ jmp(&heapnumber_allocated);
|
|
|
| __ bind(&slow_allocate_heapnumber);
|
| - __ EnterInternalFrame();
|
| - __ push(r0); // Push the heap number, not the untagged int32.
|
| - __ CallRuntime(Runtime::kNumberAlloc, 0);
|
| - __ mov(r2, r0); // Move the new heap number into r2.
|
| - // Get the heap number into r0, now that the new heap number is in r2.
|
| - __ pop(r0);
|
| - __ LeaveInternalFrame();
|
| + {
|
| + FrameScope scope(masm, StackFrame::INTERNAL);
|
| + __ push(r0); // Push the heap number, not the untagged int32.
|
| + __ CallRuntime(Runtime::kNumberAlloc, 0);
|
| + __ mov(r2, r0); // Move the new heap number into r2.
|
| + // Get the heap number into r0, now that the new heap number is in r2.
|
| + __ pop(r0);
|
| + }
|
|
|
| // Convert the heap number in r0 to an untagged integer in r1.
|
| // This can't go slow-case because it's the same number we already
|
| @@ -3163,10 +3167,11 @@
|
| __ LoadRoot(r5, Heap::kHeapNumberMapRootIndex);
|
| __ AllocateHeapNumber(r0, scratch0, scratch1, r5, &skip_cache);
|
| __ vstr(d2, FieldMemOperand(r0, HeapNumber::kValueOffset));
|
| - __ EnterInternalFrame();
|
| - __ push(r0);
|
| - __ CallRuntime(RuntimeFunction(), 1);
|
| - __ LeaveInternalFrame();
|
| + {
|
| + FrameScope scope(masm, StackFrame::INTERNAL);
|
| + __ push(r0);
|
| + __ CallRuntime(RuntimeFunction(), 1);
|
| + }
|
| __ vldr(d2, FieldMemOperand(r0, HeapNumber::kValueOffset));
|
| __ Ret();
|
|
|
| @@ -3179,14 +3184,15 @@
|
|
|
| // We return the value in d2 without adding it to the cache, but
|
| // we cause a scavenging GC so that future allocations will succeed.
|
| - __ EnterInternalFrame();
|
| + {
|
| + FrameScope scope(masm, StackFrame::INTERNAL);
|
|
|
| - // Allocate an aligned object larger than a HeapNumber.
|
| - ASSERT(4 * kPointerSize >= HeapNumber::kSize);
|
| - __ mov(scratch0, Operand(4 * kPointerSize));
|
| - __ push(scratch0);
|
| - __ CallRuntimeSaveDoubles(Runtime::kAllocateInNewSpace);
|
| - __ LeaveInternalFrame();
|
| + // Allocate an aligned object larger than a HeapNumber.
|
| + ASSERT(4 * kPointerSize >= HeapNumber::kSize);
|
| + __ mov(scratch0, Operand(4 * kPointerSize));
|
| + __ push(scratch0);
|
| + __ CallRuntimeSaveDoubles(Runtime::kAllocateInNewSpace);
|
| + }
|
| __ Ret();
|
| }
|
| }
|
| @@ -3869,10 +3875,11 @@
|
| }
|
| __ InvokeBuiltin(Builtins::INSTANCE_OF, JUMP_FUNCTION);
|
| } else {
|
| - __ EnterInternalFrame();
|
| - __ Push(r0, r1);
|
| - __ InvokeBuiltin(Builtins::INSTANCE_OF, CALL_FUNCTION);
|
| - __ LeaveInternalFrame();
|
| + {
|
| + FrameScope scope(masm, StackFrame::INTERNAL);
|
| + __ Push(r0, r1);
|
| + __ InvokeBuiltin(Builtins::INSTANCE_OF, CALL_FUNCTION);
|
| + }
|
| __ cmp(r0, Operand(0));
|
| __ LoadRoot(r0, Heap::kTrueValueRootIndex, eq);
|
| __ LoadRoot(r0, Heap::kFalseValueRootIndex, ne);
|
| @@ -6137,12 +6144,13 @@
|
| // Call the runtime system in a fresh internal frame.
|
| ExternalReference miss =
|
| ExternalReference(IC_Utility(IC::kCompareIC_Miss), masm->isolate());
|
| - __ EnterInternalFrame();
|
| - __ Push(r1, r0);
|
| - __ mov(ip, Operand(Smi::FromInt(op_)));
|
| - __ push(ip);
|
| - __ CallExternalReference(miss, 3);
|
| - __ LeaveInternalFrame();
|
| + {
|
| + FrameScope scope(masm, StackFrame::INTERNAL);
|
| + __ Push(r1, r0);
|
| + __ mov(ip, Operand(Smi::FromInt(op_)));
|
| + __ push(ip);
|
| + __ CallExternalReference(miss, 3);
|
| + }
|
| // Compute the entry point of the rewritten stub.
|
| __ add(r2, r0, Operand(Code::kHeaderSize - kHeapObjectTag));
|
| // Restore registers.
|
| @@ -6323,6 +6331,8 @@
|
|
|
|
|
| void StringDictionaryLookupStub::Generate(MacroAssembler* masm) {
|
| + // This stub overrides SometimesSetsUpAFrame() to return false. That means
|
| + // we cannot call anything that could cause a GC from this stub.
|
| // Registers:
|
| // result: StringDictionary to probe
|
| // r1: key
|
|
|