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

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

Issue 2477653002: DBC: Handle constants correctly in the optimizing backend (Closed)
Patch Set: address comments Created 4 years, 1 month 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
« no previous file with comments | « no previous file | tests/corelib/corelib.status » ('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) 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/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "vm/cpu.h" 10 #include "vm/cpu.h"
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 if (compiler->is_optimizing()) { 332 if (compiler->is_optimizing()) {
333 __ LoadClassId(locs()->out(0).reg(), locs()->in(0).reg()); 333 __ LoadClassId(locs()->out(0).reg(), locs()->in(0).reg());
334 } else { 334 } else {
335 __ LoadClassIdTOS(); 335 __ LoadClassIdTOS();
336 } 336 }
337 } 337 }
338 338
339 339
340 EMIT_NATIVE_CODE(Constant, 0, Location::RequiresRegister()) { 340 EMIT_NATIVE_CODE(Constant, 0, Location::RequiresRegister()) {
341 if (compiler->is_optimizing()) { 341 if (compiler->is_optimizing()) {
342 __ LoadConstant(locs()->out(0).reg(), value()); 342 if (locs()->out(0).IsRegister()) {
343 __ LoadConstant(locs()->out(0).reg(), value());
344 }
343 } else { 345 } else {
344 __ PushConstant(value()); 346 __ PushConstant(value());
345 } 347 }
346 } 348 }
347 349
348 350
349 EMIT_NATIVE_CODE(UnboxedConstant, 0, Location::RequiresRegister()) { 351 EMIT_NATIVE_CODE(UnboxedConstant, 0, Location::RequiresRegister()) {
350 // The register allocator drops constant definitions that have no uses. 352 // The register allocator drops constant definitions that have no uses.
351 if (locs()->out(0).IsInvalid()) { 353 if (locs()->out(0).IsInvalid()) {
352 return; 354 return;
(...skipping 1611 matching lines...) Expand 10 before | Expand all | Expand 10 after
1964 __ IfULe(length, index); 1966 __ IfULe(length, index);
1965 compiler->EmitDeopt(deopt_id(), 1967 compiler->EmitDeopt(deopt_id(),
1966 ICData::kDeoptCheckArrayBound, 1968 ICData::kDeoptCheckArrayBound,
1967 (generalized_ ? ICData::kGeneralized : 0) | 1969 (generalized_ ? ICData::kGeneralized : 0) |
1968 (licm_hoisted_ ? ICData::kHoisted : 0)); 1970 (licm_hoisted_ ? ICData::kHoisted : 0));
1969 } 1971 }
1970 1972
1971 } // namespace dart 1973 } // namespace dart
1972 1974
1973 #endif // defined TARGET_ARCH_DBC 1975 #endif // defined TARGET_ARCH_DBC
OLDNEW
« no previous file with comments | « no previous file | tests/corelib/corelib.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698