| Index: runtime/vm/stub_code_ia32.cc
|
| diff --git a/runtime/vm/stub_code_ia32.cc b/runtime/vm/stub_code_ia32.cc
|
| index bc91284f25d78ccf6079d6453d433e1a2a382d6b..4dd59c40d199aebbbe61662f087a8982b03f9428 100644
|
| --- a/runtime/vm/stub_code_ia32.cc
|
| +++ b/runtime/vm/stub_code_ia32.cc
|
| @@ -276,8 +276,7 @@ void StubCode::GenerateCallStaticFunctionStub(Assembler* assembler) {
|
| // Remove the stub frame as we are about to jump to the dart function.
|
| __ LeaveFrame();
|
|
|
| - __ movl(ECX, FieldAddress(EAX, Code::instructions_offset()));
|
| - __ addl(ECX, Immediate(Instructions::HeaderSize() - kHeapObjectTag));
|
| + __ movl(ECX, FieldAddress(EAX, Code::entry_point_offset()));
|
| __ jmp(ECX);
|
| }
|
|
|
| @@ -296,8 +295,7 @@ void StubCode::GenerateFixCallersTargetStub(Assembler* assembler) {
|
| __ CallRuntime(kFixCallersTargetRuntimeEntry, 0);
|
| __ popl(EAX); // Get Code object.
|
| __ popl(EDX); // Restore arguments descriptor array.
|
| - __ movl(EAX, FieldAddress(EAX, Code::instructions_offset()));
|
| - __ addl(EAX, Immediate(Instructions::HeaderSize() - kHeapObjectTag));
|
| + __ movl(EAX, FieldAddress(EAX, Code::entry_point_offset()));
|
| __ LeaveFrame();
|
| __ jmp(EAX);
|
| __ int3();
|
| @@ -313,8 +311,7 @@ void StubCode::GenerateFixAllocationStubTargetStub(Assembler* assembler) {
|
| __ pushl(raw_null); // Setup space on stack for return value.
|
| __ CallRuntime(kFixAllocationStubTargetRuntimeEntry, 0);
|
| __ popl(EAX); // Get Code object.
|
| - __ movl(EAX, FieldAddress(EAX, Code::instructions_offset()));
|
| - __ addl(EAX, Immediate(Instructions::HeaderSize() - kHeapObjectTag));
|
| + __ movl(EAX, FieldAddress(EAX, Code::entry_point_offset()));
|
| __ LeaveFrame();
|
| __ jmp(EAX);
|
| __ int3();
|
| @@ -536,8 +533,7 @@ void StubCode::GenerateMegamorphicMissStub(Assembler* assembler) {
|
| __ Bind(&call_target_function);
|
| }
|
|
|
| - __ movl(EBX, FieldAddress(EAX, Function::instructions_offset()));
|
| - __ addl(EBX, Immediate(Instructions::HeaderSize() - kHeapObjectTag));
|
| + __ movl(EBX, FieldAddress(EAX, Function::entry_point_offset()));
|
| __ jmp(EBX);
|
| }
|
|
|
| @@ -1451,8 +1447,7 @@ void StubCode::GenerateNArgsCheckInlineCacheStub(
|
| __ Bind(&call_target_function);
|
| __ Comment("Call target");
|
| // EAX: Target function.
|
| - __ movl(EBX, FieldAddress(EAX, Function::instructions_offset()));
|
| - __ addl(EBX, Immediate(Instructions::HeaderSize() - kHeapObjectTag));
|
| + __ movl(EBX, FieldAddress(EAX, Function::entry_point_offset()));
|
| if (range_collection_mode == kCollectRanges) {
|
| __ EnterStubFrame();
|
| __ pushl(ECX);
|
| @@ -1645,10 +1640,7 @@ void StubCode::GenerateZeroArgsUnoptimizedStaticCallStub(Assembler* assembler) {
|
|
|
| // Get function and call it, if possible.
|
| __ movl(EAX, Address(EBX, target_offset));
|
| - __ movl(EBX, FieldAddress(EAX, Function::instructions_offset()));
|
| -
|
| - // EBX: Target instructions.
|
| - __ addl(EBX, Immediate(Instructions::HeaderSize() - kHeapObjectTag));
|
| + __ movl(EBX, FieldAddress(EAX, Function::entry_point_offset()));
|
| __ jmp(EBX);
|
|
|
| if (FLAG_support_debugger) {
|
| @@ -1696,8 +1688,7 @@ void StubCode::GenerateLazyCompileStub(Assembler* assembler) {
|
| __ popl(EDX); // Restore arguments descriptor array.
|
| __ LeaveFrame();
|
|
|
| - __ movl(EAX, FieldAddress(EAX, Function::instructions_offset()));
|
| - __ addl(EAX, Immediate(Instructions::HeaderSize() - kHeapObjectTag));
|
| + __ movl(EAX, FieldAddress(EAX, Function::entry_point_offset()));
|
| __ jmp(EAX);
|
| }
|
|
|
| @@ -1915,8 +1906,7 @@ void StubCode::GenerateOptimizeFunctionStub(Assembler* assembler) {
|
| __ popl(EAX); // Discard argument.
|
| __ popl(EAX); // Get Code object
|
| __ popl(EDX); // Restore argument descriptor.
|
| - __ movl(EAX, FieldAddress(EAX, Code::instructions_offset()));
|
| - __ addl(EAX, Immediate(Instructions::HeaderSize() - kHeapObjectTag));
|
| + __ movl(EAX, FieldAddress(EAX, Code::entry_point_offset()));
|
| __ LeaveFrame();
|
| __ jmp(EAX);
|
| __ int3();
|
| @@ -2073,10 +2063,7 @@ void StubCode::EmitMegamorphicLookup(
|
| // illegal class id was found, the target is a cache miss handler that can
|
| // be invoked as a normal Dart function.
|
| __ movl(EAX, FieldAddress(EDI, ECX, TIMES_4, base + kWordSize));
|
| - __ movl(target, FieldAddress(EAX, Function::instructions_offset()));
|
| - // TODO(srdjan): Evaluate performance impact of moving the instruction below
|
| - // to the call site, instead of having it here.
|
| - __ addl(target, Immediate(Instructions::HeaderSize() - kHeapObjectTag));
|
| + __ movl(target, FieldAddress(EAX, Function::entry_point_offset()));
|
| }
|
|
|
|
|
|
|