| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |