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

Side by Side Diff: tests/compiler/dart2js/mock_compiler.dart

Issue 17151007: Eagerly infer the element type of const lists in the simple inferrer. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library mock_compiler; 5 library mock_compiler;
6 6
7 import "package:expect/expect.dart"; 7 import "package:expect/expect.dart";
8 import 'dart:collection'; 8 import 'dart:collection';
9 9
10 import '../../../sdk/lib/_internal/compiler/compiler.dart' as api; 10 import '../../../sdk/lib/_internal/compiler/compiler.dart' as api;
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 toString() {} 85 toString() {}
86 bool operator==(other) => identical(this, other); 86 bool operator==(other) => identical(this, other);
87 noSuchMethod(im) { throw im; } 87 noSuchMethod(im) { throw im; }
88 } 88 }
89 abstract class JSIndexable { 89 abstract class JSIndexable {
90 get length; 90 get length;
91 } 91 }
92 abstract class JSMutableIndexable extends JSIndexable {} 92 abstract class JSMutableIndexable extends JSIndexable {}
93 class JSArray extends Interceptor implements List, JSIndexable { 93 class JSArray extends Interceptor implements List, JSIndexable {
94 var length; 94 var length;
95 operator[](index) {} 95 operator[](index) => this[index];
96 operator[]=(index, value) {} 96 operator[]=(index, value) {}
97 var add; 97 var add;
98 } 98 }
99 class JSMutableArray extends JSArray implements JSMutableIndexable {} 99 class JSMutableArray extends JSArray implements JSMutableIndexable {}
100 class JSFixedArray extends JSMutableArray {} 100 class JSFixedArray extends JSMutableArray {}
101 class JSExtendableArray extends JSMutableArray {} 101 class JSExtendableArray extends JSMutableArray {}
102 class JSString extends Interceptor implements String, JSIndexable { 102 class JSString extends Interceptor implements String, JSIndexable {
103 var length; 103 var length;
104 operator[](index) {} 104 operator[](index) {}
105 toString() {} 105 toString() {}
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 } 431 }
432 } 432 }
433 433
434 class MockDeferredLoadTask extends DeferredLoadTask { 434 class MockDeferredLoadTask extends DeferredLoadTask {
435 MockDeferredLoadTask(Compiler compiler) : super(compiler); 435 MockDeferredLoadTask(Compiler compiler) : super(compiler);
436 436
437 void registerMainApp(LibraryElement mainApp) { 437 void registerMainApp(LibraryElement mainApp) {
438 // Do nothing. 438 // Do nothing.
439 } 439 }
440 } 440 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698