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

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

Issue 2399333003: DBC: Support large offsets in optimized field access. (Closed)
Patch Set: update comment Created 4 years, 2 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
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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/globals.h" // Needed here to get TARGET_ARCH_DBC. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_DBC.
6 #if defined(TARGET_ARCH_DBC) 6 #if defined(TARGET_ARCH_DBC)
7 7
8 #include "vm/flow_graph_compiler.h" 8 #include "vm/flow_graph_compiler.h"
9 9
10 #include "vm/ast_printer.h" 10 #include "vm/ast_printer.h"
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 (defn->tag() != Instruction::kDropTemps) && 264 (defn->tag() != Instruction::kDropTemps) &&
265 !defn->HasTemp()) { 265 !defn->HasTemp()) {
266 __ Drop1(); 266 __ Drop1();
267 } 267 }
268 } 268 }
269 } 269 }
270 270
271 271
272 void FlowGraphCompiler::GenerateInlinedGetter(intptr_t offset) { 272 void FlowGraphCompiler::GenerateInlinedGetter(intptr_t offset) {
273 __ Move(0, -(1 + kParamEndSlotFromFp)); 273 __ Move(0, -(1 + kParamEndSlotFromFp));
274 __ LoadField(0, 0, offset / kWordSize); 274 ASSERT(offset % kWordSize == 0);
275 if (Utils::IsInt(8, offset/ kWordSize)) {
276 __ LoadField(0, 0, offset / kWordSize);
277 } else {
278 __ LoadFieldExt(0, 0);
279 __ Nop(offset / kWordSize);
280 }
275 __ Return(0); 281 __ Return(0);
276 } 282 }
277 283
278 284
279 void FlowGraphCompiler::GenerateInlinedSetter(intptr_t offset) { 285 void FlowGraphCompiler::GenerateInlinedSetter(intptr_t offset) {
280 __ Move(0, -(2 + kParamEndSlotFromFp)); 286 __ Move(0, -(2 + kParamEndSlotFromFp));
281 __ Move(1, -(1 + kParamEndSlotFromFp)); 287 __ Move(1, -(1 + kParamEndSlotFromFp));
282 __ StoreField(0, offset / kWordSize, 1); 288 ASSERT(offset % kWordSize == 0);
289 if (Utils::IsInt(8, offset/ kWordSize)) {
290 __ StoreField(0, offset / kWordSize, 1);
291 } else {
292 __ StoreFieldExt(0, 1);
293 __ Nop(offset / kWordSize);
294 }
283 __ LoadConstant(0, Object::Handle()); 295 __ LoadConstant(0, Object::Handle());
284 __ Return(0); 296 __ Return(0);
285 } 297 }
286 298
287 299
288 void FlowGraphCompiler::EmitFrameEntry() { 300 void FlowGraphCompiler::EmitFrameEntry() {
289 const Function& function = parsed_function().function(); 301 const Function& function = parsed_function().function();
290 const intptr_t num_fixed_params = function.num_fixed_parameters(); 302 const intptr_t num_fixed_params = function.num_fixed_parameters();
291 const int num_opt_pos_params = function.NumOptionalPositionalParameters(); 303 const int num_opt_pos_params = function.NumOptionalPositionalParameters();
292 const int num_opt_named_params = function.NumOptionalNamedParameters(); 304 const int num_opt_named_params = function.NumOptionalNamedParameters();
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) { 538 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) {
527 UNIMPLEMENTED(); 539 UNIMPLEMENTED();
528 } 540 }
529 541
530 542
531 #undef __ 543 #undef __
532 544
533 } // namespace dart 545 } // namespace dart
534 546
535 #endif // defined TARGET_ARCH_DBC 547 #endif // defined TARGET_ARCH_DBC
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698