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

Side by Side Diff: lib/runtime/dart/collection.js

Issue 1055923002: Don't call dinvoke on Object methods (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: modify test Created 5 years, 8 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
OLDNEW
1 var collection; 1 var collection;
2 (function(exports) { 2 (function(exports) {
3 'use strict'; 3 'use strict';
4 let _source = Symbol('_source'); 4 let _source = Symbol('_source');
5 let UnmodifiableListView$ = dart.generic(function(E) { 5 let UnmodifiableListView$ = dart.generic(function(E) {
6 class UnmodifiableListView extends _internal.UnmodifiableListBase$(E) { 6 class UnmodifiableListView extends _internal.UnmodifiableListBase$(E) {
7 UnmodifiableListView(source) { 7 UnmodifiableListView(source) {
8 this[_source] = source; 8 this[_source] = source;
9 super.UnmodifiableListBase(); 9 super.UnmodifiableListBase();
10 } 10 }
11 get length() { 11 get length() {
12 return this[_source].length; 12 return this[_source].length;
13 } 13 }
14 get(index) { 14 get(index) {
15 return this[_source].elementAt(index); 15 return this[_source].elementAt(index);
16 } 16 }
17 } 17 }
18 return UnmodifiableListView; 18 return UnmodifiableListView;
19 }); 19 });
20 dart.defineLazyClassGeneric(exports, 'UnmodifiableListView', {get: Unmodifiabl eListView$}); 20 dart.defineLazyClassGeneric(exports, 'UnmodifiableListView', {get: Unmodifiabl eListView$});
21 // Function _defaultEquals: (dynamic, dynamic) → bool 21 // Function _defaultEquals: (dynamic, dynamic) → bool
22 function _defaultEquals(a, b) { 22 function _defaultEquals(a, b) {
23 return dart.equals(a, b); 23 return dart.equals(a, b);
24 } 24 }
25 // Function _defaultHashCode: (dynamic) → int 25 // Function _defaultHashCode: (dynamic) → int
26 function _defaultHashCode(a) { 26 function _defaultHashCode(a) {
27 return dart.as(dart.dload(a, 'hashCode'), core.int); 27 return dart.as(a.hashCode, core.int);
28 } 28 }
29 let HashMap$ = dart.generic(function(K, V) { 29 let HashMap$ = dart.generic(function(K, V) {
30 class HashMap extends core.Object { 30 class HashMap extends core.Object {
31 HashMap(opts) { 31 HashMap(opts) {
32 let equals = opts && 'equals' in opts ? opts.equals : null; 32 let equals = opts && 'equals' in opts ? opts.equals : null;
33 let hashCode = opts && 'hashCode' in opts ? opts.hashCode : null; 33 let hashCode = opts && 'hashCode' in opts ? opts.hashCode : null;
34 let isValidKey = opts && 'isValidKey' in opts ? opts.isValidKey : null; 34 let isValidKey = opts && 'isValidKey' in opts ? opts.isValidKey : null;
35 if (isValidKey == null) { 35 if (isValidKey == null) {
36 if (hashCode == null) { 36 if (hashCode == null) {
37 if (equals == null) { 37 if (equals == null) {
(...skipping 3512 matching lines...) Expand 10 before | Expand all | Expand 10 after
3550 return null; 3550 return null;
3551 } 3551 }
3552 } 3552 }
3553 static [_isStringKey](key) { 3553 static [_isStringKey](key) {
3554 return dart.notNull(typeof key == 'string') && dart.notNull(!dart.equals (key, '__proto__')); 3554 return dart.notNull(typeof key == 'string') && dart.notNull(!dart.equals (key, '__proto__'));
3555 } 3555 }
3556 static [_isNumericKey](key) { 3556 static [_isNumericKey](key) {
3557 return dart.notNull(dart.is(key, core.num)) && (key & 0x3ffffff) === key ; 3557 return dart.notNull(dart.is(key, core.num)) && (key & 0x3ffffff) === key ;
3558 } 3558 }
3559 [_computeHashCode](key) { 3559 [_computeHashCode](key) {
3560 return dart.dload(key, 'hashCode') & 0x3ffffff; 3560 return key.hashCode & 0x3ffffff;
3561 } 3561 }
3562 static [_hasTableEntry](table, key) { 3562 static [_hasTableEntry](table, key) {
3563 let entry = table[key]; 3563 let entry = table[key];
3564 return entry != null; 3564 return entry != null;
3565 } 3565 }
3566 static [_getTableEntry](table, key) { 3566 static [_getTableEntry](table, key) {
3567 let entry = table[key]; 3567 let entry = table[key];
3568 return entry === table ? null : entry; 3568 return entry === table ? null : entry;
3569 } 3569 }
3570 static [_setTableEntry](table, key, value) { 3570 static [_setTableEntry](table, key, value) {
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
3958 this[_length] = dart.notNull(this[_length]) - 1; 3958 this[_length] = dart.notNull(this[_length]) - 1;
3959 this[_modified](); 3959 this[_modified]();
3960 } 3960 }
3961 static [_isStringKey](key) { 3961 static [_isStringKey](key) {
3962 return dart.notNull(typeof key == 'string') && dart.notNull(!dart.equals (key, '__proto__')); 3962 return dart.notNull(typeof key == 'string') && dart.notNull(!dart.equals (key, '__proto__'));
3963 } 3963 }
3964 static [_isNumericKey](key) { 3964 static [_isNumericKey](key) {
3965 return dart.notNull(dart.is(key, core.num)) && (key & 0x3ffffff) === key ; 3965 return dart.notNull(dart.is(key, core.num)) && (key & 0x3ffffff) === key ;
3966 } 3966 }
3967 [_computeHashCode](key) { 3967 [_computeHashCode](key) {
3968 return dart.dload(key, 'hashCode') & 0x3ffffff; 3968 return key.hashCode & 0x3ffffff;
3969 } 3969 }
3970 static [_getTableEntry](table, key) { 3970 static [_getTableEntry](table, key) {
3971 return table[key]; 3971 return table[key];
3972 } 3972 }
3973 static [_setTableEntry](table, key, value) { 3973 static [_setTableEntry](table, key, value) {
3974 dart.assert(value != null); 3974 dart.assert(value != null);
3975 table[key] = value; 3975 table[key] = value;
3976 } 3976 }
3977 static [_deleteTableEntry](table, key) { 3977 static [_deleteTableEntry](table, key) {
3978 delete table[key]; 3978 delete table[key];
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
4334 return false; 4334 return false;
4335 } 4335 }
4336 } 4336 }
4337 static [_isStringElement](element) { 4337 static [_isStringElement](element) {
4338 return dart.notNull(typeof element == 'string') && dart.notNull(!dart.eq uals(element, '__proto__')); 4338 return dart.notNull(typeof element == 'string') && dart.notNull(!dart.eq uals(element, '__proto__'));
4339 } 4339 }
4340 static [_isNumericElement](element) { 4340 static [_isNumericElement](element) {
4341 return dart.notNull(dart.is(element, core.num)) && (element & 0x3ffffff) === element; 4341 return dart.notNull(dart.is(element, core.num)) && (element & 0x3ffffff) === element;
4342 } 4342 }
4343 [_computeHashCode](element) { 4343 [_computeHashCode](element) {
4344 return dart.dload(element, 'hashCode') & 0x3ffffff; 4344 return element.hashCode & 0x3ffffff;
4345 } 4345 }
4346 static [_hasTableEntry](table, key) { 4346 static [_hasTableEntry](table, key) {
4347 let entry = table[key]; 4347 let entry = table[key];
4348 return entry != null; 4348 return entry != null;
4349 } 4349 }
4350 static [_setTableEntry](table, key, value) { 4350 static [_setTableEntry](table, key, value) {
4351 dart.assert(value != null); 4351 dart.assert(value != null);
4352 table[key] = value; 4352 table[key] = value;
4353 } 4353 }
4354 static [_deleteTableEntry](table, key) { 4354 static [_deleteTableEntry](table, key) {
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
4706 this[_length] = dart.notNull(this[_length]) - 1; 4706 this[_length] = dart.notNull(this[_length]) - 1;
4707 this[_modified](); 4707 this[_modified]();
4708 } 4708 }
4709 static [_isStringElement](element) { 4709 static [_isStringElement](element) {
4710 return dart.notNull(typeof element == 'string') && dart.notNull(!dart.eq uals(element, '__proto__')); 4710 return dart.notNull(typeof element == 'string') && dart.notNull(!dart.eq uals(element, '__proto__'));
4711 } 4711 }
4712 static [_isNumericElement](element) { 4712 static [_isNumericElement](element) {
4713 return dart.notNull(dart.is(element, core.num)) && (element & 0x3ffffff) === element; 4713 return dart.notNull(dart.is(element, core.num)) && (element & 0x3ffffff) === element;
4714 } 4714 }
4715 [_computeHashCode](element) { 4715 [_computeHashCode](element) {
4716 return dart.dload(element, 'hashCode') & 0x3ffffff; 4716 return element.hashCode & 0x3ffffff;
4717 } 4717 }
4718 static [_getTableEntry](table, key) { 4718 static [_getTableEntry](table, key) {
4719 return table[key]; 4719 return table[key];
4720 } 4720 }
4721 static [_setTableEntry](table, key, value) { 4721 static [_setTableEntry](table, key, value) {
4722 dart.assert(value != null); 4722 dart.assert(value != null);
4723 table[key] = value; 4723 table[key] = value;
4724 } 4724 }
4725 static [_deleteTableEntry](table, key) { 4725 static [_deleteTableEntry](table, key) {
4726 delete table[key]; 4726 delete table[key];
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
4930 exports.LinkedHashMapKeyIterable = LinkedHashMapKeyIterable; 4930 exports.LinkedHashMapKeyIterable = LinkedHashMapKeyIterable;
4931 exports.LinkedHashMapKeyIterable$ = LinkedHashMapKeyIterable$; 4931 exports.LinkedHashMapKeyIterable$ = LinkedHashMapKeyIterable$;
4932 exports.LinkedHashMapKeyIterator = LinkedHashMapKeyIterator; 4932 exports.LinkedHashMapKeyIterator = LinkedHashMapKeyIterator;
4933 exports.LinkedHashMapKeyIterator$ = LinkedHashMapKeyIterator$; 4933 exports.LinkedHashMapKeyIterator$ = LinkedHashMapKeyIterator$;
4934 exports.HashSetIterator = HashSetIterator; 4934 exports.HashSetIterator = HashSetIterator;
4935 exports.HashSetIterator$ = HashSetIterator$; 4935 exports.HashSetIterator$ = HashSetIterator$;
4936 exports.LinkedHashSetCell = LinkedHashSetCell; 4936 exports.LinkedHashSetCell = LinkedHashSetCell;
4937 exports.LinkedHashSetIterator = LinkedHashSetIterator; 4937 exports.LinkedHashSetIterator = LinkedHashSetIterator;
4938 exports.LinkedHashSetIterator$ = LinkedHashSetIterator$; 4938 exports.LinkedHashSetIterator$ = LinkedHashSetIterator$;
4939 })(collection || (collection = {})); 4939 })(collection || (collection = {}));
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698