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

Issue 10544173: Update partial parser and scanner to be able to skip expressions like "new Map<S, T>()". (Closed)

Created:
8 years, 6 months ago by ahe
Modified:
8 years, 6 months ago
CC:
reviews_dartlang.org, ngeoffray
Visibility:
Public.

Description

Update partial parser and scanner to be able to skip expressions like "new Map<S, T>()". Committed: https://code.google.com/p/dart/source/detail?r=8720

Patch Set 1 #

Total comments: 6

Patch Set 2 : Address comments and add comments #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+20 lines, -8 lines) Patch
M dart/lib/compiler/implementation/scanner/array_based_scanner.dart View 1 2 chunks +5 lines, -5 lines 0 comments Download
M dart/lib/compiler/implementation/scanner/partial_parser.dart View 1 1 chunk +2 lines, -3 lines 0 comments Download
M dart/lib/compiler/implementation/scanner/scanner.dart View 1 3 chunks +13 lines, -0 lines 4 comments Download

Messages

Total messages: 6 (0 generated)
ahe
8 years, 6 months ago (2012-06-15 11:08:26 UTC) #1
Johnni Winther
lgtm
8 years, 6 months ago (2012-06-15 11:30:51 UTC) #2
Lasse Reichstein Nielsen
LGTM, I think. Not entirely sure how the stack works :) https://chromiumcodereview.appspot.com/10544173/diff/1/dart/lib/compiler/implementation/scanner/array_based_scanner.dart File dart/lib/compiler/implementation/scanner/array_based_scanner.dart (right): ...
8 years, 6 months ago (2012-06-15 11:51:13 UTC) #3
ahe
Thank you, Johnni and Lasse. I have uploaded a new version that address your comments ...
8 years, 6 months ago (2012-06-15 13:12:34 UTC) #4
Lasse Reichstein Nielsen
Still GTLM https://chromiumcodereview.appspot.com/10544173/diff/1/dart/lib/compiler/implementation/scanner/partial_parser.dart File dart/lib/compiler/implementation/scanner/partial_parser.dart (right): https://chromiumcodereview.appspot.com/10544173/diff/1/dart/lib/compiler/implementation/scanner/partial_parser.dart#newcode57 dart/lib/compiler/implementation/scanner/partial_parser.dart:57: if (!mayParseFunctionExpressions && value === '{') I ...
8 years, 6 months ago (2012-06-15 13:59:14 UTC) #5
ahe
8 years, 6 months ago (2012-06-19 11:02:41 UTC) #6
Thank you for your comments.

I'll follow up with a CL (that also includes the test I forgot to add).

Cheers,
Peter

https://chromiumcodereview.appspot.com/10544173/diff/1/dart/lib/compiler/impl...
File dart/lib/compiler/implementation/scanner/partial_parser.dart (right):

https://chromiumcodereview.appspot.com/10544173/diff/1/dart/lib/compiler/impl...
dart/lib/compiler/implementation/scanner/partial_parser.dart:57: if
(!mayParseFunctionExpressions && value === '{')
On 2012/06/15 13:59:14, Lasse Reichstein Nielsen wrote:
> I generally prefer to put return statements on a line by themselves, instead
of
> hiding them at the end of a line (except for when I don't, ofcourse).
> It's because I see "return" (and "throw") as control flow operations, and I
> prefer to have only one control-flow operation per line.

OK. We have used the "bailout" return can go on the same line in other places.

https://chromiumcodereview.appspot.com/10544173/diff/8001/dart/lib/compiler/i...
File dart/lib/compiler/implementation/scanner/scanner.dart (right):

https://chromiumcodereview.appspot.com/10544173/diff/8001/dart/lib/compiler/i...
dart/lib/compiler/implementation/scanner/scanner.dart:42: */
On 2012/06/15 13:59:14, Lasse Reichstein Nielsen wrote:
> So you call this when you recognize something that can't possibly be part of a
> type parameter/type argument?

Done.

https://chromiumcodereview.appspot.com/10544173/diff/8001/dart/lib/compiler/i...
dart/lib/compiler/implementation/scanner/scanner.dart:369: // > >= >> >>= >>>
>>>=
On 2012/06/15 13:59:14, Lasse Reichstein Nielsen wrote:
> When type names can be expressions (reified types), will we be able to
correctly
> parse
>   Set<int>==T
> ? And what will be correct?!? Tokenization? is! fun, :)

Yay! More fun to be had in the future. :-)

Powered by Google App Engine
This is Rietveld 408576698