Chromium Code Reviews| 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 6432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 { | 6452 bool Field::IsUnboxedField() const { |
| 6453 // TODO(johnmccutchan): Add kFloat32x4Cid here. | 6453 #if defined(TARGET_ARCH_MIPS) |
| 6454 bool valid_class = (guarded_cid() == kDoubleCid); | |
| 6455 #elif defined(TARGET_ARCH_ARM) | |
| 6456 bool valid_class = (guarded_cid() == kDoubleCid) || | |
| 6457 (guarded_cid() == kFloat32x4Cid); | |
| 6458 #elif defined(TARGET_ARCH_X64) | |
| 6459 bool valid_class = (guarded_cid() == kDoubleCid) || | |
| 6460 (guarded_cid() == kFloat32x4Cid); | |
| 6461 #elif defined(TARGET_ARCH_IA32) | |
| 6462 bool valid_class = (guarded_cid() == kDoubleCid) || | |
| 6463 (guarded_cid() == kFloat32x4Cid); | |
| 6464 #endif | |
| 6454 return is_unboxing_candidate() && !is_final() && !is_nullable() && | 6465 return is_unboxing_candidate() && !is_final() && !is_nullable() && |
| 6455 ((guarded_cid() == kDoubleCid)); | 6466 valid_class; |
|
srdjan
2014/02/05 22:20:09
How about moving Field::IsUnboxedField in an archi
Cutch
2014/02/05 23:16:02
Done.
| |
| 6456 } | 6467 } |
| 6457 | 6468 |
| 6458 | 6469 |
| 6459 bool Field::IsPotentialUnboxedField() const { | 6470 bool Field::IsPotentialUnboxedField() const { |
| 6460 return is_unboxing_candidate() && | 6471 return is_unboxing_candidate() && |
| 6461 (IsUnboxedField() || (!is_final() && (guarded_cid() == kIllegalCid))); | 6472 (IsUnboxedField() || (!is_final() && (guarded_cid() == kIllegalCid))); |
| 6462 } | 6473 } |
| 6463 | 6474 |
| 6464 | 6475 |
| 6465 const char* Field::ToCString() const { | 6476 const char* Field::ToCString() const { |
| (...skipping 10861 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 17327 return "_MirrorReference"; | 17338 return "_MirrorReference"; |
| 17328 } | 17339 } |
| 17329 | 17340 |
| 17330 | 17341 |
| 17331 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const { | 17342 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const { |
| 17332 Instance::PrintToJSONStream(stream, ref); | 17343 Instance::PrintToJSONStream(stream, ref); |
| 17333 } | 17344 } |
| 17334 | 17345 |
| 17335 | 17346 |
| 17336 } // namespace dart | 17347 } // namespace dart |
| OLD | NEW |