Index: dart/sdk/lib/_internal/pub/asset/dart/transformer_isolate.dart |
diff --git a/dart/sdk/lib/_internal/pub/asset/dart/transformer_isolate.dart b/dart/sdk/lib/_internal/pub/asset/dart/transformer_isolate.dart |
index 3b668417ef5321553086efd41ce71ef461d7c1d3..7c6cee56527f0b43649e190f5058e8b6b8c4c402 100644 |
--- a/dart/sdk/lib/_internal/pub/asset/dart/transformer_isolate.dart |
+++ b/dart/sdk/lib/_internal/pub/asset/dart/transformer_isolate.dart |
@@ -22,7 +22,7 @@ void loadTransformers(SendPort replyTo) { |
var configuration = JSON.decode(message['configuration']); |
var mode = new BarbackMode(message['mode']); |
return _initialize(library, configuration, mode). |
- map(serializeTransformerOrGroup).toList(); |
+ map(serializeTransformerLike).toList(); |
}); |
}); |
} |
@@ -34,6 +34,7 @@ void loadTransformers(SendPort replyTo) { |
List _initialize(Uri uri, Map configuration, BarbackMode mode) { |
var mirrors = currentMirrorSystem(); |
var transformerClass = reflectClass(Transformer); |
+ var aggregateClass = _aggregateTransformerClass; |
var groupClass = reflectClass(TransformerGroup); |
var seen = new Set(); |
@@ -57,7 +58,9 @@ List _initialize(Uri uri, Map configuration, BarbackMode mode) { |
if (classMirror.isPrivate) return null; |
if (classMirror.isAbstract) return null; |
if (!classMirror.isSubtypeOf(transformerClass) && |
- !classMirror.isSubtypeOf(groupClass)) { |
+ !classMirror.isSubtypeOf(groupClass) && |
+ (aggregateClass == null || |
+ !classMirror.isSubtypeOf(aggregateClass))) { |
return null; |
} |
@@ -86,3 +89,10 @@ MethodMirror _getConstructor(ClassMirror classMirror, String constructor) { |
if (candidate is MethodMirror && candidate.isConstructor) return candidate; |
return null; |
} |
+ |
+//# if barback >=0.14.1-dev |
Bob Nystrom
2014/06/09 22:05:48
Document this.
nweiz
2014/06/10 19:19:36
Done.
|
+ ClassMirror get _aggregateTransformerClass => |
+ reflectClass(AggregateTransformer); |
+//# else |
+//> ClassMirror get _aggregateTransformerClass => null; |
+//# end |