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

Unified Diff: runtime/vm/flow_graph_builder.cc

Issue 3002833003: Adjust the column number where a StackOverflow error is reported. (Closed)
Patch Set: fix typos Created 3 years, 4 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
« no previous file with comments | « runtime/vm/dart_api_impl_test.cc ('k') | runtime/vm/flow_graph_builder_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_builder.cc
diff --git a/runtime/vm/flow_graph_builder.cc b/runtime/vm/flow_graph_builder.cc
index 959b4101de2cb160970d48c8170208d5004be4c9..98dabb2adce53b575c996bfb3c0ef0e242e1a282 100644
--- a/runtime/vm/flow_graph_builder.cc
+++ b/runtime/vm/flow_graph_builder.cc
@@ -3881,8 +3881,12 @@ void EffectGraphVisitor::VisitSequenceNode(SequenceNode* node) {
// if we inline or not.
if (!function.IsImplicitGetterFunction() &&
!function.IsImplicitSetterFunction()) {
+ // We want the stack overlow error to be reported at the opening '{' or
+ // at the '=>' location. So, we get the sequence node corresponding to the
+ // body inside |node| and use its token position.
+ ASSERT(node->length() > 0);
CheckStackOverflowInstr* check = new (Z) CheckStackOverflowInstr(
- node->token_pos(), 0, owner()->GetNextDeoptId());
+ node->NodeAt(0)->token_pos(), 0, owner()->GetNextDeoptId());
// If we are inlining don't actually attach the stack check. We must still
// create the stack check in order to allocate a deopt id.
if (!owner()->IsInlining()) {
« no previous file with comments | « runtime/vm/dart_api_impl_test.cc ('k') | runtime/vm/flow_graph_builder_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698