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

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

Issue 1929743002: Assert that background compiler is not adding closure functions; stop background compiler when deop… (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | runtime/vm/isolate.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 1384 matching lines...) Expand 10 before | Expand all | Expand 10 after
1395 } 1395 }
1396 return function.raw(); 1396 return function.raw();
1397 } 1397 }
1398 1398
1399 1399
1400 // Deoptimize all functions in the isolate. 1400 // Deoptimize all functions in the isolate.
1401 // TODO(hausner): Actually we only need to deoptimize those functions 1401 // TODO(hausner): Actually we only need to deoptimize those functions
1402 // that inline the function that contains the newly created breakpoint. 1402 // that inline the function that contains the newly created breakpoint.
1403 // We currently don't have this info so we deoptimize all functions. 1403 // We currently don't have this info so we deoptimize all functions.
1404 void Debugger::DeoptimizeWorld() { 1404 void Debugger::DeoptimizeWorld() {
1405 BackgroundCompiler::Stop(isolate_);
1405 DeoptimizeFunctionsOnStack(); 1406 DeoptimizeFunctionsOnStack();
1406 // Iterate over all classes, deoptimize functions. 1407 // Iterate over all classes, deoptimize functions.
1407 // TODO(hausner): Could possibly be combined with RemoveOptimizedCode() 1408 // TODO(hausner): Could possibly be combined with RemoveOptimizedCode()
1408 const ClassTable& class_table = *isolate_->class_table(); 1409 const ClassTable& class_table = *isolate_->class_table();
1409 Class& cls = Class::Handle(); 1410 Class& cls = Class::Handle();
1410 Array& functions = Array::Handle(); 1411 Array& functions = Array::Handle();
1411 GrowableObjectArray& closures = GrowableObjectArray::Handle(); 1412 GrowableObjectArray& closures = GrowableObjectArray::Handle();
1412 Function& function = Function::Handle(); 1413 Function& function = Function::Handle();
1413 intptr_t num_classes = class_table.NumCids(); 1414 intptr_t num_classes = class_table.NumCids();
1414 for (intptr_t i = 1; i < num_classes; i++) { 1415 for (intptr_t i = 1; i < num_classes; i++) {
(...skipping 1938 matching lines...) Expand 10 before | Expand all | Expand 10 after
3353 3354
3354 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { 3355 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) {
3355 ASSERT(bpt->next() == NULL); 3356 ASSERT(bpt->next() == NULL);
3356 bpt->set_next(code_breakpoints_); 3357 bpt->set_next(code_breakpoints_);
3357 code_breakpoints_ = bpt; 3358 code_breakpoints_ = bpt;
3358 } 3359 }
3359 3360
3360 #endif // !PRODUCT 3361 #endif // !PRODUCT
3361 3362
3362 } // namespace dart 3363 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698