| Index: runtime/vm/stub_code_ia32.cc
|
| ===================================================================
|
| --- runtime/vm/stub_code_ia32.cc (revision 2087)
|
| +++ runtime/vm/stub_code_ia32.cc (working copy)
|
| @@ -1551,14 +1551,19 @@
|
| // TOS(0): return address (Dart code).
|
| void StubCode::GenerateBreakpointStaticStub(Assembler* assembler) {
|
| __ EnterFrame(0);
|
| + __ pushl(EDX);
|
| __ pushl(ECX);
|
| - __ pushl(EDX);
|
| - __ CallRuntimeFromStub(kBreakpointHandlerRuntimeEntry);
|
| + __ CallRuntimeFromStub(kBreakpointStaticHandlerRuntimeEntry);
|
| + __ popl(ECX);
|
| __ popl(EDX);
|
| - __ popl(ECX);
|
| __ LeaveFrame();
|
| - // Now call the static function.
|
| - __ jmp(&StubCode::CallStaticFunctionLabel());
|
| +
|
| + // Now call the static function. The breakpoint handler function
|
| + // ensures that the call target is compiled.
|
| + __ movl(EAX, FieldAddress(ECX, Function::code_offset()));
|
| + __ movl(ECX, FieldAddress(EAX, Code::instructions_offset()));
|
| + __ addl(ECX, Immediate(Instructions::HeaderSize() - kHeapObjectTag));
|
| + __ jmp(ECX);
|
| }
|
|
|
|
|
| @@ -1569,7 +1574,7 @@
|
| __ EnterFrame(0);
|
| __ pushl(ECX);
|
| __ pushl(EDX);
|
| - __ CallRuntimeFromStub(kBreakpointHandlerRuntimeEntry);
|
| + __ CallRuntimeFromStub(kBreakpointDynamicHandlerRuntimeEntry);
|
| __ popl(EDX);
|
| __ popl(ECX);
|
| __ LeaveFrame();
|
|
|