Chromium Code Reviews| Index: runtime/vm/code_generator.cc |
| =================================================================== |
| --- runtime/vm/code_generator.cc (revision 23045) |
| +++ runtime/vm/code_generator.cc (working copy) |
| @@ -809,25 +809,21 @@ |
| // Gets called from debug stub when code reaches a breakpoint before |
| // calling a closure. |
|
siva
2013/05/23 01:11:26
The comment is a bit dated....
hausner
2013/05/23 18:32:12
Done.
|
| -DEFINE_RUNTIME_ENTRY(BreakpointClosureHandler, 0) { |
| +DEFINE_RUNTIME_ENTRY(BreakpointRuntimeHandler, 0) { |
| ASSERT(arguments.ArgCount() == |
| - kBreakpointClosureHandlerRuntimeEntry.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); |
|
siva
2013/05/23 01:11:26
Is this assert guaranteed to hold always?
hausner
2013/05/23 18:32:12
The assert is here to make sure we catch a case wh
|
| + arguments.SetReturn(Smi::Handle(reinterpret_cast<RawSmi*>(orig_stub))); |
| } |
| -// 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) { |
| - ASSERT(arguments.ArgCount() == |
| - kBreakpointEqualNullHandlerRuntimeEntry.argument_count()); |
| - ASSERT(isolate->debugger() != NULL); |
| - isolate->debugger()->SignalBpReached(); |
| -} |
| - |
| - |
| // Gets called from debug stub when code reaches a breakpoint. |
| DEFINE_RUNTIME_ENTRY(BreakpointStaticHandler, 0) { |
| ASSERT(arguments.ArgCount() == |