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

Side by Side Diff: test/dart_codegen/expect/collection/splay_tree.dart

Issue 1052383003: Disable closure wrapping by default (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: 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 part of dart.collection; 1 part of dart.collection;
2 typedef bool _Predicate<T>(T value); 2 typedef bool _Predicate<T>(T value);
3 class _SplayTreeNode<K> {final K key; 3 class _SplayTreeNode<K> {final K key;
4 _SplayTreeNode<K> left; 4 _SplayTreeNode<K> left;
5 _SplayTreeNode<K> right; 5 _SplayTreeNode<K> right;
6 _SplayTreeNode(K this.key); 6 _SplayTreeNode(K this.key);
7 } 7 }
8 class _SplayTreeMapNode<K, V> extends _SplayTreeNode<K> {V value; 8 class _SplayTreeMapNode<K, V> extends _SplayTreeNode<K> {V value;
9 _SplayTreeMapNode(K key, V this.value) : super(key); 9 _SplayTreeMapNode(K key, V this.value) : super(key);
10 } 10 }
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 _addNewRoot(new _SplayTreeNode<E>(element), compare); 472 _addNewRoot(new _SplayTreeNode<E>(element), compare);
473 } 473 }
474 } 474 }
475 } 475 }
476 void removeAll(Iterable<Object> elements) { 476 void removeAll(Iterable<Object> elements) {
477 for (Object element in elements) { 477 for (Object element in elements) {
478 if (_validKey(element)) _remove(DEVC$RT.cast(element, Object, E, "CompositeCast" , """line 767, column 39 of dart:collection/splay_tree.dart: """, element is E, false)); 478 if (_validKey(element)) _remove(DEVC$RT.cast(element, Object, E, "CompositeCast" , """line 767, column 39 of dart:collection/splay_tree.dart: """, element is E, false));
479 } 479 }
480 } 480 }
481 void retainAll(Iterable<Object> elements) { 481 void retainAll(Iterable<Object> elements) {
482 SplayTreeSet<E> retainSet = new SplayTreeSet<E>(DEVC$RT.wrap((int f(dynamic __u2 8, dynamic __u29)) { 482 SplayTreeSet<E> retainSet = new SplayTreeSet<E>(DEVC$RT.cast(_comparator, __t23, DEVC$RT.type((__t28<E> _) {
483 int c(dynamic x0, dynamic x1) => f(x0, x1);
484 return f == null ? null : c;
485 } 483 }
486 , _comparator, __t23, DEVC$RT.type((__t30<E> _) { 484 ), "CompositeCast", """line 773, column 53 of dart:collection/splay_tree.dart: " "", _comparator is __t28<E>, false), _validKey);
487 }
488 ), "Wrap", """line 773, column 53 of dart:collection/splay_tree.dart: """, _comp arator is __t30<E>), _validKey);
489 int modificationCount = _modificationCount; 485 int modificationCount = _modificationCount;
490 for (Object object in elements) { 486 for (Object object in elements) {
491 if (modificationCount != _modificationCount) { 487 if (modificationCount != _modificationCount) {
492 throw new ConcurrentModificationError(this); 488 throw new ConcurrentModificationError(this);
493 } 489 }
494 if (_validKey(object) && _splay(DEVC$RT.cast(object, Object, E, "CompositeCast" , """line 781, column 39 of dart:collection/splay_tree.dart: """, object is E, f alse)) == 0) retainSet.add(_root.key); 490 if (_validKey(object) && _splay(DEVC$RT.cast(object, Object, E, "CompositeCast" , """line 781, column 39 of dart:collection/splay_tree.dart: """, object is E, f alse)) == 0) retainSet.add(_root.key);
495 } 491 }
496 if (retainSet._count != _count) { 492 if (retainSet._count != _count) {
497 _root = retainSet._root; 493 _root = retainSet._root;
498 _count = retainSet._count; 494 _count = retainSet._count;
499 _modificationCount++; 495 _modificationCount++;
500 } 496 }
501 } 497 }
502 E lookup(Object object) { 498 E lookup(Object object) {
503 if (!_validKey(object)) return null; 499 if (!_validKey(object)) return null;
504 int comp = _splay(DEVC$RT.cast(object, Object, E, "CompositeCast", """line 793, column 23 of dart:collection/splay_tree.dart: """, object is E, false)); 500 int comp = _splay(DEVC$RT.cast(object, Object, E, "CompositeCast", """line 793, column 23 of dart:collection/splay_tree.dart: """, object is E, false));
505 if (comp != 0) return null; 501 if (comp != 0) return null;
506 return _root.key; 502 return _root.key;
507 } 503 }
508 Set<E> intersection(Set<E> other) { 504 Set<E> intersection(Set<E> other) {
509 Set<E> result = new SplayTreeSet<E>(DEVC$RT.wrap((int f(dynamic __u33, dynamic _ _u34)) { 505 Set<E> result = new SplayTreeSet<E>(DEVC$RT.cast(_comparator, __t23, DEVC$RT.typ e((__t28<E> _) {
510 int c(dynamic x0, dynamic x1) => f(x0, x1);
511 return f == null ? null : c;
512 } 506 }
513 , _comparator, __t23, DEVC$RT.type((__t30<E> _) { 507 ), "CompositeCast", """line 799, column 41 of dart:collection/splay_tree.dart: " "", _comparator is __t28<E>, false), _validKey);
514 }
515 ), "Wrap", """line 799, column 41 of dart:collection/splay_tree.dart: """, _comp arator is __t30<E>), _validKey);
516 for (E element in this) { 508 for (E element in this) {
517 if (other.contains(element)) result.add(element); 509 if (other.contains(element)) result.add(element);
518 } 510 }
519 return result; 511 return result;
520 } 512 }
521 Set<E> difference(Set<E> other) { 513 Set<E> difference(Set<E> other) {
522 Set<E> result = new SplayTreeSet<E>(DEVC$RT.wrap((int f(dynamic __u35, dynamic _ _u36)) { 514 Set<E> result = new SplayTreeSet<E>(DEVC$RT.cast(_comparator, __t23, DEVC$RT.typ e((__t28<E> _) {
523 int c(dynamic x0, dynamic x1) => f(x0, x1);
524 return f == null ? null : c;
525 } 515 }
526 , _comparator, __t23, DEVC$RT.type((__t30<E> _) { 516 ), "CompositeCast", """line 807, column 41 of dart:collection/splay_tree.dart: " "", _comparator is __t28<E>, false), _validKey);
527 }
528 ), "Wrap", """line 807, column 41 of dart:collection/splay_tree.dart: """, _comp arator is __t30<E>), _validKey);
529 for (E element in this) { 517 for (E element in this) {
530 if (!other.contains(element)) result.add(element); 518 if (!other.contains(element)) result.add(element);
531 } 519 }
532 return result; 520 return result;
533 } 521 }
534 Set<E> union(Set<E> other) { 522 Set<E> union(Set<E> other) {
535 return _clone()..addAll(other); 523 return _clone()..addAll(other);
536 } 524 }
537 SplayTreeSet<E> _clone() { 525 SplayTreeSet<E> _clone() {
538 var set = new SplayTreeSet<E>(DEVC$RT.wrap((int f(dynamic __u37, dynamic __u38)) { 526 var set = new SplayTreeSet<E>(DEVC$RT.cast(_comparator, __t23, DEVC$RT.type((__t 28<E> _) {
539 int c(dynamic x0, dynamic x1) => f(x0, x1);
540 return f == null ? null : c;
541 } 527 }
542 , _comparator, __t23, DEVC$RT.type((__t30<E> _) { 528 ), "CompositeCast", """line 819, column 35 of dart:collection/splay_tree.dart: " "", _comparator is __t28<E>, false), _validKey);
543 }
544 ), "Wrap", """line 819, column 35 of dart:collection/splay_tree.dart: """, _comp arator is __t30<E>), _validKey);
545 set._count = _count; 529 set._count = _count;
546 set._root = _copyNode(_root); 530 set._root = _copyNode(_root);
547 return set; 531 return set;
548 } 532 }
549 _SplayTreeNode<E> _copyNode(_SplayTreeNode<E> node) { 533 _SplayTreeNode<E> _copyNode(_SplayTreeNode<E> node) {
550 if (node == null) return null; 534 if (node == null) return null;
551 return new _SplayTreeNode<E>(node.key)..left = _copyNode(node.left)..right = _c opyNode(node.right); 535 return new _SplayTreeNode<E>(node.key)..left = _copyNode(node.left)..right = _c opyNode(node.right);
552 } 536 }
553 void clear() { 537 void clear() {
554 _clear(); 538 _clear();
555 } 539 }
556 Set<E> toSet() => _clone(); 540 Set<E> toSet() => _clone();
557 String toString() => IterableBase.iterableToFullString(this, '{', '}'); 541 String toString() => IterableBase.iterableToFullString(this, '{', '}');
558 } 542 }
559 typedef int __t12<K>(K __u13, K __u14); 543 typedef int __t12<K>(K __u13, K __u14);
560 typedef bool __t16(dynamic __u17); 544 typedef bool __t16(dynamic __u17);
561 typedef int __t20<K>(K __u21, K __u22); 545 typedef int __t20<K>(K __u21, K __u22);
562 typedef int __t23(dynamic __u24, dynamic __u25); 546 typedef int __t23(dynamic __u24, dynamic __u25);
563 typedef int __t30<E>(E __u31, E __u32); 547 typedef int __t28<E>(E __u29, E __u30);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698