| Index: src/ia32/macro-assembler-ia32.cc
|
| diff --git a/src/ia32/macro-assembler-ia32.cc b/src/ia32/macro-assembler-ia32.cc
|
| index 38b02a52c4c143dbf9bb502824743625061a2225..17d4aac8add74eda4d6a69bc060427b26360b065 100644
|
| --- a/src/ia32/macro-assembler-ia32.cc
|
| +++ b/src/ia32/macro-assembler-ia32.cc
|
| @@ -1973,6 +1973,8 @@ void MacroAssembler::PrepareCallApiFunction(int argc, bool returns_handle) {
|
|
|
|
|
| void MacroAssembler::CallApiFunctionAndReturn(Address function_address,
|
| + Address thunk_address,
|
| + Operand thunk_last_arg,
|
| int stack_space,
|
| bool returns_handle,
|
| int return_value_offset) {
|
| @@ -1998,8 +2000,26 @@ void MacroAssembler::CallApiFunctionAndReturn(Address function_address,
|
| PopSafepointRegisters();
|
| }
|
|
|
| +
|
| + 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(eax, Immediate(reinterpret_cast<Address>(is_profiling_flag)));
|
| + cmpb(Operand(eax, 0), 0);
|
| + j(zero, &profiler_disabled);
|
| +
|
| + // Additional parameter is the address of the actual getter function.
|
| + mov(thunk_last_arg, Immediate(function_address));
|
| + // Call the api function.
|
| + call(thunk_address, RelocInfo::RUNTIME_ENTRY);
|
| + jmp(&end_profiler_check);
|
| +
|
| + bind(&profiler_disabled);
|
| // Call the api function.
|
| call(function_address, RelocInfo::RUNTIME_ENTRY);
|
| + bind(&end_profiler_check);
|
|
|
| if (FLAG_log_timer_events) {
|
| FrameScope frame(this, StackFrame::MANUAL);
|
| @@ -2495,9 +2515,8 @@ void MacroAssembler::LoadHeapObject(Register result,
|
| Handle<HeapObject> object) {
|
| AllowDeferredHandleDereference embedding_raw_address;
|
| if (isolate()->heap()->InNewSpace(*object)) {
|
| - Handle<JSGlobalPropertyCell> cell =
|
| - isolate()->factory()->NewJSGlobalPropertyCell(object);
|
| - mov(result, Operand::Cell(cell));
|
| + Handle<Cell> cell = isolate()->factory()->NewCell(object);
|
| + mov(result, Operand::ForCell(cell));
|
| } else {
|
| mov(result, object);
|
| }
|
| @@ -2507,9 +2526,8 @@ void MacroAssembler::LoadHeapObject(Register result,
|
| void MacroAssembler::CmpHeapObject(Register reg, Handle<HeapObject> object) {
|
| AllowDeferredHandleDereference using_raw_address;
|
| if (isolate()->heap()->InNewSpace(*object)) {
|
| - Handle<JSGlobalPropertyCell> cell =
|
| - isolate()->factory()->NewJSGlobalPropertyCell(object);
|
| - cmp(reg, Operand::Cell(cell));
|
| + Handle<Cell> cell = isolate()->factory()->NewCell(object);
|
| + cmp(reg, Operand::ForCell(cell));
|
| } else {
|
| cmp(reg, object);
|
| }
|
| @@ -2519,9 +2537,8 @@ void MacroAssembler::CmpHeapObject(Register reg, Handle<HeapObject> object) {
|
| void MacroAssembler::PushHeapObject(Handle<HeapObject> object) {
|
| AllowDeferredHandleDereference using_raw_address;
|
| if (isolate()->heap()->InNewSpace(*object)) {
|
| - Handle<JSGlobalPropertyCell> cell =
|
| - isolate()->factory()->NewJSGlobalPropertyCell(object);
|
| - push(Operand::Cell(cell));
|
| + Handle<Cell> cell = isolate()->factory()->NewCell(object);
|
| + push(Operand::ForCell(cell));
|
| } else {
|
| Push(object);
|
| }
|
|
|