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

Unified Diff: runtime/vm/code_generator.cc

Issue 15743019: Consolidate debug stubs (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 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/code_generator.h ('k') | runtime/vm/debugger.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/code_generator.cc
===================================================================
--- runtime/vm/code_generator.cc (revision 23086)
+++ runtime/vm/code_generator.cc (working copy)
@@ -807,24 +807,20 @@
}
-// Gets called from debug stub when code reaches a breakpoint before
-// calling a closure.
-DEFINE_RUNTIME_ENTRY(BreakpointClosureHandler, 0) {
- ASSERT(arguments.ArgCount() ==
- kBreakpointClosureHandlerRuntimeEntry.argument_count());
- ASSERT(isolate->debugger() != NULL);
- isolate->debugger()->SignalBpReached();
-}
-
-
// Gets called from debug stub when code reaches a breakpoint
-// at the stub call to update the ic cache on equality comparison
-// with null.
-DEFINE_RUNTIME_ENTRY(BreakpointEqualNullHandler, 0) {
+// set on a runtime stub call.
+DEFINE_RUNTIME_ENTRY(BreakpointRuntimeHandler, 0) {
ASSERT(arguments.ArgCount() ==
- kBreakpointEqualNullHandlerRuntimeEntry.argument_count());
+ kBreakpointRuntimeHandlerRuntimeEntry.argument_count());
ASSERT(isolate->debugger() != NULL);
+ DartFrameIterator iterator;
+ StackFrame* caller_frame = iterator.NextFrame();
+ ASSERT(caller_frame != NULL);
+ uword orig_stub =
+ isolate->debugger()->GetPatchedStubAddress(caller_frame->pc());
isolate->debugger()->SignalBpReached();
+ ASSERT((orig_stub & kSmiTagMask) == kSmiTag);
+ arguments.SetReturn(Smi::Handle(reinterpret_cast<RawSmi*>(orig_stub)));
}
« no previous file with comments | « runtime/vm/code_generator.h ('k') | runtime/vm/debugger.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698