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

Issue 27510003: Scanner for UTF-8 byte arrays (Closed)

Created:
7 years, 2 months ago by lukas
Modified:
5 years, 10 months ago
CC:
reviews_dartlang.org, Alan Knight, Emily Fortuna, Bob Nystrom, nweiz, Andrei Mouravski
Visibility:
Public.

Description

Scanner for UTF-8 byte arrays Introduces a SourceFile based on UTF-8 byte arrays and a scanner for such source files. Substrings are computed lazily. This should save some memory because substring tokens in classes that are not used by some program are R=kasperl@google.com Committed: https://code.google.com/p/dart/source/detail?r=28843

Patch Set 1 #

Total comments: 10

Patch Set 2 : Re-add ArrayBasedScanner, minor fixes. #

Total comments: 30

Patch Set 3 : fixes compiler tests #

Total comments: 114
Unified diffs Side-by-side diffs Delta from patch set Stats (+1377 lines, -689 lines) Patch
M pkg/docgen/lib/docgen.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
M sdk/lib/_internal/compiler/compiler.dart View 1 1 chunk +13 lines, -4 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/apiimpl.dart View 1 2 2 chunks +13 lines, -3 lines 2 comments Download
M sdk/lib/_internal/compiler/implementation/compiler.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/dart2js.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
M sdk/lib/_internal/compiler/implementation/dart_backend/backend.dart View 3 chunks +7 lines, -6 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/js_backend/backend.dart View 1 2 1 chunk +1 line, -1 line 2 comments Download
M sdk/lib/_internal/compiler/implementation/js_backend/type_variable_handler.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
M sdk/lib/_internal/compiler/implementation/js_emitter/code_emitter_task.dart View 1 2 1 chunk +4 lines, -1 line 0 comments Download
M sdk/lib/_internal/compiler/implementation/js_emitter/js_emitter.dart View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M sdk/lib/_internal/compiler/implementation/mirror_renamer/renamer.dart View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/patch_parser.dart View 1 chunk +1 line, -1 line 0 comments Download
M sdk/lib/_internal/compiler/implementation/scanner/array_based_scanner.dart View 1 7 chunks +118 lines, -87 lines 6 comments Download
M sdk/lib/_internal/compiler/implementation/scanner/parser.dart View 1 chunk +4 lines, -4 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/scanner/scanner.dart View 1 2 34 chunks +386 lines, -161 lines 16 comments Download
M sdk/lib/_internal/compiler/implementation/scanner/scanner_task.dart View 2 chunks +10 lines, -2 lines 2 comments Download
M sdk/lib/_internal/compiler/implementation/scanner/scannerlib.dart View 1 3 chunks +6 lines, -2 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/scanner/string_scanner.dart View 1 2 1 chunk +35 lines, -35 lines 2 comments Download
M sdk/lib/_internal/compiler/implementation/scanner/token.dart View 1 2 3 chunks +227 lines, -107 lines 36 comments Download
A sdk/lib/_internal/compiler/implementation/scanner/utf8_bytes_scanner.dart View 1 2 1 chunk +194 lines, -0 lines 8 comments Download
M sdk/lib/_internal/compiler/implementation/script.dart View 1 chunk +1 line, -1 line 0 comments Download
M sdk/lib/_internal/compiler/implementation/source_file.dart View 1 2 4 chunks +113 lines, -22 lines 8 comments Download
M sdk/lib/_internal/compiler/implementation/source_file_provider.dart View 1 2 3 chunks +18 lines, -8 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/source_map_builder.dart View 1 chunk +1 line, -1 line 0 comments Download
M sdk/lib/_internal/compiler/implementation/ssa/builder.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
M sdk/lib/_internal/compiler/implementation/ssa/codegen.dart View 1 chunk +2 lines, -2 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/string_validator.dart View 1 chunk +12 lines, -0 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/tree/prettyprint.dart View 1 2 1 chunk +3 lines, -1 line 0 comments Download
M sdk/lib/_internal/compiler/implementation/typechecker.dart View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M sdk/lib/_internal/dartdoc/lib/classify.dart View 1 chunk +1 line, -1 line 0 comments Download
M sdk/lib/_internal/dartdoc/lib/src/dart2js_mirrors.dart View 1 2 3 chunks +4 lines, -3 lines 0 comments Download
M sdk/lib/_internal/pub/lib/src/dart.dart View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M tests/compiler/dart2js/analyze_helper.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
M tests/compiler/dart2js/begin_end_token_test.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
M tests/compiler/dart2js/call_site_simple_type_inferer_test.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
M tests/compiler/dart2js/codegen_helper.dart View 1 2 2 chunks +1 line, -3 lines 0 comments Download
M tests/compiler/dart2js/compiler_helper.dart View 1 2 3 chunks +5 lines, -4 lines 0 comments Download
M tests/compiler/dart2js/compiler_test.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
M tests/compiler/dart2js/cpa_inference_test.dart View 1 2 6 chunks +9 lines, -8 lines 0 comments Download
M tests/compiler/dart2js/deferred_load_graph_segmentation_test.dart View 1 2 1 chunk +2 lines, -2 lines 2 comments Download
M tests/compiler/dart2js/erroneous_element_test.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
M tests/compiler/dart2js/field_type_simple_inferer_test.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
M tests/compiler/dart2js/find_my_name_test.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
M tests/compiler/dart2js/gvn_dynamic_field_get_test.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
M tests/compiler/dart2js/issue13354_test.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
M tests/compiler/dart2js/lookup_member_test.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
M tests/compiler/dart2js/memory_source_file_helper.dart View 1 2 2 chunks +4 lines, -2 lines 0 comments Download
M tests/compiler/dart2js/metadata_test.dart View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
D tests/compiler/dart2js/mini_parser_test.dart View 1 2 1 chunk +0 lines, -20 lines 0 comments Download
M tests/compiler/dart2js/mirror_helper_rename_test.dart View 1 2 4 chunks +4 lines, -8 lines 0 comments Download
M tests/compiler/dart2js/mirror_helper_test.dart View 1 2 1 chunk +0 lines, -4 lines 0 comments Download
M tests/compiler/dart2js/mirror_helper_unique_minification_test.dart View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M tests/compiler/dart2js/mirrors_test.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
M tests/compiler/dart2js/mirrors_used_test.dart View 1 2 2 chunks +1 line, -2 lines 2 comments Download
M tests/compiler/dart2js/mock_compiler.dart View 1 2 3 chunks +4 lines, -4 lines 2 comments Download
M tests/compiler/dart2js/parser_helper.dart View 1 2 4 chunks +3 lines, -11 lines 0 comments Download
M tests/compiler/dart2js/parser_test.dart View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M tests/compiler/dart2js/partial_parser_test.dart View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M tests/compiler/dart2js/patch_test.dart View 1 2 2 chunks +5 lines, -5 lines 6 comments Download
M tests/compiler/dart2js/private_test.dart View 1 2 1 chunk +1 line, -2 lines 0 comments Download
M tests/compiler/dart2js/reexport_handled_test.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
M tests/compiler/dart2js/resolution_test.dart View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M tests/compiler/dart2js/resolver_test.dart View 1 2 20 chunks +41 lines, -41 lines 8 comments Download
M tests/compiler/dart2js/scanner_offset_length_test.dart View 1 2 2 chunks +5 lines, -6 lines 0 comments Download
M tests/compiler/dart2js/scanner_test.dart View 1 2 1 chunk +37 lines, -31 lines 0 comments Download
M tests/compiler/dart2js/simple_inferrer_callers_test.dart View 1 2 1 chunk +2 lines, -2 lines 2 comments Download
M tests/compiler/dart2js/simple_inferrer_closure_test.dart View 1 2 2 chunks +1 line, -2 lines 0 comments Download
M tests/compiler/dart2js/simple_inferrer_final_field2_test.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
M tests/compiler/dart2js/simple_inferrer_final_field3_test.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
M tests/compiler/dart2js/simple_inferrer_final_field_test.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
M tests/compiler/dart2js/simple_inferrer_postfix_prefix_test.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
M tests/compiler/dart2js/simple_inferrer_test.dart View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M tests/compiler/dart2js/simple_inferrer_unregister_call_test.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
M tests/compiler/dart2js/source_mapping_test.dart View 1 2 2 chunks +2 lines, -2 lines 2 comments Download
M tests/compiler/dart2js/type_checker_test.dart View 1 2 10 chunks +20 lines, -21 lines 8 comments Download
M tests/compiler/dart2js/type_combination_test.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
M tests/compiler/dart2js/type_equals_test.dart View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M tests/compiler/dart2js/type_promotion_test.dart View 1 2 2 chunks +3 lines, -2 lines 0 comments Download
M tests/compiler/dart2js/type_representation_test.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
M tests/compiler/dart2js/type_substitution_test.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
M tests/compiler/dart2js/type_test_helper.dart View 1 2 4 chunks +3 lines, -6 lines 0 comments Download
M tests/compiler/dart2js/unparser2_test.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
M utils/apidoc/html_diff.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 16 (0 generated)
lukas
7 years, 2 months ago (2013-10-16 13:44:17 UTC) #1
ahe
Comments so far. I'm thinking that it would be nice to restore ArrayBasedScanner to minimize ...
7 years, 2 months ago (2013-10-16 14:26:04 UTC) #2
lukas
I re-added the ArrayBasedScanner class, not sure if it helps for reviewing though. https://codereview.chromium.org/27510003/diff/1/sdk/lib/_internal/compiler/compiler.dart File ...
7 years, 2 months ago (2013-10-17 07:21:25 UTC) #3
kasperl
LGTM, but I haven't looked at all the details of the scanner character handling changes. ...
7 years, 2 months ago (2013-10-17 08:50:39 UTC) #4
kasperl
LGTM if you address my comments. I'd go ahead and submit this now and address ...
7 years, 2 months ago (2013-10-17 11:55:03 UTC) #5
lukas
included the feedback from kasper, fixed the compiler tests (--compiler=none -r vm dart2js). https://codereview.chromium.org/27510003/diff/17001/sdk/lib/_internal/compiler/implementation/apiimpl.dart File ...
7 years, 2 months ago (2013-10-17 17:49:34 UTC) #6
lukas
Committed patchset #3 manually as r28843 (presubmit successful).
7 years, 2 months ago (2013-10-18 06:41:37 UTC) #7
kasperl
Still LGTM! https://codereview.chromium.org/27510003/diff/28001/tests/compiler/dart2js/deferred_load_graph_segmentation_test.dart File tests/compiler/dart2js/deferred_load_graph_segmentation_test.dart (right): https://codereview.chromium.org/27510003/diff/28001/tests/compiler/dart2js/deferred_load_graph_segmentation_test.dart#newcode40 tests/compiler/dart2js/deferred_load_graph_segmentation_test.dart:40: deferredClasses Does the where invocation fit on ...
7 years, 2 months ago (2013-10-18 06:44:56 UTC) #8
lukas
thanks, i fixed those and will commit them in some upcoming cl. https://codereview.chromium.org/27510003/diff/28001/tests/compiler/dart2js/deferred_load_graph_segmentation_test.dart File tests/compiler/dart2js/deferred_load_graph_segmentation_test.dart ...
7 years, 2 months ago (2013-10-18 08:39:45 UTC) #9
ngeoffray
That was one hell of a change! I think you forgot to upload the latest ...
7 years, 2 months ago (2013-10-18 10:19:36 UTC) #10
sra1
https://chromiumcodereview.appspot.com/27510003/diff/28001/sdk/lib/_internal/compiler/implementation/scanner/token.dart File sdk/lib/_internal/compiler/implementation/scanner/token.dart (right): https://chromiumcodereview.appspot.com/27510003/diff/28001/sdk/lib/_internal/compiler/implementation/scanner/token.dart#newcode238 sdk/lib/_internal/compiler/implementation/scanner/token.dart:238: static const int LAZY_THRESHOLD = 4; How did you ...
7 years, 2 months ago (2013-10-22 19:52:30 UTC) #11
lukas
https://chromiumcodereview.appspot.com/27510003/diff/28001/sdk/lib/_internal/compiler/implementation/scanner/token.dart File sdk/lib/_internal/compiler/implementation/scanner/token.dart (right): https://chromiumcodereview.appspot.com/27510003/diff/28001/sdk/lib/_internal/compiler/implementation/scanner/token.dart#newcode238 sdk/lib/_internal/compiler/implementation/scanner/token.dart:238: static const int LAZY_THRESHOLD = 4; On 2013/10/22 19:52:31, ...
7 years, 2 months ago (2013-10-23 07:11:00 UTC) #12
ahe
Lukas, I think you made a number of understandable mistakes in this code review process, ...
7 years, 2 months ago (2013-10-23 13:39:44 UTC) #13
nweiz
Pub change lgtm.
7 years, 2 months ago (2013-10-23 17:48:50 UTC) #14
Alan Knight
docgen change lgtm
7 years, 2 months ago (2013-10-23 17:49:52 UTC) #15
lukas
7 years, 2 months ago (2013-10-24 16:48:35 UTC) #16
Message was sent while issue was closed.
https://chromiumcodereview.appspot.com/27510003/diff/28001/sdk/lib/_internal/...
File sdk/lib/_internal/compiler/implementation/apiimpl.dart (right):

