| 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 #ifndef RUNTIME_VM_ISOLATE_H_ | 5 #ifndef RUNTIME_VM_ISOLATE_H_ |
| 6 #define RUNTIME_VM_ISOLATE_H_ | 6 #define RUNTIME_VM_ISOLATE_H_ |
| 7 | 7 |
| 8 #include "include/dart_api.h" | 8 #include "include/dart_api.h" |
| 9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
| 10 #include "vm/atomic.h" | 10 #include "vm/atomic.h" |
| (...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 552 RawError* sticky_error() const { return sticky_error_; } | 552 RawError* sticky_error() const { return sticky_error_; } |
| 553 void clear_sticky_error(); | 553 void clear_sticky_error(); |
| 554 | 554 |
| 555 bool compilation_allowed() const { return compilation_allowed_; } | 555 bool compilation_allowed() const { return compilation_allowed_; } |
| 556 void set_compilation_allowed(bool allowed) { compilation_allowed_ = allowed; } | 556 void set_compilation_allowed(bool allowed) { compilation_allowed_ = allowed; } |
| 557 | 557 |
| 558 // In precompilation we finalize all regular classes before compiling. | 558 // In precompilation we finalize all regular classes before compiling. |
| 559 bool all_classes_finalized() const { return all_classes_finalized_; } | 559 bool all_classes_finalized() const { return all_classes_finalized_; } |
| 560 void set_all_classes_finalized(bool value) { all_classes_finalized_ = value; } | 560 void set_all_classes_finalized(bool value) { all_classes_finalized_ = value; } |
| 561 | 561 |
| 562 void set_remapping_cids(bool value) { remapping_cids_ = value; } |
| 563 |
| 562 // True during top level parsing. | 564 // True during top level parsing. |
| 563 bool IsTopLevelParsing() { | 565 bool IsTopLevelParsing() { |
| 564 const intptr_t value = | 566 const intptr_t value = |
| 565 AtomicOperations::LoadRelaxed(&top_level_parsing_count_); | 567 AtomicOperations::LoadRelaxed(&top_level_parsing_count_); |
| 566 ASSERT(value >= 0); | 568 ASSERT(value >= 0); |
| 567 return value > 0; | 569 return value > 0; |
| 568 } | 570 } |
| 569 | 571 |
| 570 void IncrTopLevelParsingCount() { | 572 void IncrTopLevelParsingCount() { |
| 571 AtomicOperations::IncrementBy(&top_level_parsing_count_, 1); | 573 AtomicOperations::IncrementBy(&top_level_parsing_count_, 1); |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 799 kRegisteredNameIndex = 0, | 801 kRegisteredNameIndex = 0, |
| 800 kRegisteredHandlerIndex, | 802 kRegisteredHandlerIndex, |
| 801 kRegisteredEntrySize | 803 kRegisteredEntrySize |
| 802 }; | 804 }; |
| 803 RawGrowableObjectArray* registered_service_extension_handlers_; | 805 RawGrowableObjectArray* registered_service_extension_handlers_; |
| 804 | 806 |
| 805 Metric* metrics_list_head_; | 807 Metric* metrics_list_head_; |
| 806 | 808 |
| 807 bool compilation_allowed_; | 809 bool compilation_allowed_; |
| 808 bool all_classes_finalized_; | 810 bool all_classes_finalized_; |
| 811 bool remapping_cids_; |
| 809 | 812 |
| 810 // Isolate list next pointer. | 813 // Isolate list next pointer. |
| 811 Isolate* next_; | 814 Isolate* next_; |
| 812 | 815 |
| 813 // Used to wake the isolate when it is in the pause event loop. | 816 // Used to wake the isolate when it is in the pause event loop. |
| 814 Monitor* pause_loop_monitor_; | 817 Monitor* pause_loop_monitor_; |
| 815 | 818 |
| 816 // Invalidation generations; used to track events occuring in parallel | 819 // Invalidation generations; used to track events occuring in parallel |
| 817 // to background compilation. The counters may overflow, which is OK | 820 // to background compilation. The counters may overflow, which is OK |
| 818 // since we check for equality to detect if an event occured. | 821 // since we check for equality to detect if an event occured. |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1002 intptr_t* spawn_count_; | 1005 intptr_t* spawn_count_; |
| 1003 | 1006 |
| 1004 Dart_IsolateFlags isolate_flags_; | 1007 Dart_IsolateFlags isolate_flags_; |
| 1005 bool paused_; | 1008 bool paused_; |
| 1006 bool errors_are_fatal_; | 1009 bool errors_are_fatal_; |
| 1007 }; | 1010 }; |
| 1008 | 1011 |
| 1009 } // namespace dart | 1012 } // namespace dart |
| 1010 | 1013 |
| 1011 #endif // RUNTIME_VM_ISOLATE_H_ | 1014 #endif // RUNTIME_VM_ISOLATE_H_ |
| OLD | NEW |