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

Unified Diff: pkg/compiler/lib/src/js_backend/runtime_types.dart

Issue 987043002: dart2js: replace null in arrays with array holes in type representations. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 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 | tests/compiler/dart2js/type_representation_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_backend/runtime_types.dart
diff --git a/pkg/compiler/lib/src/js_backend/runtime_types.dart b/pkg/compiler/lib/src/js_backend/runtime_types.dart
index 4e8e3688ed107a195ebc13f246a13c34f212cab5..7d4314579a2a65cb95ffd3abe9dd4e7dee4a8f9e 100644
--- a/pkg/compiler/lib/src/js_backend/runtime_types.dart
+++ b/pkg/compiler/lib/src/js_backend/runtime_types.dart
@@ -663,7 +663,12 @@ class TypeRepresentationGenerator extends DartTypeVisitor {
index++;
}
for (DartType type in types) {
- elements.add(visit(type));
+ jsAst.Expression element = visit(type);
+ if (element is jsAst.LiteralNull) {
+ elements.add(new jsAst.ArrayHole());
+ } else {
+ elements.add(element);
+ }
}
return new jsAst.ArrayInitializer(elements);
}
« no previous file with comments | « no previous file | tests/compiler/dart2js/type_representation_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698