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

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

Issue 2692803006: Track the 'awaiter return' call stack use it to detect uncaught exceptions in async functions (Closed)
Patch Set: rmacnak review Created 3 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
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 1131 matching lines...) Expand 10 before | Expand all | Expand 10 after
1142 if (compiler->is_optimizing()) { 1142 if (compiler->is_optimizing()) {
1143 __ PopLocal(locs()->out(0).reg()); 1143 __ PopLocal(locs()->out(0).reg());
1144 } 1144 }
1145 } 1145 }
1146 1146
1147 1147
1148 EMIT_NATIVE_CODE(CatchBlockEntry, 0) { 1148 EMIT_NATIVE_CODE(CatchBlockEntry, 0) {
1149 __ Bind(compiler->GetJumpLabel(this)); 1149 __ Bind(compiler->GetJumpLabel(this));
1150 compiler->AddExceptionHandler(catch_try_index(), try_index(), 1150 compiler->AddExceptionHandler(catch_try_index(), try_index(),
1151 compiler->assembler()->CodeSize(), 1151 compiler->assembler()->CodeSize(),
1152 handler_token_pos(), is_generated(),
1152 catch_handler_types_, needs_stacktrace()); 1153 catch_handler_types_, needs_stacktrace());
1153 // On lazy deoptimization we patch the optimized code here to enter the 1154 // On lazy deoptimization we patch the optimized code here to enter the
1154 // deoptimization stub. 1155 // deoptimization stub.
1155 const intptr_t deopt_id = Thread::ToDeoptAfter(GetDeoptId()); 1156 const intptr_t deopt_id = Thread::ToDeoptAfter(GetDeoptId());
1156 if (compiler->is_optimizing()) { 1157 if (compiler->is_optimizing()) {
1157 compiler->AddDeoptIndexAtCall(deopt_id); 1158 compiler->AddDeoptIndexAtCall(deopt_id);
1158 } else { 1159 } else {
1159 compiler->AddCurrentDescriptor(RawPcDescriptors::kDeopt, deopt_id, 1160 compiler->AddCurrentDescriptor(RawPcDescriptors::kDeopt, deopt_id,
1160 TokenPosition::kNoSource); 1161 TokenPosition::kNoSource);
1161 } 1162 }
(...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after
2009 } 2010 }
2010 __ IfULe(length, index); 2011 __ IfULe(length, index);
2011 compiler->EmitDeopt(deopt_id(), ICData::kDeoptCheckArrayBound, 2012 compiler->EmitDeopt(deopt_id(), ICData::kDeoptCheckArrayBound,
2012 (generalized_ ? ICData::kGeneralized : 0) | 2013 (generalized_ ? ICData::kGeneralized : 0) |
2013 (licm_hoisted_ ? ICData::kHoisted : 0)); 2014 (licm_hoisted_ ? ICData::kHoisted : 0));
2014 } 2015 }
2015 2016
2016 } // namespace dart 2017 } // namespace dart
2017 2018
2018 #endif // defined TARGET_ARCH_DBC 2019 #endif // defined TARGET_ARCH_DBC
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698