Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(785)

Side by Side Diff: runtime/vm/isolate.cc

Issue 1834763004: Track loading happening in parallel with background compilation and abort compilation if necessary. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: d Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 797 matching lines...) Expand 10 before | Expand all | Expand 10 after
808 object_id_ring_(NULL), 808 object_id_ring_(NULL),
809 tag_table_(GrowableObjectArray::null()), 809 tag_table_(GrowableObjectArray::null()),
810 deoptimized_code_array_(GrowableObjectArray::null()), 810 deoptimized_code_array_(GrowableObjectArray::null()),
811 sticky_error_(Error::null()), 811 sticky_error_(Error::null()),
812 background_compiler_(NULL), 812 background_compiler_(NULL),
813 pending_service_extension_calls_(GrowableObjectArray::null()), 813 pending_service_extension_calls_(GrowableObjectArray::null()),
814 registered_service_extension_handlers_(GrowableObjectArray::null()), 814 registered_service_extension_handlers_(GrowableObjectArray::null()),
815 metrics_list_head_(NULL), 815 metrics_list_head_(NULL),
816 compilation_allowed_(true), 816 compilation_allowed_(true),
817 all_classes_finalized_(false), 817 all_classes_finalized_(false),
818 top_level_parsing_(false),
818 next_(NULL), 819 next_(NULL),
819 pause_loop_monitor_(NULL), 820 pause_loop_monitor_(NULL),
820 cha_invalidation_gen_(kInvalidGen),
821 field_invalidation_gen_(kInvalidGen), 821 field_invalidation_gen_(kInvalidGen),
822 prefix_invalidation_gen_(kInvalidGen), 822 loading_invalidation_gen_(kInvalidGen),
823 boxed_field_list_mutex_(new Mutex()), 823 boxed_field_list_mutex_(new Mutex()),
824 boxed_field_list_(GrowableObjectArray::null()), 824 boxed_field_list_(GrowableObjectArray::null()),
825 spawn_count_monitor_(new Monitor()), 825 spawn_count_monitor_(new Monitor()),
826 spawn_count_(0) { 826 spawn_count_(0) {
827 NOT_IN_PRODUCT(FlagsCopyFrom(api_flags)); 827 NOT_IN_PRODUCT(FlagsCopyFrom(api_flags));
828 // TODO(asiva): A Thread is not available here, need to figure out 828 // TODO(asiva): A Thread is not available here, need to figure out
829 // how the vm_tag (kEmbedderTagId) can be set, these tags need to 829 // how the vm_tag (kEmbedderTagId) can be set, these tags need to
830 // move to the OSThread structure. 830 // move to the OSThread structure.
831 set_user_tag(UserTags::kDefaultUserTag); 831 set_user_tag(UserTags::kDefaultUserTag);
832 } 832 }
(...skipping 1856 matching lines...) Expand 10 before | Expand all | Expand 10 after
2689 void IsolateSpawnState::DecrementSpawnCount() { 2689 void IsolateSpawnState::DecrementSpawnCount() {
2690 ASSERT(spawn_count_monitor_ != NULL); 2690 ASSERT(spawn_count_monitor_ != NULL);
2691 ASSERT(spawn_count_ != NULL); 2691 ASSERT(spawn_count_ != NULL);
2692 MonitorLocker ml(spawn_count_monitor_); 2692 MonitorLocker ml(spawn_count_monitor_);
2693 ASSERT(*spawn_count_ > 0); 2693 ASSERT(*spawn_count_ > 0);
2694 *spawn_count_ = *spawn_count_ - 1; 2694 *spawn_count_ = *spawn_count_ - 1;
2695 ml.Notify(); 2695 ml.Notify();
2696 } 2696 }
2697 2697
2698 } // namespace dart 2698 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698