https://chromiumcodereview.appspot.com/27510003/diff/28001/sdk/lib/_internal/...
sdk/lib/_internal/compiler/implementation/apiimpl.dart:179: .then((data) {
Done.

https://chromiumcodereview.appspot.com/27510003/diff/28001/sdk/lib/_internal/...
File sdk/lib/_internal/compiler/implementation/js_backend/backend.dart (right):

https://chromiumcodereview.appspot.com/27510003/diff/28001/sdk/lib/_internal/...
sdk/lib/_internal/compiler/implementation/js_backend/backend.dart:639:
compiler.findHelper('TypeVariable');
Done.

https://chromiumcodereview.appspot.com/27510003/diff/28001/sdk/lib/_internal/...
File sdk/lib/_internal/compiler/implementation/scanner/array_based_scanner.dart
(right):

https://chromiumcodereview.appspot.com/27510003/diff/28001/sdk/lib/_internal/...
sdk/lib/_internal/compiler/implementation/scanner/array_based_scanner.dart:99: *
Notifies on [$LF] characters in multi-line commends or strings.
Done.

https://chromiumcodereview.appspot.com/27510003/diff/28001/sdk/lib/_internal/...
sdk/lib/_internal/compiler/implementation/scanner/array_based_scanner.dart:125:
* Appends a token that begins a ends group, represented by [value].
On 2013/10/18 10:19:37, ngeoffray wrote:
> a ends -> an end

Done.

https://chromiumcodereview.appspot.com/27510003/diff/28001/sdk/lib/_internal/...
sdk/lib/_internal/compiler/implementation/scanner/array_based_scanner.dart:197:
* We call this method to discard '<' from the "grouping" stack
On 2013/10/18 10:19:37, ngeoffray wrote:
> Replace 'We' by the actual callers.

Done.

https://chromiumcodereview.appspot.com/27510003/diff/28001/sdk/lib/_internal/...
File sdk/lib/_internal/compiler/implementation/scanner/scanner.dart (right):

https://chromiumcodereview.appspot.com/27510003/diff/28001/sdk/lib/_internal/...
sdk/lib/_internal/compiler/implementation/scanner/scanner.dart:52: final
List<int> lineStarts = [0];
On 2013/10/18 10:19:37, ngeoffray wrote:
> <int>[0]

Done.

https://chromiumcodereview.appspot.com/27510003/diff/28001/sdk/lib/_internal/...
sdk/lib/_internal/compiler/implementation/scanner/scanner.dart:58: 
On 2013/10/18 10:19:37, ngeoffray wrote:
> Extra line.

Done.

https://chromiumcodereview.appspot.com/27510003/diff/28001/sdk/lib/_internal/...
sdk/lib/_internal/compiler/implementation/scanner/scanner.dart:87: * Invoking
[currentAsUnicode] multiple times is safe, i.e.,
On 2013/10/18 10:19:37, ngeoffray wrote:
> i.e. -> that is

Done.

https://chromiumcodereview.appspot.com/27510003/diff/28001/sdk/lib/_internal/...
sdk/lib/_internal/compiler/implementation/scanner/scanner.dart:166: /**
Documentation in subclass [ArrayBasedScanner]. */
On 2013/10/18 10:19:37, ngeoffray wrote:
> So do the following methods only apply to the ArrayBasedScanner?

I just decided to put the documentation together with the actual implementation.
Technically the implementations could go here, but Peter preferred to separate
scanning code from token building code.

https://chromiumcodereview.appspot.com/27510003/diff/28001/sdk/lib/_internal/...
sdk/lib/_internal/compiler/implementation/scanner/scanner.dart:858: * [next] is
the first character after the qoute.
On 2013/10/18 10:19:37, ngeoffray wrote:
> qoute -> quote

Done.

https://chromiumcodereview.appspot.com/27510003/diff/28001/sdk/lib/_internal/...
sdk/lib/_internal/compiler/implementation/scanner/scanner.dart:932: next =
advance(); // Advance past the quote
On 2013/10/18 10:19:37, ngeoffray wrote:
> Missing .

Done.

https://chromiumcodereview.appspot.com/27510003/diff/28001/sdk/lib/_internal/...
sdk/lib/_internal/compiler/implementation/scanner/scanner.dart:955: int next =
advance(); // Advance past the (last) quote (of three)
On 2013/10/18 10:19:37, ngeoffray wrote:
> Missing .

Done.

https://chromiumcodereview.appspot.com/27510003/diff/28001/sdk/lib/_internal/...
sdk/lib/_internal/compiler/implementation/scanner/scanner.dart:1051: // as
errors. However, the rest of the parser assume the groups
On 2013/10/18 10:19:37, ngeoffray wrote:
> assume -> assumes

Done.

https://chromiumcodereview.appspot.com/27510003/diff/28001/sdk/lib/_internal/...
File sdk/lib/_internal/compiler/implementation/scanner/scanner_task.dart
(right):

https://chromiumcodereview.appspot.com/27510003/diff/28001/sdk/lib/_internal/...
sdk/lib/_internal/compiler/implementation/scanner/scanner_task.dart:43: * value
('\x00'). If [source] does not with '0', the string is copied before
On 2013/10/18 10:19:37, ngeoffray wrote:
> not *end* with

Done.

https://chromiumcodereview.appspot.com/27510003/diff/28001/sdk/lib/_internal/...
File sdk/lib/_internal/compiler/implementation/scanner/string_scanner.dart
(right):

https://chromiumcodereview.appspot.com/27510003/diff/28001/sdk/lib/_internal/...
sdk/lib/_internal/compiler/implementation/scanner/string_scanner.dart:45: 
On 2013/10/18 10:19:37, ngeoffray wrote:
> Extra line.

Done.

https://chromiumcodereview.appspot.com/27510003/diff/28001/sdk/lib/_internal/...
File sdk/lib/_internal/compiler/implementation/scanner/token.dart (right):

https://chromiumcodereview.appspot.com/27510003/diff/28001/sdk/lib/_internal/...
sdk/lib/_internal/compiler/implementation/scanner/token.dart:106: * For
[StringToken]s the value includes the quotes, explicit escapes, etc.
On 2013/10/18 10:19:37, ngeoffray wrote:
> the value -> [value]

Done.

https://chromiumcodereview.appspot.com/27510003/diff/28001/sdk/lib/_internal/...
sdk/lib/_internal/compiler/implementation/scanner/token.dart:112: * For symbol
and keyword tokens, returns the string value reprenseted by this
On 2013/10/18 10:19:37, ngeoffray wrote:
> represented

Done.

https://chromiumcodereview.appspot.com/27510003/diff/28001/sdk/lib/_internal/...
sdk/lib/_internal/compiler/implementation/scanner/token.dart:143: * see
implementaiton in [KeywordToken].
On 2013/10/18 10:19:37, ngeoffray wrote:
> implementation

Done.

https://chromiumcodereview.appspot.com/27510003/diff/28001/sdk/lib/_internal/...
sdk/lib/_internal/compiler/implementation/scanner/token.dart:174: * A symbol
token represents the symbol in its precendence info.
On 2013/10/18 10:19:37, ngeoffray wrote:
> symbol token -> [SymbolToken]

Done.

https://chromiumcodereview.appspot.com/27510003/diff/28001/sdk/lib/_internal/...
sdk/lib/_internal/compiler/implementation/scanner/token.dart:193: * A
[BeginGroupToken] reprsents a symbol that may be the beginning of
On 2013/10/18 10:19:37, ngeoffray wrote:
> represents

Done.

https://chromiumcodereview.appspot.com/27510003/diff/28001/sdk/lib/_internal/...
sdk/lib/_internal/compiler/implementation/scanner/token.dart:202: : super(info,
charOffset);
On 2013/10/18 10:19:37, ngeoffray wrote:
> Fits in one line?

No :)

https://chromiumcodereview.appspot.com/27510003/diff/28001/sdk/lib/_internal/...
sdk/lib/_internal/compiler/implementation/scanner/token.dart:226: * number
literals, comments and error tokens, using the corresponding
On 2013/10/18 10:19:37, ngeoffray wrote:
> comments, and ...

Done.

https://chromiumcodereview.appspot.com/27510003/diff/28001/sdk/lib/_internal/...
sdk/lib/_internal/compiler/implementation/scanner/token.dart:240: var
valueOrLazySubstring;
On 2013/10/18 10:19:37, ngeoffray wrote:
> You could put the union type of this field in comments, eg:
> 
> var /* String or LazySubstring */ valueOrLazySubstring;

Done.

https://chromiumcodereview.appspot.com/27510003/diff/28001/sdk/lib/_internal/...
sdk/lib/_internal/compiler/implementation/scanner/token.dart:249: [bool
canonicalize = false])
On 2013/10/18 10:19:37, ngeoffray wrote:
> Make it a named parameter? Easier when reading call sites.

