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

Side by Side Diff: runtime/vm/intermediate_language.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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/intermediate_language.h" 5 #include "vm/intermediate_language.h"
6 6
7 #include "vm/bigint_operations.h" 7 #include "vm/bigint_operations.h"
8 #include "vm/bit_vector.h" 8 #include "vm/bit_vector.h"
9 #include "vm/dart_entry.h" 9 #include "vm/dart_entry.h"
10 #include "vm/flow_graph_allocator.h" 10 #include "vm/flow_graph_allocator.h"
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 && field()->IsPotentialUnboxedField(); 150 && field()->IsPotentialUnboxedField();
151 } 151 }
152 152
153 153
154 Representation LoadFieldInstr::representation() const { 154 Representation LoadFieldInstr::representation() const {
155 if (IsUnboxedLoad()) { 155 if (IsUnboxedLoad()) {
156 const intptr_t cid = field()->UnboxedFieldCid(); 156 const intptr_t cid = field()->UnboxedFieldCid();
157 switch (cid) { 157 switch (cid) {
158 case kDoubleCid: 158 case kDoubleCid:
159 return kUnboxedDouble; 159 return kUnboxedDouble;
160 // TODO(johnmccutchan): Add kFloat32x4Cid here. 160 case kFloat32x4Cid:
161 return kUnboxedFloat32x4;
161 default: 162 default:
162 UNREACHABLE(); 163 UNREACHABLE();
163 } 164 }
164 } 165 }
165 return kTagged; 166 return kTagged;
166 } 167 }
167 168
168 169
169 bool StoreInstanceFieldInstr::IsUnboxedStore() const { 170 bool StoreInstanceFieldInstr::IsUnboxedStore() const {
170 return FLAG_unbox_double_fields && field().IsUnboxedField(); 171 return FLAG_unbox_double_fields && field().IsUnboxedField();
171 } 172 }
172 173
173 174
174 bool StoreInstanceFieldInstr::IsPotentialUnboxedStore() const { 175 bool StoreInstanceFieldInstr::IsPotentialUnboxedStore() const {
175 return FLAG_unbox_double_fields && field().IsPotentialUnboxedField(); 176 return FLAG_unbox_double_fields && field().IsPotentialUnboxedField();
176 } 177 }
177 178
178 179
179 Representation StoreInstanceFieldInstr::RequiredInputRepresentation( 180 Representation StoreInstanceFieldInstr::RequiredInputRepresentation(
180 intptr_t index) const { 181 intptr_t index) const {
181 ASSERT((index == 0) || (index == 1)); 182 ASSERT((index == 0) || (index == 1));
182 if ((index == 1) && IsUnboxedStore()) { 183 if ((index == 1) && IsUnboxedStore()) {
183 const intptr_t cid = field().UnboxedFieldCid(); 184 const intptr_t cid = field().UnboxedFieldCid();
184 switch (cid) { 185 switch (cid) {
185 case kDoubleCid: 186 case kDoubleCid:
186 return kUnboxedDouble; 187 return kUnboxedDouble;
188 case kFloat32x4Cid:
189 return kUnboxedFloat32x4;
187 default: 190 default:
188 UNREACHABLE(); 191 UNREACHABLE();
189 } 192 }
190 } 193 }
191 return kTagged; 194 return kTagged;
192 } 195 }
193 196
194 197
195 bool GuardFieldInstr::AttributesEqual(Instruction* other) const { 198 bool GuardFieldInstr::AttributesEqual(Instruction* other) const {
196 return field().raw() == other->AsGuardField()->field().raw(); 199 return field().raw() == other->AsGuardField()->field().raw();
(...skipping 2940 matching lines...) Expand 10 before | Expand all | Expand 10 after
3137 case Token::kTRUNCDIV: return 0; 3140 case Token::kTRUNCDIV: return 0;
3138 case Token::kMOD: return 1; 3141 case Token::kMOD: return 1;
3139 default: UNIMPLEMENTED(); return -1; 3142 default: UNIMPLEMENTED(); return -1;
3140 } 3143 }
3141 } 3144 }
3142 3145
3143 3146
3144 #undef __ 3147 #undef __
3145 3148
3146 } // namespace dart 3149 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698