| 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 5635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5646 " on field %s was violated.\n", | 5646 " on field %s was violated.\n", |
| 5647 function.ToFullyQualifiedCString(), | 5647 function.ToFullyQualifiedCString(), |
| 5648 ToCString()); | 5648 ToCString()); |
| 5649 } | 5649 } |
| 5650 function.SwitchToUnoptimizedCode(); | 5650 function.SwitchToUnoptimizedCode(); |
| 5651 } | 5651 } |
| 5652 } | 5652 } |
| 5653 } | 5653 } |
| 5654 | 5654 |
| 5655 | 5655 |
| 5656 bool Field::IsUninitialized() const { |
| 5657 const Instance& value = Instance::Handle(raw_ptr()->value_); |
| 5658 ASSERT(value.raw() != Object::transition_sentinel().raw()); |
| 5659 return value.raw() == Object::sentinel().raw(); |
| 5660 } |
| 5661 |
| 5662 |
| 5656 void Field::UpdateCid(intptr_t cid) const { | 5663 void Field::UpdateCid(intptr_t cid) const { |
| 5657 if (guarded_cid() == kIllegalCid) { | 5664 if (guarded_cid() == kIllegalCid) { |
| 5658 // Field is assigned first time. | 5665 // Field is assigned first time. |
| 5659 set_guarded_cid(cid); | 5666 set_guarded_cid(cid); |
| 5660 set_is_nullable(cid == kNullCid); | 5667 set_is_nullable(cid == kNullCid); |
| 5661 return; | 5668 return; |
| 5662 } | 5669 } |
| 5663 | 5670 |
| 5664 if ((cid == guarded_cid()) || ((cid == kNullCid) && is_nullable())) { | 5671 if ((cid == guarded_cid()) || ((cid == kNullCid) && is_nullable())) { |
| 5665 // Class id of the assigned value matches expected class id and nullability. | 5672 // Class id of the assigned value matches expected class id and nullability. |
| (...skipping 9499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15165 return "_MirrorReference"; | 15172 return "_MirrorReference"; |
| 15166 } | 15173 } |
| 15167 | 15174 |
| 15168 | 15175 |
| 15169 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const { | 15176 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const { |
| 15170 JSONObject jsobj(stream); | 15177 JSONObject jsobj(stream); |
| 15171 } | 15178 } |
| 15172 | 15179 |
| 15173 | 15180 |
| 15174 } // namespace dart | 15181 } // namespace dart |
| OLD | NEW |