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

Unified Diff: runtime/vm/debugger.cc

Issue 695483003: Remove saving/restoring of the context at function entry. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 2 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
Index: runtime/vm/debugger.cc
===================================================================
--- runtime/vm/debugger.cc (revision 41422)
+++ runtime/vm/debugger.cc (working copy)
@@ -1198,38 +1198,13 @@
new ActivationFrame(pc, frame->fp(), frame->sp(), code,
deopt_frame, deopt_frame_offset);
- // Is there a closure call at the current PC?
- bool is_closure_call = false;
- const PcDescriptors& pc_desc =
- PcDescriptors::Handle(isolate, code.pc_descriptors());
- PcDescriptors::Iterator iter(pc_desc, RawPcDescriptors::kClosureCall);
- while (iter.MoveNext()) {
- if (iter.Pc() == pc) {
- is_closure_call = true;
- break;
- }
- }
-
// Recover the context for this frame.
- if (is_closure_call) {
- // If the callee is a closure, we should have stored the context
- // in the current frame before making the call.
- const Context& closure_call_ctx =
- Context::Handle(isolate, activation->GetSavedCurrentContext());
- ASSERT(!closure_call_ctx.IsNull());
- activation->SetContext(closure_call_ctx);
- if (FLAG_trace_debugger_stacktrace) {
- OS::PrintErr("\tUsing closure call ctx: %s\n",
- closure_call_ctx.ToCString());
- }
- } else {
- const Context& ctx =
- Context::Handle(isolate, activation->GetSavedCurrentContext());
- ASSERT(!ctx.IsNull());
- activation->SetContext(ctx);
- if (FLAG_trace_debugger_stacktrace) {
- OS::PrintErr("\tUsing entry ctx: %s\n", ctx.ToCString());
- }
+ const Context& ctx =
+ Context::Handle(isolate, activation->GetSavedCurrentContext());
+ ASSERT(!ctx.IsNull());
+ activation->SetContext(ctx);
+ if (FLAG_trace_debugger_stacktrace) {
+ OS::PrintErr("\tUsing saved context: %s\n", ctx.ToCString());
}
if (FLAG_trace_debugger_stacktrace) {
OS::PrintErr("\tLine number: %" Pd "\n", activation->LineNumber());

Powered by Google App Engine
This is Rietveld 408576698