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

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

Issue 2490803002: DBC: Fix bugs with array allocation (Closed)
Patch Set: 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 | runtime/vm/simulator_dbc.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) 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 680 matching lines...) Expand 10 before | Expand all | Expand 10 after
691 2, Location::RequiresRegister(), 691 2, Location::RequiresRegister(),
692 LocationSummary::kCall) { 692 LocationSummary::kCall) {
693 if (compiler->is_optimizing()) { 693 if (compiler->is_optimizing()) {
694 const Register length = locs()->in(kLengthPos).reg(); 694 const Register length = locs()->in(kLengthPos).reg();
695 const Register type_arguments = locs()->in(kElementTypePos).reg(); 695 const Register type_arguments = locs()->in(kElementTypePos).reg();
696 const Register out = locs()->out(0).reg(); 696 const Register out = locs()->out(0).reg();
697 __ CreateArrayOpt(out, length, type_arguments); 697 __ CreateArrayOpt(out, length, type_arguments);
698 __ Push(type_arguments); 698 __ Push(type_arguments);
699 __ Push(length); 699 __ Push(length);
700 __ CreateArrayTOS(); 700 __ CreateArrayTOS();
701 compiler->RecordSafepoint(locs()); 701 compiler->RecordAfterCall(this);
702 __ PopLocal(out); 702 __ PopLocal(out);
703 } else { 703 } else {
704 __ CreateArrayTOS(); 704 __ CreateArrayTOS();
705 compiler->RecordSafepoint(locs()); 705 compiler->RecordAfterCall(this);
706 } 706 }
707 } 707 }
708 708
709 709
710 EMIT_NATIVE_CODE(StoreIndexed, 3, Location::NoLocation(), 710 EMIT_NATIVE_CODE(StoreIndexed, 3, Location::NoLocation(),
711 LocationSummary::kNoCall, 1) { 711 LocationSummary::kNoCall, 1) {
712 if (!compiler->is_optimizing()) { 712 if (!compiler->is_optimizing()) {
713 ASSERT(class_id() == kArrayCid); 713 ASSERT(class_id() == kArrayCid);
714 __ StoreIndexedTOS(); 714 __ StoreIndexedTOS();
715 return; 715 return;
(...skipping 1254 matching lines...) Expand 10 before | Expand all | Expand 10 after
1970 __ IfULe(length, index); 1970 __ IfULe(length, index);
1971 compiler->EmitDeopt(deopt_id(), 1971 compiler->EmitDeopt(deopt_id(),
1972 ICData::kDeoptCheckArrayBound, 1972 ICData::kDeoptCheckArrayBound,
1973 (generalized_ ? ICData::kGeneralized : 0) | 1973 (generalized_ ? ICData::kGeneralized : 0) |
1974 (licm_hoisted_ ? ICData::kHoisted : 0)); 1974 (licm_hoisted_ ? ICData::kHoisted : 0));
1975 } 1975 }
1976 1976
1977 } // namespace dart 1977 } // namespace dart
1978 1978
1979 #endif // defined TARGET_ARCH_DBC 1979 #endif // defined TARGET_ARCH_DBC
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/simulator_dbc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698