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

Unified Diff: sdk/lib/_internal/compiler/implementation/scanner/keyword.dart

Issue 12328104: Change new List(n) to return fixed length list. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge to head. Created 7 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
Index: sdk/lib/_internal/compiler/implementation/scanner/keyword.dart
diff --git a/sdk/lib/_internal/compiler/implementation/scanner/keyword.dart b/sdk/lib/_internal/compiler/implementation/scanner/keyword.dart
index 6f47f738f8a379c8dfe2992ec66b8790446c6ec2..671fbacb435e8dcf0adc0f0483e31ea2377d3e72 100644
--- a/sdk/lib/_internal/compiler/implementation/scanner/keyword.dart
+++ b/sdk/lib/_internal/compiler/implementation/scanner/keyword.dart
@@ -136,7 +136,7 @@ abstract class KeywordState {
static KeywordState get KEYWORD_STATE {
if (_KEYWORD_STATE == null) {
List<String> strings =
- new List<String>.fixedLength(Keyword.values.length);
+ new List<String>(Keyword.values.length);
for (int i = 0; i < Keyword.values.length; i++) {
strings[i] = Keyword.values[i].syntax;
}
@@ -148,7 +148,7 @@ abstract class KeywordState {
static KeywordState computeKeywordStateTable(int start, List<String> strings,
int offset, int length) {
- List<KeywordState> result = new List<KeywordState>.fixedLength(26);
+ List<KeywordState> result = new List<KeywordState>(26);
assert(length != 0);
int chunk = 0;
int chunkStart = -1;

Powered by Google App Engine
This is Rietveld 408576698