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 6431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6442 intptr_t Field::guarded_list_length() const { | 6442 intptr_t Field::guarded_list_length() const { |
6443 return Smi::Value(raw_ptr()->guarded_list_length_); | 6443 return Smi::Value(raw_ptr()->guarded_list_length_); |
6444 } | 6444 } |
6445 | 6445 |
6446 | 6446 |
6447 void Field::set_guarded_list_length(intptr_t list_length) const { | 6447 void Field::set_guarded_list_length(intptr_t list_length) const { |
6448 raw_ptr()->guarded_list_length_ = Smi::New(list_length); | 6448 raw_ptr()->guarded_list_length_ = Smi::New(list_length); |
6449 } | 6449 } |
6450 | 6450 |
6451 | 6451 |
6452 bool Field::IsUnboxedField() const { | |
6453 // TODO(johnmccutchan): Add kFloat32x4Cid here. | |
6454 return is_unboxing_candidate() && !is_final() && !is_nullable() && | |
6455 ((guarded_cid() == kDoubleCid)); | |
6456 } | |
6457 | |
6458 | |
6459 bool Field::IsPotentialUnboxedField() const { | 6452 bool Field::IsPotentialUnboxedField() const { |
6460 return is_unboxing_candidate() && | 6453 return is_unboxing_candidate() && |
6461 (IsUnboxedField() || (!is_final() && (guarded_cid() == kIllegalCid))); | 6454 (IsUnboxedField() || (!is_final() && (guarded_cid() == kIllegalCid))); |
6462 } | 6455 } |
6463 | 6456 |
6464 | 6457 |
6465 const char* Field::ToCString() const { | 6458 const char* Field::ToCString() const { |
6466 if (IsNull()) { | 6459 if (IsNull()) { |
6467 return "Field::null"; | 6460 return "Field::null"; |
6468 } | 6461 } |
(...skipping 10858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
17327 return "_MirrorReference"; | 17320 return "_MirrorReference"; |
17328 } | 17321 } |
17329 | 17322 |
17330 | 17323 |
17331 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const { | 17324 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const { |
17332 Instance::PrintToJSONStream(stream, ref); | 17325 Instance::PrintToJSONStream(stream, ref); |
17333 } | 17326 } |
17334 | 17327 |
17335 | 17328 |
17336 } // namespace dart | 17329 } // namespace dart |
OLD | NEW |