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/become.h" | 10 #include "vm/become.h" |
(...skipping 15307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
15318 | 15318 |
15319 | 15319 |
15320 #if defined(DEBUG) | 15320 #if defined(DEBUG) |
15321 bool Instance::CheckIsCanonical(Thread* thread) const { | 15321 bool Instance::CheckIsCanonical(Thread* thread) const { |
15322 Zone* zone = thread->zone(); | 15322 Zone* zone = thread->zone(); |
15323 Isolate* isolate = thread->isolate(); | 15323 Isolate* isolate = thread->isolate(); |
15324 Instance& result = Instance::Handle(zone); | 15324 Instance& result = Instance::Handle(zone); |
15325 const Class& cls = Class::Handle(zone, this->clazz()); | 15325 const Class& cls = Class::Handle(zone, this->clazz()); |
15326 SafepointMutexLocker ml(isolate->constant_canonicalization_mutex()); | 15326 SafepointMutexLocker ml(isolate->constant_canonicalization_mutex()); |
15327 result ^= cls.LookupCanonicalInstance(zone, *this); | 15327 result ^= cls.LookupCanonicalInstance(zone, *this); |
| 15328 // TODO(johnmccutchan) : Temporary workaround for issue (26988). |
| 15329 if ((result.raw() != raw()) && |
| 15330 isolate->HasAttemptedReload() && |
| 15331 (GetClassId() == kImmutableArrayCid)) { |
| 15332 return true; |
| 15333 } |
15328 return (result.raw() == this->raw()); | 15334 return (result.raw() == this->raw()); |
15329 } | 15335 } |
15330 #endif // DEBUG | 15336 #endif // DEBUG |
15331 | 15337 |
15332 | 15338 |
15333 RawAbstractType* Instance::GetType() const { | 15339 RawAbstractType* Instance::GetType() const { |
15334 if (IsNull()) { | 15340 if (IsNull()) { |
15335 return Type::NullType(); | 15341 return Type::NullType(); |
15336 } | 15342 } |
15337 const Class& cls = Class::Handle(clazz()); | 15343 const Class& cls = Class::Handle(clazz()); |
(...skipping 7378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
22716 return UserTag::null(); | 22722 return UserTag::null(); |
22717 } | 22723 } |
22718 | 22724 |
22719 | 22725 |
22720 const char* UserTag::ToCString() const { | 22726 const char* UserTag::ToCString() const { |
22721 const String& tag_label = String::Handle(label()); | 22727 const String& tag_label = String::Handle(label()); |
22722 return tag_label.ToCString(); | 22728 return tag_label.ToCString(); |
22723 } | 22729 } |
22724 | 22730 |
22725 } // namespace dart | 22731 } // namespace dart |
OLD | NEW |