Done.

https://chromiumcodereview.appspot.com/27510003/diff/28001/sdk/lib/_internal/...
sdk/lib/_internal/compiler/implementation/scanner/token.dart:258: int
charOffset, [bool canonicalize = false])
On 2013/10/18 10:19:37, ngeoffray wrote:
> ditto

Done.

https://chromiumcodereview.appspot.com/27510003/diff/28001/sdk/lib/_internal/...
sdk/lib/_internal/compiler/implementation/scanner/token.dart:263: canonicalize);
On 2013/10/18 10:19:37, ngeoffray wrote:
> indentation.

Done.

https://chromiumcodereview.appspot.com/27510003/diff/28001/sdk/lib/_internal/...
sdk/lib/_internal/compiler/implementation/scanner/token.dart:311: new HashSet();
On 2013/10/18 10:19:37, ngeoffray wrote:
> HashSet<String>()

Done.

https://chromiumcodereview.appspot.com/27510003/diff/28001/sdk/lib/_internal/...
sdk/lib/_internal/compiler/implementation/scanner/token.dart:337: * lazily. The
substring can either originate in a string or in a [:List<int>:]
On 2013/10/18 10:19:37, ngeoffray wrote:
> originate in -> originate from?

Done.

https://chromiumcodereview.appspot.com/27510003/diff/28001/sdk/lib/_internal/...
sdk/lib/_internal/compiler/implementation/scanner/token.dart:348: * If this
substring is based on a String, the boolean indicates wheter the
On 2013/10/18 10:19:37, ngeoffray wrote:
> the boolean -> [boolValue]

