Index: runtime/vm/stub_code_ia32.cc |
diff --git a/runtime/vm/stub_code_ia32.cc b/runtime/vm/stub_code_ia32.cc |
index 0473a0d5db7548fb2c22ee3146f0f5f1ff4f5ab4..83f6ba06f02946ea94a8d32b9bbe6e093fd6bb60 100644 |
--- a/runtime/vm/stub_code_ia32.cc |
+++ b/runtime/vm/stub_code_ia32.cc |
@@ -1840,10 +1840,11 @@ void StubCode::GenerateOptimizeFunctionStub(Assembler* assembler) { |
__ pushl(EBX); |
__ CallRuntime(kOptimizeInvokedFunctionRuntimeEntry, 1); |
__ popl(EAX); // Discard argument. |
- __ popl(EAX); // Get Code object |
+ __ popl(EAX); // Get Function object |
__ popl(EDX); // Restore argument descriptor. |
- __ movl(EAX, FieldAddress(EAX, Code::entry_point_offset())); |
__ LeaveFrame(); |
+ __ movl(CODE_REG, FieldAddress(EAX, Function::code_offset())); |
+ __ movl(EAX, FieldAddress(EAX, Function::entry_point_offset())); |
__ jmp(EAX); |
__ int3(); |
} |