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

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

Issue 75703002: Revert "This change makes it easier to put type parameters on JavaScript Arrays." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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:async'; 8 import 'dart:async';
9 import 'dart:collection'; 9 import 'dart:collection';
10 10
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 toString() {} 95 toString() {}
96 bool operator==(other) => identical(this, other); 96 bool operator==(other) => identical(this, other);
97 get hashCode => throw "Interceptor.hashCode not implemented."; 97 get hashCode => throw "Interceptor.hashCode not implemented.";
98 noSuchMethod(im) { throw im; } 98 noSuchMethod(im) { throw im; }
99 } 99 }
100 abstract class JSIndexable { 100 abstract class JSIndexable {
101 get length; 101 get length;
102 operator[](index); 102 operator[](index);
103 } 103 }
104 abstract class JSMutableIndexable extends JSIndexable {} 104 abstract class JSMutableIndexable extends JSIndexable {}
105 class JSArray<E> extends Interceptor implements List<E>, JSIndexable { 105 class JSArray extends Interceptor implements List, JSIndexable {
106 JSArray();
107 factory JSArray.typed(a) => a;
108 var length; 106 var length;
109 operator[](index) => this[index]; 107 operator[](index) => this[index];
110 operator[]=(index, value) { this[index] = value; } 108 operator[]=(index, value) { this[index] = value; }
111 add(value) { this[length + 1] = value; } 109 add(value) { this[length + 1] = value; }
112 removeAt(index) {} 110 removeAt(index) {}
113 insert(index, value) {} 111 insert(index, value) {}
114 removeLast() {} 112 removeLast() {}
115 } 113 }
116 class JSMutableArray extends JSArray implements JSMutableIndexable {} 114 class JSMutableArray extends JSArray implements JSMutableIndexable {}
117 class JSFixedArray extends JSMutableArray {} 115 class JSFixedArray extends JSMutableArray {}
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 } else { 504 } else {
507 sourceFile = compiler.sourceFiles[uri.toString()]; 505 sourceFile = compiler.sourceFiles[uri.toString()];
508 } 506 }
509 if (sourceFile != null && begin != null && end != null) { 507 if (sourceFile != null && begin != null && end != null) {
510 print(sourceFile.getLocationMessage(message, begin, end, true, (x) => x)); 508 print(sourceFile.getLocationMessage(message, begin, end, true, (x) => x));
511 } else { 509 } else {
512 print(message); 510 print(message);
513 } 511 }
514 }; 512 };
515 } 513 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/mirrors_used_test.dart ('k') | tests/compiler/dart2js/resolver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698