| 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 VM_ISOLATE_H_ | 5 #ifndef VM_ISOLATE_H_ |
| 6 #define VM_ISOLATE_H_ | 6 #define 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 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 548 | 548 |
| 549 // In precompilation we finalize all regular classes before compiling. | 549 // In precompilation we finalize all regular classes before compiling. |
| 550 bool all_classes_finalized() const { return all_classes_finalized_; } | 550 bool all_classes_finalized() const { return all_classes_finalized_; } |
| 551 void set_all_classes_finalized(bool value) { | 551 void set_all_classes_finalized(bool value) { |
| 552 all_classes_finalized_ = value; | 552 all_classes_finalized_ = value; |
| 553 } | 553 } |
| 554 | 554 |
| 555 // True during top level parsing. | 555 // True during top level parsing. |
| 556 bool IsTopLevelParsing() { | 556 bool IsTopLevelParsing() { |
| 557 const intptr_t value = | 557 const intptr_t value = |
| 558 AtomicOperations::LoadRelaxedIntPtr(&top_level_parsing_count_); | 558 AtomicOperations::LoadRelaxed(&top_level_parsing_count_); |
| 559 ASSERT(value >= 0); | 559 ASSERT(value >= 0); |
| 560 return value > 0; | 560 return value > 0; |
| 561 } | 561 } |
| 562 | 562 |
| 563 void IncrTopLevelParsingCount() { | 563 void IncrTopLevelParsingCount() { |
| 564 AtomicOperations::IncrementBy(&top_level_parsing_count_, 1); | 564 AtomicOperations::IncrementBy(&top_level_parsing_count_, 1); |
| 565 } | 565 } |
| 566 void DecrTopLevelParsingCount() { | 566 void DecrTopLevelParsingCount() { |
| 567 AtomicOperations::DecrementBy(&top_level_parsing_count_, 1); | 567 AtomicOperations::DecrementBy(&top_level_parsing_count_, 1); |
| 568 } | 568 } |
| 569 | 569 |
| 570 static const intptr_t kInvalidGen = 0; | 570 static const intptr_t kInvalidGen = 0; |
| 571 | 571 |
| 572 void IncrLoadingInvalidationGen() { | 572 void IncrLoadingInvalidationGen() { |
| 573 AtomicOperations::IncrementBy(&loading_invalidation_gen_, 1); | 573 AtomicOperations::IncrementBy(&loading_invalidation_gen_, 1); |
| 574 if (loading_invalidation_gen_ == kInvalidGen) { | 574 if (loading_invalidation_gen_ == kInvalidGen) { |
| 575 AtomicOperations::IncrementBy(&loading_invalidation_gen_, 1); | 575 AtomicOperations::IncrementBy(&loading_invalidation_gen_, 1); |
| 576 } | 576 } |
| 577 } | 577 } |
| 578 intptr_t loading_invalidation_gen() { | 578 intptr_t loading_invalidation_gen() { |
| 579 return AtomicOperations::LoadRelaxedIntPtr(&loading_invalidation_gen_); | 579 return AtomicOperations::LoadRelaxed(&loading_invalidation_gen_); |
| 580 } | 580 } |
| 581 | 581 |
| 582 // Used by background compiler which field became boxed and must trigger | 582 // Used by background compiler which field became boxed and must trigger |
| 583 // deoptimization in the mutator thread. | 583 // deoptimization in the mutator thread. |
| 584 void AddDeoptimizingBoxedField(const Field& field); | 584 void AddDeoptimizingBoxedField(const Field& field); |
| 585 // Returns Field::null() if none available in the list. | 585 // Returns Field::null() if none available in the list. |
| 586 RawField* GetDeoptimizingBoxedField(); | 586 RawField* GetDeoptimizingBoxedField(); |
| 587 | 587 |
| 588 #ifndef PRODUCT | 588 #ifndef PRODUCT |
| 589 RawObject* InvokePendingServiceExtensionCalls(); | 589 RawObject* InvokePendingServiceExtensionCalls(); |
| (...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 990 intptr_t* spawn_count_; | 990 intptr_t* spawn_count_; |
| 991 | 991 |
| 992 Dart_IsolateFlags isolate_flags_; | 992 Dart_IsolateFlags isolate_flags_; |
| 993 bool paused_; | 993 bool paused_; |
| 994 bool errors_are_fatal_; | 994 bool errors_are_fatal_; |
| 995 }; | 995 }; |
| 996 | 996 |
| 997 } // namespace dart | 997 } // namespace dart |
| 998 | 998 |
| 999 #endif // VM_ISOLATE_H_ | 999 #endif // VM_ISOLATE_H_ |
| OLD | NEW |