Done.

https://chromiumcodereview.appspot.com/27510003/diff/28001/sdk/lib/_internal/...
sdk/lib/_internal/compiler/implementation/scanner/token.dart:351: * For
substrings based on a byte array, the boolean value is true if the
On 2013/10/18 10:19:37, ngeoffray wrote:
> ditto

Done.

https://chromiumcodereview.appspot.com/27510003/diff/28001/sdk/lib/_internal/...
sdk/lib/_internal/compiler/implementation/scanner/token.dart:376: * of 1M.
[length] has 9 bits, which covers 512 characters.
On 2013/10/18 10:19:37, ngeoffray wrote:
> 1M -> 1MB.

Done.

https://chromiumcodereview.appspot.com/27510003/diff/28001/sdk/lib/_internal/...
sdk/lib/_internal/compiler/implementation/scanner/token.dart:378: * The file
html_dart2js.dart is currently around 1M.
On 2013/10/18 10:19:37, ngeoffray wrote:
> 1M -> 1MB

Done.

https://chromiumcodereview.appspot.com/27510003/diff/28001/sdk/lib/_internal/...
File sdk/lib/_internal/compiler/implementation/scanner/utf8_bytes_scanner.dart
(right):

https://chromiumcodereview.appspot.com/27510003/diff/28001/sdk/lib/_internal/...
sdk/lib/_internal/compiler/implementation/scanner/utf8_bytes_scanner.dart:1: //
Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
On 2013/10/18 10:19:37, ngeoffray wrote:
> 2011 -> 2013

