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 15292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
15303 | 15303 |
15304 | 15304 |
15305 #if defined(DEBUG) | 15305 #if defined(DEBUG) |
15306 bool Instance::CheckIsCanonical(Thread* thread) const { | 15306 bool Instance::CheckIsCanonical(Thread* thread) const { |
15307 Zone* zone = thread->zone(); | 15307 Zone* zone = thread->zone(); |
15308 Isolate* isolate = thread->isolate(); | 15308 Isolate* isolate = thread->isolate(); |
15309 Instance& result = Instance::Handle(zone); | 15309 Instance& result = Instance::Handle(zone); |
15310 const Class& cls = Class::Handle(zone, this->clazz()); | 15310 const Class& cls = Class::Handle(zone, this->clazz()); |
15311 SafepointMutexLocker ml(isolate->constant_canonicalization_mutex()); | 15311 SafepointMutexLocker ml(isolate->constant_canonicalization_mutex()); |
15312 result ^= cls.LookupCanonicalInstance(zone, *this); | 15312 result ^= cls.LookupCanonicalInstance(zone, *this); |
15313 // Temporary workaround for issue (26988). | |
Cutch
2016/08/01 14:58:50
TODO(johnmccutchan):
siva
2016/08/02 00:03:56
Done.
| |
15314 if ((result.raw() != raw()) && | |
15315 isolate->HasAttemptedReload() && | |
15316 (GetClassId() == kImmutableArrayCid)) { | |
15317 return true; | |
15318 } | |
15313 return (result.raw() == this->raw()); | 15319 return (result.raw() == this->raw()); |
15314 } | 15320 } |
15315 #endif // DEBUG | 15321 #endif // DEBUG |
15316 | 15322 |
15317 | 15323 |
15318 RawAbstractType* Instance::GetType() const { | 15324 RawAbstractType* Instance::GetType() const { |
15319 if (IsNull()) { | 15325 if (IsNull()) { |
15320 return Type::NullType(); | 15326 return Type::NullType(); |
15321 } | 15327 } |
15322 const Class& cls = Class::Handle(clazz()); | 15328 const Class& cls = Class::Handle(clazz()); |
(...skipping 7378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
22701 return UserTag::null(); | 22707 return UserTag::null(); |
22702 } | 22708 } |
22703 | 22709 |
22704 | 22710 |
22705 const char* UserTag::ToCString() const { | 22711 const char* UserTag::ToCString() const { |
22706 const String& tag_label = String::Handle(label()); | 22712 const String& tag_label = String::Handle(label()); |
22707 return tag_label.ToCString(); | 22713 return tag_label.ToCString(); |
22708 } | 22714 } |
22709 | 22715 |
22710 } // namespace dart | 22716 } // namespace dart |
OLD | NEW |