Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(317)

Unified Diff: runtime/vm/stub_code_ia32.cc

Issue 9484002: StepOver, StepInto, StepOut (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/stub_code_arm.cc ('k') | runtime/vm/stub_code_x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stub_code_ia32.cc
===================================================================
--- runtime/vm/stub_code_ia32.cc (revision 4638)
+++ runtime/vm/stub_code_ia32.cc (working copy)
@@ -1716,6 +1716,23 @@
}
+// TOS(0): return address (Dart code).
+void StubCode::GenerateBreakpointReturnStub(Assembler* assembler) {
+ __ EnterFrame(0);
+ __ pushl(EAX);
+ __ CallRuntimeFromStub(kBreakpointReturnHandlerRuntimeEntry);
+ __ popl(EAX);
+ __ LeaveFrame();
+
+ // Instead of returning to the patched Dart function, emulate the
+ // smashed return code pattern and return to the function's caller.
+ __ popl(ECX); // Discard return address to patched dart code.
+ // Execute function epilog code that was smashed in the Dart code.
+ __ LeaveFrame();
+ __ ret();
+}
+
+
// ECX: Inline cache data array.
// EDX: Arguments array.
// TOS(0): return address (Dart code).
@@ -1727,7 +1744,16 @@
__ popl(EDX);
__ popl(ECX);
__ LeaveFrame();
- // Now call the dynamic function.
+
+ // Find out which dispatch stub to call.
+ Label ic_cache_one_arg;
+ __ movl(EBX, FieldAddress(ECX, ICData::num_args_tested_offset()));
+ const Immediate value =
+ Immediate(reinterpret_cast<int32_t>(Smi::New(1)));
+ __ cmpl(EBX, value);
+ __ j(EQUAL, &ic_cache_one_arg, Assembler::kNearJump);
+ __ jmp(&StubCode::TwoArgsCheckInlineCacheLabel());
+ __ Bind(&ic_cache_one_arg);
__ jmp(&StubCode::OneArgCheckInlineCacheLabel());
}
« no previous file with comments | « runtime/vm/stub_code_arm.cc ('k') | runtime/vm/stub_code_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698