Done.

https://chromiumcodereview.appspot.com/27510003/diff/28001/sdk/lib/_internal/...
sdk/lib/_internal/compiler/implementation/scanner/utf8_bytes_scanner.dart:16: *
Points to the offset of the byte last returned by [advance].
On 2013/10/18 10:19:37, ngeoffray wrote:
> byte last -> last byte?

Done.

https://chromiumcodereview.appspot.com/27510003/diff/28001/sdk/lib/_internal/...
sdk/lib/_internal/compiler/implementation/scanner/utf8_bytes_scanner.dart:140:
throw "Invalid UTF-8 byte sequence: ${bytes.sublist(startOffset, end)}";
On 2013/10/18 10:19:37, ngeoffray wrote:
> Will users face this error? If yes, we should throw differently.

That could only happen in a file with wrong UTF-8 encoding, in which case
UTF8.decode would probably fail earlier. I could also just remove the check.

https://chromiumcodereview.appspot.com/27510003/diff/28001/sdk/lib/_internal/...
sdk/lib/_internal/compiler/implementation/scanner/utf8_bytes_scanner.dart:187: 
On 2013/10/18 10:19:37, ngeoffray wrote:
> Extra line,

Done.

https://chromiumcodereview.appspot.com/27510003/diff/28001/sdk/lib/_internal/...
File sdk/lib/_internal/compiler/implementation/source_file.dart (right):

