| OLD | NEW | 
|     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 1104 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1115   } |  1115   } | 
|  1116   return function.raw(); |  1116   return function.raw(); | 
|  1117 } |  1117 } | 
|  1118  |  1118  | 
|  1119  |  1119  | 
|  1120 // Deoptimize all functions in the isolate. |  1120 // Deoptimize all functions in the isolate. | 
|  1121 // TODO(hausner): Actually we only need to deoptimize those functions |  1121 // TODO(hausner): Actually we only need to deoptimize those functions | 
|  1122 // that inline the function that contains the newly created breakpoint. |  1122 // that inline the function that contains the newly created breakpoint. | 
|  1123 // We currently don't have this info so we deoptimize all functions. |  1123 // We currently don't have this info so we deoptimize all functions. | 
|  1124 void Debugger::DeoptimizeWorld() { |  1124 void Debugger::DeoptimizeWorld() { | 
|  1125   // Deoptimize all functions in stack activation frames. |  1125   DeoptimizeFunctionsOnStack(); | 
|  1126   DeoptimizeAll(); |  | 
|  1127   // Iterate over all classes, deoptimize functions. |  1126   // Iterate over all classes, deoptimize functions. | 
|  1128   // TODO(hausner): Could possibly be combined with RemoveOptimizedCode() |  1127   // TODO(hausner): Could possibly be combined with RemoveOptimizedCode() | 
|  1129   const ClassTable& class_table = *isolate_->class_table(); |  1128   const ClassTable& class_table = *isolate_->class_table(); | 
|  1130   Class& cls = Class::Handle(); |  1129   Class& cls = Class::Handle(); | 
|  1131   Array& functions = Array::Handle(); |  1130   Array& functions = Array::Handle(); | 
|  1132   GrowableObjectArray& closures = GrowableObjectArray::Handle(); |  1131   GrowableObjectArray& closures = GrowableObjectArray::Handle(); | 
|  1133   Function& function = Function::Handle(); |  1132   Function& function = Function::Handle(); | 
|  1134   intptr_t num_classes = class_table.NumCids(); |  1133   intptr_t num_classes = class_table.NumCids(); | 
|  1135   for (intptr_t i = 1; i < num_classes; i++) { |  1134   for (intptr_t i = 1; i < num_classes; i++) { | 
|  1136     if (class_table.HasValidClassAt(i)) { |  1135     if (class_table.HasValidClassAt(i)) { | 
| (...skipping 1487 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  2624 } |  2623 } | 
|  2625  |  2624  | 
|  2626  |  2625  | 
|  2627 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { |  2626 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { | 
|  2628   ASSERT(bpt->next() == NULL); |  2627   ASSERT(bpt->next() == NULL); | 
|  2629   bpt->set_next(code_breakpoints_); |  2628   bpt->set_next(code_breakpoints_); | 
|  2630   code_breakpoints_ = bpt; |  2629   code_breakpoints_ = bpt; | 
|  2631 } |  2630 } | 
|  2632  |  2631  | 
|  2633 }  // namespace dart |  2632 }  // namespace dart | 
| OLD | NEW |