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

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
« no previous file with comments | « runtime/vm/intermediate_language_x64.cc ('k') | tests/language/vm/reusable_boxes_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
11 #include "vm/bigint_operations.h" 11 #include "vm/bigint_operations.h"
12 #include "vm/bootstrap.h" 12 #include "vm/bootstrap.h"
13 #include "vm/class_finalizer.h" 13 #include "vm/class_finalizer.h"
14 #include "vm/code_generator.h" 14 #include "vm/code_generator.h"
15 #include "vm/code_observers.h" 15 #include "vm/code_observers.h"
16 #include "vm/code_patcher.h" 16 #include "vm/code_patcher.h"
17 #include "vm/compiler.h" 17 #include "vm/compiler.h"
18 #include "vm/compiler_stats.h" 18 #include "vm/compiler_stats.h"
19 #include "vm/dart.h" 19 #include "vm/dart.h"
20 #include "vm/dart_api_state.h" 20 #include "vm/dart_api_state.h"
21 #include "vm/dart_entry.h" 21 #include "vm/dart_entry.h"
22 #include "vm/datastream.h" 22 #include "vm/datastream.h"
23 #include "vm/debugger.h" 23 #include "vm/debugger.h"
24 #include "vm/deopt_instructions.h" 24 #include "vm/deopt_instructions.h"
25 #include "vm/disassembler.h" 25 #include "vm/disassembler.h"
26 #include "vm/double_conversion.h" 26 #include "vm/double_conversion.h"
27 #include "vm/exceptions.h" 27 #include "vm/exceptions.h"
28 #include "vm/flow_graph_builder.h" 28 #include "vm/flow_graph_builder.h"
29 #include "vm/flow_graph_compiler.h"
29 #include "vm/growable_array.h" 30 #include "vm/growable_array.h"
30 #include "vm/heap.h" 31 #include "vm/heap.h"
31 #include "vm/intermediate_language.h" 32 #include "vm/intermediate_language.h"
32 #include "vm/intrinsifier.h" 33 #include "vm/intrinsifier.h"
33 #include "vm/longjump.h" 34 #include "vm/longjump.h"
34 #include "vm/object_id_ring.h" 35 #include "vm/object_id_ring.h"
35 #include "vm/object_store.h" 36 #include "vm/object_store.h"
36 #include "vm/parser.h" 37 #include "vm/parser.h"
37 #include "vm/reusable_handles.h" 38 #include "vm/reusable_handles.h"
38 #include "vm/runtime_entry.h" 39 #include "vm/runtime_entry.h"
(...skipping 6404 matching lines...) Expand 10 before | Expand all | Expand 10 after
6443 return Smi::Value(raw_ptr()->guarded_list_length_); 6444 return Smi::Value(raw_ptr()->guarded_list_length_);
6444 } 6445 }
6445 6446
6446 6447
6447 void Field::set_guarded_list_length(intptr_t list_length) const { 6448 void Field::set_guarded_list_length(intptr_t list_length) const {
6448 raw_ptr()->guarded_list_length_ = Smi::New(list_length); 6449 raw_ptr()->guarded_list_length_ = Smi::New(list_length);
6449 } 6450 }
6450 6451
6451 6452
6452 bool Field::IsUnboxedField() const { 6453 bool Field::IsUnboxedField() const {
6453 // TODO(johnmccutchan): Add kFloat32x4Cid here. 6454 bool valid_class = (guarded_cid() == kDoubleCid) ||
6455 (FlowGraphCompiler::SupportsUnboxedFloat32x4() &&
6456 (guarded_cid() == kFloat32x4Cid));
6454 return is_unboxing_candidate() && !is_final() && !is_nullable() && 6457 return is_unboxing_candidate() && !is_final() && !is_nullable() &&
6455 ((guarded_cid() == kDoubleCid)); 6458 valid_class;
6456 } 6459 }
6457 6460
6458 6461
6459 bool Field::IsPotentialUnboxedField() const { 6462 bool Field::IsPotentialUnboxedField() const {
6460 return is_unboxing_candidate() && 6463 return is_unboxing_candidate() &&
6461 (IsUnboxedField() || (!is_final() && (guarded_cid() == kIllegalCid))); 6464 (IsUnboxedField() || (!is_final() && (guarded_cid() == kIllegalCid)));
6462 } 6465 }
6463 6466
6464 6467
6465 const char* Field::ToCString() const { 6468 const char* Field::ToCString() const {
(...skipping 10861 matching lines...) Expand 10 before | Expand all | Expand 10 after
17327 return "_MirrorReference"; 17330 return "_MirrorReference";
17328 } 17331 }
17329 17332
17330 17333
17331 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const { 17334 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const {
17332 Instance::PrintToJSONStream(stream, ref); 17335 Instance::PrintToJSONStream(stream, ref);
17333 } 17336 }
17334 17337
17335 17338
17336 } // namespace dart 17339 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_x64.cc ('k') | tests/language/vm/reusable_boxes_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698