https://chromiumcodereview.appspot.com/27510003/diff/28001/sdk/lib/_internal/...
sdk/lib/_internal/compiler/implementation/source_file.dart:37: set length(v);
On 2013/10/18 10:19:37, ngeoffray wrote:
> int v?

Done.

https://chromiumcodereview.appspot.com/27510003/diff/28001/sdk/lib/_internal/...
sdk/lib/_internal/compiler/implementation/source_file.dart:60: set lineStarts(v)
=> lineStartsCache = v;
On 2013/10/18 10:19:37, ngeoffray wrote:
> v -> List<int> v.

Done.

https://chromiumcodereview.appspot.com/27510003/diff/28001/sdk/lib/_internal/...
sdk/lib/_internal/compiler/implementation/source_file.dart:176: set length(v) =>
lengthCache = v;
On 2013/10/18 10:19:37, ngeoffray wrote:
> int v

Done.

https://chromiumcodereview.appspot.com/27510003/diff/28001/sdk/lib/_internal/...
sdk/lib/_internal/compiler/implementation/source_file.dart:187: set length(v) {
}
On 2013/10/18 10:19:37, ngeoffray wrote:
> int v

Done.

https://chromiumcodereview.appspot.com/27510003/diff/28001/tests/compiler/dar...
File tests/compiler/dart2js/mock_compiler.dart (right):

