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

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

Issue 1877973002: Invalidate background compilation only if relevant fields were invalidated. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: sync Created 4 years, 8 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
« runtime/vm/compiler.cc ('K') | « runtime/vm/isolate.cc ('k') | no next file » | 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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/object.h" 5 #include "vm/object.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/cpu.h" 10 #include "vm/cpu.h"
(...skipping 7727 matching lines...) Expand 10 before | Expand all | Expand 10 after
7738 void Field::RegisterDependentCode(const Code& code) const { 7738 void Field::RegisterDependentCode(const Code& code) const {
7739 ASSERT(IsOriginal()); 7739 ASSERT(IsOriginal());
7740 DEBUG_ASSERT(IsMutatorOrAtSafepoint()); 7740 DEBUG_ASSERT(IsMutatorOrAtSafepoint());
7741 ASSERT(code.is_optimized()); 7741 ASSERT(code.is_optimized());
7742 FieldDependentArray a(*this); 7742 FieldDependentArray a(*this);
7743 a.Register(code); 7743 a.Register(code);
7744 } 7744 }
7745 7745
7746 7746
7747 void Field::DeoptimizeDependentCode() const { 7747 void Field::DeoptimizeDependentCode() const {
7748 ASSERT(Thread::Current()->IsMutatorThread());
7748 ASSERT(IsOriginal()); 7749 ASSERT(IsOriginal());
7749 ASSERT(Thread::Current()->IsMutatorThread()); 7750 if (FLAG_background_compilation) {
7751 Isolate::Current()->AddDisablingField(*this);
7752 }
7750 FieldDependentArray a(*this); 7753 FieldDependentArray a(*this);
7751 a.DisableCode(); 7754 a.DisableCode();
7752 } 7755 }
7753 7756
7754 7757
7755 bool Field::IsUninitialized() const { 7758 bool Field::IsUninitialized() const {
7756 const Instance& value = Instance::Handle(raw_ptr()->value_.static_value_); 7759 const Instance& value = Instance::Handle(raw_ptr()->value_.static_value_);
7757 ASSERT(value.raw() != Object::transition_sentinel().raw()); 7760 ASSERT(value.raw() != Object::transition_sentinel().raw());
7758 return value.raw() == Object::sentinel().raw(); 7761 return value.raw() == Object::sentinel().raw();
7759 } 7762 }
(...skipping 14196 matching lines...) Expand 10 before | Expand all | Expand 10 after
21956 return UserTag::null(); 21959 return UserTag::null();
21957 } 21960 }
21958 21961
21959 21962
21960 const char* UserTag::ToCString() const { 21963 const char* UserTag::ToCString() const {
21961 const String& tag_label = String::Handle(label()); 21964 const String& tag_label = String::Handle(label());
21962 return tag_label.ToCString(); 21965 return tag_label.ToCString();
21963 } 21966 }
21964 21967
21965 } // namespace dart 21968 } // namespace dart
OLDNEW
« runtime/vm/compiler.cc ('K') | « runtime/vm/isolate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698