| 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/dart.h" | 5 #include "vm/dart.h" |
| 6 | 6 |
| 7 #include "vm/code_observers.h" | 7 #include "vm/code_observers.h" |
| 8 #include "vm/dart_api_state.h" | 8 #include "vm/dart_api_state.h" |
| 9 #include "vm/flags.h" | 9 #include "vm/flags.h" |
| 10 #include "vm/freelist.h" | 10 #include "vm/freelist.h" |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 isolate->set_init_callback_data(data); | 186 isolate->set_init_callback_data(data); |
| 187 if (FLAG_print_class_table) { | 187 if (FLAG_print_class_table) { |
| 188 isolate->class_table()->Print(); | 188 isolate->class_table()->Print(); |
| 189 } | 189 } |
| 190 return Error::null(); | 190 return Error::null(); |
| 191 } | 191 } |
| 192 | 192 |
| 193 | 193 |
| 194 void Dart::ShutdownIsolate() { | 194 void Dart::ShutdownIsolate() { |
| 195 Isolate* isolate = Isolate::Current(); | 195 Isolate* isolate = Isolate::Current(); |
| 196 if (FLAG_trace_isolates) { | |
| 197 isolate->heap()->PrintSizes(); | |
| 198 isolate->megamorphic_cache_table()->PrintSizes(); | |
| 199 } | |
| 200 void* callback_data = isolate->init_callback_data(); | 196 void* callback_data = isolate->init_callback_data(); |
| 201 isolate->Shutdown(); | 197 isolate->Shutdown(); |
| 202 delete isolate; | 198 delete isolate; |
| 203 | 199 |
| 204 Dart_IsolateShutdownCallback callback = Isolate::ShutdownCallback(); | 200 Dart_IsolateShutdownCallback callback = Isolate::ShutdownCallback(); |
| 205 if (callback != NULL) { | 201 if (callback != NULL) { |
| 206 (callback)(callback_data); | 202 (callback)(callback_data); |
| 207 } | 203 } |
| 208 } | 204 } |
| 209 | 205 |
| 210 | 206 |
| 211 } // namespace dart | 207 } // namespace dart |
| OLD | NEW |