OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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/isolate.h" | 5 #include "vm/isolate.h" |
6 | 6 |
7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
9 #include "platform/json.h" | 9 #include "platform/json.h" |
10 #include "lib/mirrors.h" | 10 #include "lib/mirrors.h" |
(...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
778 // Fail fast if anybody tries to post any more messsages to this isolate. | 778 // Fail fast if anybody tries to post any more messsages to this isolate. |
779 delete message_handler(); | 779 delete message_handler(); |
780 set_message_handler(NULL); | 780 set_message_handler(NULL); |
781 | 781 |
782 // Dump all accumalated timer data for the isolate. | 782 // Dump all accumalated timer data for the isolate. |
783 timer_list_.ReportTimers(); | 783 timer_list_.ReportTimers(); |
784 if (FLAG_report_usage_count) { | 784 if (FLAG_report_usage_count) { |
785 PrintInvokedFunctions(); | 785 PrintInvokedFunctions(); |
786 } | 786 } |
787 | 787 |
788 if (FLAG_print_coverage) { | 788 // Write out the coverage data if collection has been enabled. |
789 CodeCoverage::Print(this); | 789 CodeCoverage::Write(this); |
790 } | |
791 | 790 |
792 // Finalize any weak persistent handles with a non-null referent. | 791 // Finalize any weak persistent handles with a non-null referent. |
793 FinalizeWeakPersistentHandlesVisitor visitor; | 792 FinalizeWeakPersistentHandlesVisitor visitor; |
794 api_state()->weak_persistent_handles().VisitHandles(&visitor); | 793 api_state()->weak_persistent_handles().VisitHandles(&visitor); |
795 | 794 |
796 CompilerStats::Print(); | 795 CompilerStats::Print(); |
797 // TODO(asiva): Move this code to Dart::Cleanup when we have that method | 796 // TODO(asiva): Move this code to Dart::Cleanup when we have that method |
798 // as the cleanup for Dart::InitOnce. | 797 // as the cleanup for Dart::InitOnce. |
799 CodeObservers::DeleteAll(); | 798 CodeObservers::DeleteAll(); |
800 if (FLAG_trace_isolates) { | 799 if (FLAG_trace_isolates) { |
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1188 return func.raw(); | 1187 return func.raw(); |
1189 } | 1188 } |
1190 | 1189 |
1191 | 1190 |
1192 void IsolateSpawnState::Cleanup() { | 1191 void IsolateSpawnState::Cleanup() { |
1193 SwitchIsolateScope switch_scope(isolate()); | 1192 SwitchIsolateScope switch_scope(isolate()); |
1194 Dart::ShutdownIsolate(); | 1193 Dart::ShutdownIsolate(); |
1195 } | 1194 } |
1196 | 1195 |
1197 } // namespace dart | 1196 } // namespace dart |
OLD | NEW |