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

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

Issue 179443004: VM: Replace StoreVMField with StoreInstanceField. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 9 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.h ('k') | runtime/vm/intermediate_language_arm.cc » ('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) 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/cpu.h" 9 #include "vm/cpu.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 return kUnboxedFloat32x4; 164 return kUnboxedFloat32x4;
165 default: 165 default:
166 UNREACHABLE(); 166 UNREACHABLE();
167 } 167 }
168 } 168 }
169 return kTagged; 169 return kTagged;
170 } 170 }
171 171
172 172
173 bool StoreInstanceFieldInstr::IsUnboxedStore() const { 173 bool StoreInstanceFieldInstr::IsUnboxedStore() const {
174 return FLAG_unbox_numeric_fields && field().IsUnboxedField(); 174 return FLAG_unbox_numeric_fields
175 && !field().IsNull()
176 && field().IsUnboxedField();
175 } 177 }
176 178
177 179
178 bool StoreInstanceFieldInstr::IsPotentialUnboxedStore() const { 180 bool StoreInstanceFieldInstr::IsPotentialUnboxedStore() const {
179 return FLAG_unbox_numeric_fields && field().IsPotentialUnboxedField(); 181 return FLAG_unbox_numeric_fields
182 && !field().IsNull()
183 && field().IsPotentialUnboxedField();
180 } 184 }
181 185
182 186
183 Representation StoreInstanceFieldInstr::RequiredInputRepresentation( 187 Representation StoreInstanceFieldInstr::RequiredInputRepresentation(
184 intptr_t index) const { 188 intptr_t index) const {
185 ASSERT((index == 0) || (index == 1)); 189 ASSERT((index == 0) || (index == 1));
186 if ((index == 1) && IsUnboxedStore()) { 190 if ((index == 1) && IsUnboxedStore()) {
187 const intptr_t cid = field().UnboxedFieldCid(); 191 const intptr_t cid = field().UnboxedFieldCid();
188 switch (cid) { 192 switch (cid) {
189 case kDoubleCid: 193 case kDoubleCid:
(...skipping 3034 matching lines...) Expand 10 before | Expand all | Expand 10 after
3224 case Token::kTRUNCDIV: return 0; 3228 case Token::kTRUNCDIV: return 0;
3225 case Token::kMOD: return 1; 3229 case Token::kMOD: return 1;
3226 default: UNIMPLEMENTED(); return -1; 3230 default: UNIMPLEMENTED(); return -1;
3227 } 3231 }
3228 } 3232 }
3229 3233
3230 3234
3231 #undef __ 3235 #undef __
3232 3236
3233 } // namespace dart 3237 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698