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

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

Issue 2572563004: Improve the casing of Stackmap and Stacktrace. (Closed)
Patch Set: Build fixes Created 4 years 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 | « runtime/vm/intermediate_language_arm64.cc ('k') | runtime/vm/intermediate_language_ia32.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 1143 matching lines...) Expand 10 before | Expand all | Expand 10 after
1154 // of the allocatable register range. 1154 // of the allocatable register range.
1155 const intptr_t num_non_copied_params = 1155 const intptr_t num_non_copied_params =
1156 compiler->flow_graph().num_non_copied_params(); 1156 compiler->flow_graph().num_non_copied_params();
1157 const intptr_t exception_reg = 1157 const intptr_t exception_reg =
1158 kNumberOfCpuRegisters - 1158 kNumberOfCpuRegisters -
1159 (-exception_var().index() + num_non_copied_params); 1159 (-exception_var().index() + num_non_copied_params);
1160 const intptr_t stacktrace_reg = 1160 const intptr_t stacktrace_reg =
1161 kNumberOfCpuRegisters - 1161 kNumberOfCpuRegisters -
1162 (-stacktrace_var().index() + num_non_copied_params); 1162 (-stacktrace_var().index() + num_non_copied_params);
1163 __ MoveSpecial(exception_reg, Simulator::kExceptionSpecialIndex); 1163 __ MoveSpecial(exception_reg, Simulator::kExceptionSpecialIndex);
1164 __ MoveSpecial(stacktrace_reg, Simulator::kStacktraceSpecialIndex); 1164 __ MoveSpecial(stacktrace_reg, Simulator::kStackTraceSpecialIndex);
1165 } else { 1165 } else {
1166 __ MoveSpecial(LocalVarIndex(0, exception_var().index()), 1166 __ MoveSpecial(LocalVarIndex(0, exception_var().index()),
1167 Simulator::kExceptionSpecialIndex); 1167 Simulator::kExceptionSpecialIndex);
1168 __ MoveSpecial(LocalVarIndex(0, stacktrace_var().index()), 1168 __ MoveSpecial(LocalVarIndex(0, stacktrace_var().index()),
1169 Simulator::kStacktraceSpecialIndex); 1169 Simulator::kStackTraceSpecialIndex);
1170 } 1170 }
1171 __ SetFrame(compiler->StackSize()); 1171 __ SetFrame(compiler->StackSize());
1172 } 1172 }
1173 1173
1174 1174
1175 EMIT_NATIVE_CODE(Throw, 0, Location::NoLocation(), LocationSummary::kCall) { 1175 EMIT_NATIVE_CODE(Throw, 0, Location::NoLocation(), LocationSummary::kCall) {
1176 __ Throw(0); 1176 __ Throw(0);
1177 compiler->AddCurrentDescriptor(RawPcDescriptors::kOther, deopt_id(), 1177 compiler->AddCurrentDescriptor(RawPcDescriptors::kOther, deopt_id(),
1178 token_pos()); 1178 token_pos());
1179 compiler->RecordAfterCall(this); 1179 compiler->RecordAfterCall(this);
1180 __ Trap(); 1180 __ Trap();
1181 } 1181 }
1182 1182
1183 1183
1184 EMIT_NATIVE_CODE(ReThrow, 0, Location::NoLocation(), LocationSummary::kCall) { 1184 EMIT_NATIVE_CODE(ReThrow, 0, Location::NoLocation(), LocationSummary::kCall) {
1185 compiler->SetNeedsStacktrace(catch_try_index()); 1185 compiler->SetNeedsStackTrace(catch_try_index());
1186 __ Throw(1); 1186 __ Throw(1);
1187 compiler->AddCurrentDescriptor(RawPcDescriptors::kOther, deopt_id(), 1187 compiler->AddCurrentDescriptor(RawPcDescriptors::kOther, deopt_id(),
1188 token_pos()); 1188 token_pos());
1189 compiler->RecordAfterCall(this); 1189 compiler->RecordAfterCall(this);
1190 __ Trap(); 1190 __ Trap();
1191 } 1191 }
1192 1192
1193 EMIT_NATIVE_CODE(InstantiateType, 1193 EMIT_NATIVE_CODE(InstantiateType,
1194 1, 1194 1,
1195 Location::RequiresRegister(), 1195 Location::RequiresRegister(),
(...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after
1996 } 1996 }
1997 __ IfULe(length, index); 1997 __ IfULe(length, index);
1998 compiler->EmitDeopt(deopt_id(), ICData::kDeoptCheckArrayBound, 1998 compiler->EmitDeopt(deopt_id(), ICData::kDeoptCheckArrayBound,
1999 (generalized_ ? ICData::kGeneralized : 0) | 1999 (generalized_ ? ICData::kGeneralized : 0) |
2000 (licm_hoisted_ ? ICData::kHoisted : 0)); 2000 (licm_hoisted_ ? ICData::kHoisted : 0));
2001 } 2001 }
2002 2002
2003 } // namespace dart 2003 } // namespace dart
2004 2004
2005 #endif // defined TARGET_ARCH_DBC 2005 #endif // defined TARGET_ARCH_DBC
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_arm64.cc ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698