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

Unified Diff: pkg/front_end/lib/src/fasta/scanner/utf8_bytes_scanner.dart

Issue 2709983002: fasta: Use more efficient Uint16List/Uint32List for line offset information, use hints for length (Closed)
Patch Set: addressed comment Created 3 years, 10 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 | « pkg/front_end/lib/src/fasta/scanner/array_based_scanner.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/src/fasta/scanner/utf8_bytes_scanner.dart
diff --git a/pkg/front_end/lib/src/fasta/scanner/utf8_bytes_scanner.dart b/pkg/front_end/lib/src/fasta/scanner/utf8_bytes_scanner.dart
index 98f3293c3d5c86d34b26e730a21e36c3ac522a9a..0f729000b496bb95dbbd4aefb87760ab5c83247f 100644
--- a/pkg/front_end/lib/src/fasta/scanner/utf8_bytes_scanner.dart
+++ b/pkg/front_end/lib/src/fasta/scanner/utf8_bytes_scanner.dart
@@ -87,7 +87,7 @@ class Utf8BytesScanner extends ArrayBasedScanner {
* is not the case, the entire array is copied before scanning.
*/
Utf8BytesScanner(this.bytes, {bool includeComments: false})
- : super(includeComments) {
+ : super(includeComments, numberOfBytesHint: bytes.length) {
assert(bytes.last == 0);
// Skip a leading BOM.
if (containsBomAt(0)) byteOffset += 3;
« no previous file with comments | « pkg/front_end/lib/src/fasta/scanner/array_based_scanner.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698