| 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 "include/dart_native_api.h" | 8 #include "include/dart_native_api.h" |
| 9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
| 10 #include "platform/text_buffer.h" | 10 #include "platform/text_buffer.h" |
| (...skipping 1712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1723 } | 1723 } |
| 1724 } | 1724 } |
| 1725 } | 1725 } |
| 1726 | 1726 |
| 1727 | 1727 |
| 1728 void Isolate::Shutdown() { | 1728 void Isolate::Shutdown() { |
| 1729 ASSERT(this == Isolate::Current()); | 1729 ASSERT(this == Isolate::Current()); |
| 1730 StopBackgroundCompiler(); | 1730 StopBackgroundCompiler(); |
| 1731 | 1731 |
| 1732 #if defined(DEBUG) | 1732 #if defined(DEBUG) |
| 1733 if (heap_ != NULL) { | 1733 if (heap_ != NULL && FLAG_verify_on_transition) { |
| 1734 // The VM isolate keeps all objects marked. | 1734 // The VM isolate keeps all objects marked. |
| 1735 heap_->Verify(this == Dart::vm_isolate() ? kRequireMarked : kForbidMarked); | 1735 heap_->Verify(this == Dart::vm_isolate() ? kRequireMarked : kForbidMarked); |
| 1736 } | 1736 } |
| 1737 #endif // DEBUG | 1737 #endif // DEBUG |
| 1738 | 1738 |
| 1739 Thread* thread = Thread::Current(); | 1739 Thread* thread = Thread::Current(); |
| 1740 | 1740 |
| 1741 // Don't allow anymore dart code to execution on this isolate. | 1741 // Don't allow anymore dart code to execution on this isolate. |
| 1742 thread->ClearStackLimit(); | 1742 thread->ClearStackLimit(); |
| 1743 | 1743 |
| (...skipping 1230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2974 void IsolateSpawnState::DecrementSpawnCount() { | 2974 void IsolateSpawnState::DecrementSpawnCount() { |
| 2975 ASSERT(spawn_count_monitor_ != NULL); | 2975 ASSERT(spawn_count_monitor_ != NULL); |
| 2976 ASSERT(spawn_count_ != NULL); | 2976 ASSERT(spawn_count_ != NULL); |
| 2977 MonitorLocker ml(spawn_count_monitor_); | 2977 MonitorLocker ml(spawn_count_monitor_); |
| 2978 ASSERT(*spawn_count_ > 0); | 2978 ASSERT(*spawn_count_ > 0); |
| 2979 *spawn_count_ = *spawn_count_ - 1; | 2979 *spawn_count_ = *spawn_count_ - 1; |
| 2980 ml.Notify(); | 2980 ml.Notify(); |
| 2981 } | 2981 } |
| 2982 | 2982 |
| 2983 } // namespace dart | 2983 } // namespace dart |
| OLD | NEW |