| 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 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 718 for (int i = 0; i < invoked_functions.length(); i++) { | 718 for (int i = 0; i < invoked_functions.length(); i++) { |
| 719 OS::Print("%10" Pd " x %s\n", | 719 OS::Print("%10" Pd " x %s\n", |
| 720 invoked_functions[i]->usage_counter(), | 720 invoked_functions[i]->usage_counter(), |
| 721 invoked_functions[i]->ToFullyQualifiedCString()); | 721 invoked_functions[i]->ToFullyQualifiedCString()); |
| 722 } | 722 } |
| 723 } | 723 } |
| 724 | 724 |
| 725 | 725 |
| 726 class FinalizeWeakPersistentHandlesVisitor : public HandleVisitor { | 726 class FinalizeWeakPersistentHandlesVisitor : public HandleVisitor { |
| 727 public: | 727 public: |
| 728 FinalizeWeakPersistentHandlesVisitor() { | 728 FinalizeWeakPersistentHandlesVisitor() : HandleVisitor(Isolate::Current()) { |
| 729 } | 729 } |
| 730 | 730 |
| 731 void VisitHandle(uword addr, bool is_prologue_weak) { | 731 void VisitHandle(uword addr, bool is_prologue_weak) { |
| 732 FinalizablePersistentHandle* handle = | 732 FinalizablePersistentHandle* handle = |
| 733 reinterpret_cast<FinalizablePersistentHandle*>(addr); | 733 reinterpret_cast<FinalizablePersistentHandle*>(addr); |
| 734 FinalizablePersistentHandle::Finalize(handle, is_prologue_weak); | 734 FinalizablePersistentHandle::Finalize(isolate(), handle, is_prologue_weak); |
| 735 } | 735 } |
| 736 | 736 |
| 737 private: | 737 private: |
| 738 DISALLOW_COPY_AND_ASSIGN(FinalizeWeakPersistentHandlesVisitor); | 738 DISALLOW_COPY_AND_ASSIGN(FinalizeWeakPersistentHandlesVisitor); |
| 739 }; | 739 }; |
| 740 | 740 |
| 741 | 741 |
| 742 void Isolate::Shutdown() { | 742 void Isolate::Shutdown() { |
| 743 ASSERT(this == Isolate::Current()); | 743 ASSERT(this == Isolate::Current()); |
| 744 ASSERT(top_resource() == NULL); | 744 ASSERT(top_resource() == NULL); |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1080 return func.raw(); | 1080 return func.raw(); |
| 1081 } | 1081 } |
| 1082 | 1082 |
| 1083 | 1083 |
| 1084 void IsolateSpawnState::Cleanup() { | 1084 void IsolateSpawnState::Cleanup() { |
| 1085 SwitchIsolateScope switch_scope(isolate()); | 1085 SwitchIsolateScope switch_scope(isolate()); |
| 1086 Dart::ShutdownIsolate(); | 1086 Dart::ShutdownIsolate(); |
| 1087 } | 1087 } |
| 1088 | 1088 |
| 1089 } // namespace dart | 1089 } // namespace dart |
| OLD | NEW |