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

Issue 2738903002: Change the calling conventions for handleUnrecoverableError. (Closed)

Created:
3 years, 9 months ago by Paul Berry
Modified:
3 years, 9 months ago
Reviewers:
ahe, scheglov
CC:
reviews_dartlang.org, dart-fe-team+reviews_google.com
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Change the calling conventions for handleUnrecoverableError. Instead of returning the token from which parsing should proceed, it returns a token whose "next" pointer points to the token from which parsing should proceed. The rationale is that when error recovery is performed in the context of the analyzer, the listener will need to insert synthetic tokens into the token stream which will then be passed to listener methods; the change in calling conventions allows the listener to return the synthetic token to the parser. The other listeners don't need to insert synthetic tokens into the token stream; they just need to create a synthetic token whose "next" pointer points to the token from which parsing should proceed. The convenience method "newSyntheticToken" is added for the benefit of these listeners. No code is affected outside of error handling, so the performance impact when compiling correct code should be zero. R=ahe@google.com, scheglov@google.com Committed: https://github.com/dart-lang/sdk/commit/a6804167162f230bf8498289a61dc7efebf32b0c

Patch Set 1 #

Total comments: 14

Patch Set 2 : Address code review comments. #

Patch Set 3 : Fix a code path I missed in element_listener.dart #

Unified diffs Side-by-side diffs Delta from patch set Stats (+26 lines, -14 lines) Patch
M pkg/compiler/lib/src/parser/element_listener.dart View 1 2 5 chunks +8 lines, -7 lines 0 comments Download
M pkg/front_end/lib/src/fasta/kernel/body_builder.dart View 1 1 chunk +1 line, -1 line 0 comments Download
M pkg/front_end/lib/src/fasta/parser/dart_vm_native.dart View 1 1 chunk +1 line, -2 lines 0 comments Download
M pkg/front_end/lib/src/fasta/parser/listener.dart View 1 3 chunks +14 lines, -2 lines 0 comments Download
M pkg/front_end/lib/src/fasta/parser/parser.dart View 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 7 (2 generated)
Paul Berry
3 years, 9 months ago (2017-03-08 19:08:17 UTC) #2
scheglov
LGTM
3 years, 9 months ago (2017-03-08 19:12:07 UTC) #3
ahe
LGTM! I really appreciate how you dig in and solve things that have been nagging ...
3 years, 9 months ago (2017-03-09 12:08:39 UTC) #4
Paul Berry
https://codereview.chromium.org/2738903002/diff/1/pkg/compiler/lib/src/parser/element_listener.dart File pkg/compiler/lib/src/parser/element_listener.dart (right): https://codereview.chromium.org/2738903002/diff/1/pkg/compiler/lib/src/parser/element_listener.dart#newcode496 pkg/compiler/lib/src/parser/element_listener.dart:496: return newSyntheticToken(next); On 2017/03/09 12:08:39, ahe wrote: > Perhaps ...
3 years, 9 months ago (2017-03-09 21:51:22 UTC) #5
Paul Berry
3 years, 9 months ago (2017-03-09 21:52:48 UTC) #7
Message was sent while issue was closed.
Committed patchset #3 (id:40001) manually as
a6804167162f230bf8498289a61dc7efebf32b0c (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698