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

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

Issue 2715213008: VM: Allow configuring use_field_guards on the per-isolate basis and include it into snapshot featur… (Closed)
Patch Set: Done Created 3 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
« no previous file with comments | « runtime/vm/isolate.h ('k') | runtime/vm/jit_optimizer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 708 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 return kOK; 719 return kOK;
720 } 720 }
721 721
722 722
723 void Isolate::FlagsInitialize(Dart_IsolateFlags* api_flags) { 723 void Isolate::FlagsInitialize(Dart_IsolateFlags* api_flags) {
724 api_flags->version = DART_FLAGS_CURRENT_VERSION; 724 api_flags->version = DART_FLAGS_CURRENT_VERSION;
725 api_flags->enable_type_checks = FLAG_enable_type_checks; 725 api_flags->enable_type_checks = FLAG_enable_type_checks;
726 api_flags->enable_asserts = FLAG_enable_asserts; 726 api_flags->enable_asserts = FLAG_enable_asserts;
727 api_flags->enable_error_on_bad_type = FLAG_error_on_bad_type; 727 api_flags->enable_error_on_bad_type = FLAG_error_on_bad_type;
728 api_flags->enable_error_on_bad_override = FLAG_error_on_bad_override; 728 api_flags->enable_error_on_bad_override = FLAG_error_on_bad_override;
729 api_flags->use_field_guards = FLAG_use_field_guards;
729 } 730 }
730 731
731 732
732 void Isolate::FlagsCopyTo(Dart_IsolateFlags* api_flags) const { 733 void Isolate::FlagsCopyTo(Dart_IsolateFlags* api_flags) const {
733 api_flags->version = DART_FLAGS_CURRENT_VERSION; 734 api_flags->version = DART_FLAGS_CURRENT_VERSION;
734 api_flags->enable_type_checks = type_checks(); 735 api_flags->enable_type_checks = type_checks();
735 api_flags->enable_asserts = asserts(); 736 api_flags->enable_asserts = asserts();
736 api_flags->enable_error_on_bad_type = error_on_bad_type(); 737 api_flags->enable_error_on_bad_type = error_on_bad_type();
737 api_flags->enable_error_on_bad_override = error_on_bad_override(); 738 api_flags->enable_error_on_bad_override = error_on_bad_override();
739 api_flags->use_field_guards = use_field_guards();
738 } 740 }
739 741
740 742
741 #if !defined(PRODUCT) 743 #if !defined(PRODUCT)
742 void Isolate::FlagsCopyFrom(const Dart_IsolateFlags& api_flags) { 744 void Isolate::FlagsCopyFrom(const Dart_IsolateFlags& api_flags) {
743 type_checks_ = api_flags.enable_type_checks; 745 type_checks_ = api_flags.enable_type_checks;
744 asserts_ = api_flags.enable_asserts; 746 asserts_ = api_flags.enable_asserts;
745 error_on_bad_type_ = api_flags.enable_error_on_bad_type; 747 error_on_bad_type_ = api_flags.enable_error_on_bad_type;
746 error_on_bad_override_ = api_flags.enable_error_on_bad_override; 748 error_on_bad_override_ = api_flags.enable_error_on_bad_override;
749 use_field_guards_ = api_flags.use_field_guards;
747 // Leave others at defaults. 750 // Leave others at defaults.
748 } 751 }
749 #endif // !defined(PRODUCT) 752 #endif // !defined(PRODUCT)
750 753
751 754
752 #if defined(DEBUG) 755 #if defined(DEBUG)
753 // static 756 // static
754 void BaseIsolate::AssertCurrent(BaseIsolate* isolate) { 757 void BaseIsolate::AssertCurrent(BaseIsolate* isolate) {
755 ASSERT(isolate == Isolate::Current()); 758 ASSERT(isolate == Isolate::Current());
756 } 759 }
(...skipping 2193 matching lines...) Expand 10 before | Expand all | Expand 10 after
2950 void IsolateSpawnState::DecrementSpawnCount() { 2953 void IsolateSpawnState::DecrementSpawnCount() {
2951 ASSERT(spawn_count_monitor_ != NULL); 2954 ASSERT(spawn_count_monitor_ != NULL);
2952 ASSERT(spawn_count_ != NULL); 2955 ASSERT(spawn_count_ != NULL);
2953 MonitorLocker ml(spawn_count_monitor_); 2956 MonitorLocker ml(spawn_count_monitor_);
2954 ASSERT(*spawn_count_ > 0); 2957 ASSERT(*spawn_count_ > 0);
2955 *spawn_count_ = *spawn_count_ - 1; 2958 *spawn_count_ = *spawn_count_ - 1;
2956 ml.Notify(); 2959 ml.Notify();
2957 } 2960 }
2958 2961
2959 } // namespace dart 2962 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/isolate.h ('k') | runtime/vm/jit_optimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698