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

Unified Diff: runtime/vm/intermediate_language_dbc.cc

Issue 2183993004: DBC: Add missing deopt info after stack overflow checks. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: . Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/intermediate_language_dbc.cc
diff --git a/runtime/vm/intermediate_language_dbc.cc b/runtime/vm/intermediate_language_dbc.cc
index 0dda8e1f41979c5293c2376848d8a18402adec07..b4f8e0527ed9ae88cacc34977ed4f2f261fba0a0 100644
--- a/runtime/vm/intermediate_language_dbc.cc
+++ b/runtime/vm/intermediate_language_dbc.cc
@@ -273,10 +273,23 @@ EMIT_NATIVE_CODE(CheckStackOverflow,
0, Location::NoLocation(),
LocationSummary::kCall) {
__ CheckStack();
- compiler->RecordSafepoint(locs());
- compiler->AddCurrentDescriptor(RawPcDescriptors::kRuntimeCall,
- Thread::kNoDeoptId,
+ compiler->AddCurrentDescriptor(RawPcDescriptors::kOther,
+ deopt_id(),
token_pos());
+ compiler->RecordSafepoint(locs());
zra 2016/07/27 17:22:06 See if you can do FlowGraphCompiler::RecordAfterCa
rmacnak 2016/07/27 17:47:57 Yes, much better.
+ ASSERT(deopt_id() != Thread::kNoDeoptId);
+ const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id());
+ // Marks either the continuation point in unoptimized code or the
+ // deoptimization point in optimized code, after call.
+ if (compiler->is_optimizing()) {
+ compiler->AddDeoptIndexAtCall(deopt_id_after, token_pos());
+ } else {
+ // Add deoptimization continuation point after the call and before the
+ // arguments are removed.
+ compiler->AddCurrentDescriptor(RawPcDescriptors::kDeopt,
+ deopt_id_after,
+ token_pos());
+ }
}

Powered by Google App Engine
This is Rietveld 408576698