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

Unified Diff: pkg/compiler/lib/src/js_emitter/metadata_collector.dart

Issue 1095523002: dart2js: don't reify type variables for reflectable typedefs. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_emitter/metadata_collector.dart
diff --git a/pkg/compiler/lib/src/js_emitter/metadata_collector.dart b/pkg/compiler/lib/src/js_emitter/metadata_collector.dart
index 48df1396d7382af53e862e07d1ea95a544a56915..bd4ab2977a33f45cc8051c6ee5843a4bb8377247 100644
--- a/pkg/compiler/lib/src/js_emitter/metadata_collector.dart
+++ b/pkg/compiler/lib/src/js_emitter/metadata_collector.dart
@@ -91,16 +91,19 @@ class MetadataCollector {
_emitter.constantReference(constant.value), _compiler).getText());
}
- int reifyType(DartType type) {
+ int reifyType(DartType type, {bool ignoreTypeVariables: false}) {
return reifyTypeForOutputUnit(type,
- _compiler.deferredLoadTask.mainOutputUnit);
+ _compiler.deferredLoadTask.mainOutputUnit,
+ ignoreTypeVariables: ignoreTypeVariables);
}
- int reifyTypeForOutputUnit(DartType type, OutputUnit outputUnit) {
+ int reifyTypeForOutputUnit(DartType type, OutputUnit outputUnit,
+ {bool ignoreTypeVariables: false}) {
jsAst.Expression representation =
_backend.rti.getTypeRepresentation(
type,
(variable) {
+ if (ignoreTypeVariables) return new jsAst.LiteralNull();
return js.number(
_typeVariableHandler.reifyTypeVariable(
variable.element));
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698