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

Unified Diff: pkg/compiler/lib/src/helpers/debug_collection.dart

Issue 2150333002: Serialize this-types in NativeBehavior separately. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_backend/backend_serialization.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/helpers/debug_collection.dart
diff --git a/pkg/compiler/lib/src/helpers/debug_collection.dart b/pkg/compiler/lib/src/helpers/debug_collection.dart
index c0276cf200f5188398451337083d8e6ba422d5f7..751b8c803b4d6d23aafab8807b92be5b60657716 100644
--- a/pkg/compiler/lib/src/helpers/debug_collection.dart
+++ b/pkg/compiler/lib/src/helpers/debug_collection.dart
@@ -131,12 +131,16 @@ class DebugIterable<E> implements Iterable<E> {
E singleWhere(bool test(E element)) => iterable.singleWhere(test);
E elementAt(int index) => iterable.elementAt(index);
+
+ String toString() => iterable.toString();
}
class DebugList<E> extends DebugIterable<E> implements List<E> {
DebugCallback addCallback;
+ DebugCallback addAllCallback;
- DebugList(List<E> list, {this.addCallback}) : super(list);
+ DebugList(List<E> list, {this.addCallback, this.addAllCallback})
+ : super(list);
List<E> get list => iterable;
@@ -159,7 +163,12 @@ class DebugList<E> extends DebugIterable<E> implements List<E> {
list.add(value);
}
- void addAll(Iterable<E> iterable) => list.addAll(iterable);
+ void addAll(Iterable<E> iterable) {
+ if (addAllCallback != null) {
+ addAllCallback('addAll', iterable, null);
+ }
+ list.addAll(iterable);
+ }
Iterable<E> get reversed => list.reversed;
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_backend/backend_serialization.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698