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

Side by Side Diff: test/codegen/expect/collection/src/unmodifiable_wrappers.js

Issue 1483813002: Use const for const/final top-levels, types, symbols. (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Rebased after vsm's regen Created 5 years 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
OLDNEW
1 dart_library.library('collection/src/unmodifiable_wrappers', null, /* Imports */ [ 1 dart_library.library('collection/src/unmodifiable_wrappers', null, /* Imports */ [
2 "dart/_runtime", 2 "dart/_runtime",
3 'dart/collection', 3 'dart/collection',
4 'dart/core' 4 'dart/core'
5 ], /* Lazy imports */[ 5 ], /* Lazy imports */[
6 'collection/wrappers' 6 'collection/wrappers'
7 ], function(exports, dart, collection, core, wrappers) { 7 ], function(exports, dart, collection, core, wrappers) {
8 'use strict'; 8 'use strict';
9 let dartx = dart.dartx; 9 let dartx = dart.dartx;
10 dart.export(exports, collection, ['UnmodifiableListView', 'UnmodifiableMapView '], []); 10 dart.export(exports, collection, ['UnmodifiableListView', 'UnmodifiableMapView '], []);
11 let NonGrowableListMixin$ = dart.generic(function(E) { 11 const NonGrowableListMixin$ = dart.generic(function(E) {
12 class NonGrowableListMixin extends core.Object { 12 class NonGrowableListMixin extends core.Object {
13 static _throw() { 13 static _throw() {
14 dart.throw(new core.UnsupportedError("Cannot change the length of a fixe d-length list")); 14 dart.throw(new core.UnsupportedError("Cannot change the length of a fixe d-length list"));
15 } 15 }
16 set length(newLength) { 16 set length(newLength) {
17 return NonGrowableListMixin$()._throw(); 17 return NonGrowableListMixin$()._throw();
18 } 18 }
19 add(value) { 19 add(value) {
20 dart.as(value, E); 20 dart.as(value, E);
21 return dart.as(NonGrowableListMixin$()._throw(), core.bool); 21 return dart.as(NonGrowableListMixin$()._throw(), core.bool);
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 'removeWhere', 90 'removeWhere',
91 'retainWhere', 91 'retainWhere',
92 'removeRange', 92 'removeRange',
93 'replaceRange', 93 'replaceRange',
94 'clear', 94 'clear',
95 'length' 95 'length'
96 ]); 96 ]);
97 return NonGrowableListMixin; 97 return NonGrowableListMixin;
98 }); 98 });
99 let NonGrowableListMixin = NonGrowableListMixin$(); 99 let NonGrowableListMixin = NonGrowableListMixin$();
100 let NonGrowableListView$ = dart.generic(function(E) { 100 const NonGrowableListView$ = dart.generic(function(E) {
101 class NonGrowableListView extends dart.mixin(wrappers.DelegatingList$(E), No nGrowableListMixin$(E)) { 101 class NonGrowableListView extends dart.mixin(wrappers.DelegatingList$(E), No nGrowableListMixin$(E)) {
102 NonGrowableListView(listBase) { 102 NonGrowableListView(listBase) {
103 super.DelegatingList(listBase); 103 super.DelegatingList(listBase);
104 } 104 }
105 } 105 }
106 dart.setSignature(NonGrowableListView, { 106 dart.setSignature(NonGrowableListView, {
107 constructors: () => ({NonGrowableListView: [exports.NonGrowableListView$(E ), [core.List$(E)]]}) 107 constructors: () => ({NonGrowableListView: [exports.NonGrowableListView$(E ), [core.List$(E)]]})
108 }); 108 });
109 return NonGrowableListView; 109 return NonGrowableListView;
110 }); 110 });
111 dart.defineLazyClassGeneric(exports, 'NonGrowableListView', {get: NonGrowableL istView$}); 111 dart.defineLazyClassGeneric(exports, 'NonGrowableListView', {get: NonGrowableL istView$});
112 let _throw = Symbol('_throw'); 112 const _throw = Symbol('_throw');
113 let UnmodifiableSetMixin$ = dart.generic(function(E) { 113 const UnmodifiableSetMixin$ = dart.generic(function(E) {
114 class UnmodifiableSetMixin extends core.Object { 114 class UnmodifiableSetMixin extends core.Object {
115 [_throw]() { 115 [_throw]() {
116 dart.throw(new core.UnsupportedError("Cannot modify an unmodifiable Set" )); 116 dart.throw(new core.UnsupportedError("Cannot modify an unmodifiable Set" ));
117 } 117 }
118 add(value) { 118 add(value) {
119 dart.as(value, E); 119 dart.as(value, E);
120 return dart.as(this[_throw](), core.bool); 120 return dart.as(this[_throw](), core.bool);
121 } 121 }
122 addAll(elements) { 122 addAll(elements) {
123 dart.as(elements, core.Iterable$(E)); 123 dart.as(elements, core.Iterable$(E));
(...skipping 30 matching lines...) Expand all
154 removeAll: [dart.void, [core.Iterable]], 154 removeAll: [dart.void, [core.Iterable]],
155 retainAll: [dart.void, [core.Iterable]], 155 retainAll: [dart.void, [core.Iterable]],
156 removeWhere: [dart.void, [dart.functionType(core.bool, [E])]], 156 removeWhere: [dart.void, [dart.functionType(core.bool, [E])]],
157 retainWhere: [dart.void, [dart.functionType(core.bool, [E])]], 157 retainWhere: [dart.void, [dart.functionType(core.bool, [E])]],
158 clear: [dart.void, []] 158 clear: [dart.void, []]
159 }) 159 })
160 }); 160 });
161 return UnmodifiableSetMixin; 161 return UnmodifiableSetMixin;
162 }); 162 });
163 let UnmodifiableSetMixin = UnmodifiableSetMixin$(); 163 let UnmodifiableSetMixin = UnmodifiableSetMixin$();
164 let UnmodifiableSetView$ = dart.generic(function(E) { 164 const UnmodifiableSetView$ = dart.generic(function(E) {
165 class UnmodifiableSetView extends dart.mixin(wrappers.DelegatingSet$(E), Unm odifiableSetMixin$(E)) { 165 class UnmodifiableSetView extends dart.mixin(wrappers.DelegatingSet$(E), Unm odifiableSetMixin$(E)) {
166 UnmodifiableSetView(setBase) { 166 UnmodifiableSetView(setBase) {
167 super.DelegatingSet(setBase); 167 super.DelegatingSet(setBase);
168 } 168 }
169 } 169 }
170 dart.setSignature(UnmodifiableSetView, { 170 dart.setSignature(UnmodifiableSetView, {
171 constructors: () => ({UnmodifiableSetView: [exports.UnmodifiableSetView$(E ), [core.Set$(E)]]}) 171 constructors: () => ({UnmodifiableSetView: [exports.UnmodifiableSetView$(E ), [core.Set$(E)]]})
172 }); 172 });
173 return UnmodifiableSetView; 173 return UnmodifiableSetView;
174 }); 174 });
175 dart.defineLazyClassGeneric(exports, 'UnmodifiableSetView', {get: Unmodifiable SetView$}); 175 dart.defineLazyClassGeneric(exports, 'UnmodifiableSetView', {get: Unmodifiable SetView$});
176 let UnmodifiableMapMixin$ = dart.generic(function(K, V) { 176 const UnmodifiableMapMixin$ = dart.generic(function(K, V) {
177 class UnmodifiableMapMixin extends core.Object { 177 class UnmodifiableMapMixin extends core.Object {
178 static _throw() { 178 static _throw() {
179 dart.throw(new core.UnsupportedError("Cannot modify an unmodifiable Map" )); 179 dart.throw(new core.UnsupportedError("Cannot modify an unmodifiable Map" ));
180 } 180 }
181 set(key, value) { 181 set(key, value) {
182 (() => { 182 (() => {
183 dart.as(key, K); 183 dart.as(key, K);
184 dart.as(value, V); 184 dart.as(value, V);
185 return UnmodifiableMapMixin$()._throw(); 185 return UnmodifiableMapMixin$()._throw();
186 })(); 186 })();
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 // Exports: 220 // Exports:
221 exports.NonGrowableListMixin$ = NonGrowableListMixin$; 221 exports.NonGrowableListMixin$ = NonGrowableListMixin$;
222 exports.NonGrowableListMixin = NonGrowableListMixin; 222 exports.NonGrowableListMixin = NonGrowableListMixin;
223 exports.NonGrowableListView$ = NonGrowableListView$; 223 exports.NonGrowableListView$ = NonGrowableListView$;
224 exports.UnmodifiableSetMixin$ = UnmodifiableSetMixin$; 224 exports.UnmodifiableSetMixin$ = UnmodifiableSetMixin$;
225 exports.UnmodifiableSetMixin = UnmodifiableSetMixin; 225 exports.UnmodifiableSetMixin = UnmodifiableSetMixin;
226 exports.UnmodifiableSetView$ = UnmodifiableSetView$; 226 exports.UnmodifiableSetView$ = UnmodifiableSetView$;
227 exports.UnmodifiableMapMixin$ = UnmodifiableMapMixin$; 227 exports.UnmodifiableMapMixin$ = UnmodifiableMapMixin$;
228 exports.UnmodifiableMapMixin = UnmodifiableMapMixin; 228 exports.UnmodifiableMapMixin = UnmodifiableMapMixin;
229 }); 229 });
OLDNEW
« no previous file with comments | « test/codegen/expect/collection/src/queue_list.js ('k') | test/codegen/expect/collection/src/utils.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698