https://chromiumcodereview.appspot.com/27510003/diff/28001/tests/compiler/dar...
tests/compiler/dart2js/mock_compiler.dart:390: mainApp.entryCompilationUnit);
On 2013/10/18 10:19:37, ngeoffray wrote:
> Fits in one line?

Done.

https://chromiumcodereview.appspot.com/27510003/diff/28001/tests/compiler/dar...
File tests/compiler/dart2js/patch_test.dart (right):

https://chromiumcodereview.appspot.com/27510003/diff/28001/tests/compiler/dar...
tests/compiler/dart2js/patch_test.dart:740: 'method', compiler.coreLibrary, 0);
On 2013/10/18 10:19:37, ngeoffray wrote:
> One line?

Done.

https://chromiumcodereview.appspot.com/27510003/diff/28001/tests/compiler/dar...
tests/compiler/dart2js/patch_test.dart:743:
cls.implementation.lookupLocalMember('method');
On 2013/10/18 10:19:37, ngeoffray wrote:
> ditto

Done.

https://chromiumcodereview.appspot.com/27510003/diff/28001/tests/compiler/dar...
tests/compiler/dart2js/patch_test.dart:750: 'clear', compiler.coreLibrary, 0);
On 2013/10/18 10:19:37, ngeoffray wrote:
> ditto

