| Index: src/arm/macro-assembler-arm.cc
|
| diff --git a/src/arm/macro-assembler-arm.cc b/src/arm/macro-assembler-arm.cc
|
| index f3cfdc76a90e64ce8e10e3b3f9f36f88bc7f3389..81a2d37643d2b018ae16d817559e0e9a0063214d 100644
|
| --- a/src/arm/macro-assembler-arm.cc
|
| +++ b/src/arm/macro-assembler-arm.cc
|
| @@ -400,10 +400,9 @@ void MacroAssembler::LoadHeapObject(Register result,
|
| Handle<HeapObject> object) {
|
| AllowDeferredHandleDereference using_raw_address;
|
| if (isolate()->heap()->InNewSpace(*object)) {
|
| - Handle<JSGlobalPropertyCell> cell =
|
| - isolate()->factory()->NewJSGlobalPropertyCell(object);
|
| + Handle<Cell> cell = isolate()->factory()->NewCell(object);
|
| mov(result, Operand(cell));
|
| - ldr(result, FieldMemOperand(result, JSGlobalPropertyCell::kValueOffset));
|
| + ldr(result, FieldMemOperand(result, Cell::kValueOffset));
|
| } else {
|
| mov(result, Operand(object));
|
| }
|
| @@ -2245,6 +2244,9 @@ static int AddressOffset(ExternalReference ref0, ExternalReference ref1) {
|
|
|
|
|
| void MacroAssembler::CallApiFunctionAndReturn(ExternalReference function,
|
| + Address function_address,
|
| + ExternalReference thunk_ref,
|
| + Register thunk_last_arg,
|
| int stack_space,
|
| bool returns_handle,
|
| int return_value_offset) {
|
| @@ -2275,11 +2277,31 @@ void MacroAssembler::CallApiFunctionAndReturn(ExternalReference function,
|
| PopSafepointRegisters();
|
| }
|
|
|
| + ASSERT(!thunk_last_arg.is(r3));
|
| + Label profiler_disabled;
|
| + Label end_profiler_check;
|
| + bool* is_profiling_flag =
|
| + isolate()->cpu_profiler()->is_profiling_address();
|
| + STATIC_ASSERT(sizeof(*is_profiling_flag) == 1);
|
| + mov(r3, Operand(reinterpret_cast<int32_t>(is_profiling_flag)));
|
| + ldrb(r3, MemOperand(r3, 0));
|
| + cmp(r3, Operand(0));
|
| + b(eq, &profiler_disabled);
|
| +
|
| + // Additional parameter is the address of the actual callback.
|
| + mov(thunk_last_arg, Operand(reinterpret_cast<int32_t>(function_address)));
|
| + mov(r3, Operand(thunk_ref));
|
| + jmp(&end_profiler_check);
|
| +
|
| + bind(&profiler_disabled);
|
| + mov(r3, Operand(function));
|
| + bind(&end_profiler_check);
|
| +
|
| // Native call returns to the DirectCEntry stub which redirects to the
|
| // return address pushed on stack (could have moved after GC).
|
| // DirectCEntry stub itself is generated early and never moves.
|
| DirectCEntryStub stub;
|
| - stub.GenerateCall(this, function);
|
| + stub.GenerateCall(this, r3);
|
|
|
| if (FLAG_log_timer_events) {
|
| FrameScope frame(this, StackFrame::MANUAL);
|
|
|