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

Side by Side Diff: runtime/vm/debugger.cc

Issue 1557533002: Eliminate excessive increment of deoptimization counters (e.g., with deep recursion of deoptimized … (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: r Created 4 years, 11 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 unified diff | Download patch
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/deferred_objects.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/debugger.h" 5 #include "vm/debugger.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 8
9 #include "vm/code_generator.h" 9 #include "vm/code_generator.h"
10 #include "vm/code_patcher.h" 10 #include "vm/code_patcher.h"
(...skipping 1426 matching lines...) Expand 10 before | Expand all | Expand 10 after
1437 StackFrame* frame, 1437 StackFrame* frame,
1438 const Code& code) { 1438 const Code& code) {
1439 ASSERT(code.is_optimized()); 1439 ASSERT(code.is_optimized());
1440 Isolate* isolate = thread->isolate(); 1440 Isolate* isolate = thread->isolate();
1441 // Create the DeoptContext for this deoptimization. 1441 // Create the DeoptContext for this deoptimization.
1442 DeoptContext* deopt_context = 1442 DeoptContext* deopt_context =
1443 new DeoptContext(frame, code, 1443 new DeoptContext(frame, code,
1444 DeoptContext::kDestIsAllocated, 1444 DeoptContext::kDestIsAllocated,
1445 NULL, 1445 NULL,
1446 NULL, 1446 NULL,
1447 true); 1447 true,
1448 false /* deoptimizing_code */);
1448 isolate->set_deopt_context(deopt_context); 1449 isolate->set_deopt_context(deopt_context);
1449 1450
1450 deopt_context->FillDestFrame(); 1451 deopt_context->FillDestFrame();
1451 deopt_context->MaterializeDeferredObjects(); 1452 deopt_context->MaterializeDeferredObjects();
1452 const Array& dest_frame = Array::Handle(thread->zone(), 1453 const Array& dest_frame = Array::Handle(thread->zone(),
1453 deopt_context->DestFrameAsArray()); 1454 deopt_context->DestFrameAsArray());
1454 1455
1455 isolate->set_deopt_context(NULL); 1456 isolate->set_deopt_context(NULL);
1456 delete deopt_context; 1457 delete deopt_context;
1457 1458
(...skipping 1784 matching lines...) Expand 10 before | Expand all | Expand 10 after
3242 } 3243 }
3243 3244
3244 3245
3245 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { 3246 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) {
3246 ASSERT(bpt->next() == NULL); 3247 ASSERT(bpt->next() == NULL);
3247 bpt->set_next(code_breakpoints_); 3248 bpt->set_next(code_breakpoints_);
3248 code_breakpoints_ = bpt; 3249 code_breakpoints_ = bpt;
3249 } 3250 }
3250 3251
3251 } // namespace dart 3252 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/deferred_objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698