Done.

https://chromiumcodereview.appspot.com/27510003/diff/28001/tests/compiler/dar...
File tests/compiler/dart2js/resolver_test.dart (right):

https://chromiumcodereview.appspot.com/27510003/diff/28001/tests/compiler/dar...
tests/compiler/dart2js/resolver_test.dart:209:
fooElement.lookupLocalMember("foo");
On 2013/10/18 10:19:37, ngeoffray wrote:
> One line.

Done.

https://chromiumcodereview.appspot.com/27510003/diff/28001/tests/compiler/dar...
tests/compiler/dart2js/resolver_test.dart:232:
fooElement.lookupLocalMember("foo");
On 2013/10/18 10:19:37, ngeoffray wrote:
> One line.

Done.

https://chromiumcodereview.appspot.com/27510003/diff/28001/tests/compiler/dar...
tests/compiler/dart2js/resolver_test.dart:625: compiler.mainApp.find(className);
On 2013/10/18 10:19:37, ngeoffray wrote:
> One line.

Done.

https://chromiumcodereview.appspot.com/27510003/diff/28001/tests/compiler/dar...
tests/compiler/dart2js/resolver_test.dart:629: new
Selector.callConstructor(constructor,
On 2013/10/18 10:19:37, ngeoffray wrote:
> One line.

Done.

https://chromiumcodereview.appspot.com/27510003/diff/28001/tests/compiler/dar...
File tests/compiler/dart2js/type_checker_test.dart (right):

https://chromiumcodereview.appspot.com/27510003/diff/28001/tests/compiler/dar...
tests/compiler/dart2js/type_checker_test.dart:474:
library.find("ClassWithMethods");
On 2013/10/18 10:19:37, ngeoffray wrote:
> One line?

Done.

https://chromiumcodereview.appspot.com/27510003/diff/28001/tests/compiler/dar...
tests/compiler/dart2js/type_checker_test.dart:1100:
classTest.lookupLocalMember("test");
On 2013/10/18 10:19:37, ngeoffray wrote:
> One line.

Done.

https://chromiumcodereview.appspot.com/27510003/diff/28001/tests/compiler/dar...
tests/compiler/dart2js/type_checker_test.dart:1142:
classTest.lookupLocalMember("test");
On 2013/10/18 10:19:37, ngeoffray wrote:
> One line.

Done.

https://chromiumcodereview.appspot.com/27510003/diff/28001/tests/compiler/dar...
tests/compiler/dart2js/type_checker_test.dart:1166:
classTest.lookupLocalMember("test");
On 2013/10/18 10:19:37, ngeoffray wrote:
> One line.

Done.

Powered by Google App Engine
This is Rietveld 408576698