Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(184)

Side by Side Diff: runtime/vm/object.cc

Issue 150063004: Support reusable boxes for Float32x4 fields (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698