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

Unified Diff: sdk/lib/_internal/pub_generated/lib/src/barback/foreign_transformer.dart

Issue 557563002: Store the async-await compiled pub code directly in the repo. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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
Index: sdk/lib/_internal/pub_generated/lib/src/barback/foreign_transformer.dart
diff --git a/sdk/lib/_internal/pub/lib/src/barback/foreign_transformer.dart b/sdk/lib/_internal/pub_generated/lib/src/barback/foreign_transformer.dart
similarity index 62%
copy from sdk/lib/_internal/pub/lib/src/barback/foreign_transformer.dart
copy to sdk/lib/_internal/pub_generated/lib/src/barback/foreign_transformer.dart
index 7816a98e19ee01ee45d4c70f9bc49c0a2c674a67..d663fac12687799a934e076201b1a81ffbc44dd1 100644
--- a/sdk/lib/_internal/pub/lib/src/barback/foreign_transformer.dart
+++ b/sdk/lib/_internal/pub_generated/lib/src/barback/foreign_transformer.dart
@@ -1,56 +1,34 @@
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
library pub.foreign_transformer;
-
import 'dart:async';
import 'dart:isolate';
-
import 'package:barback/barback.dart';
-
import '../../../asset/dart/serialize.dart';
import 'excluding_transformer.dart';
import 'excluding_aggregate_transformer.dart';
import 'transformer_config.dart';
-
-/// A wrapper for a transformer that's in a different isolate.
class _ForeignTransformer extends Transformer {
- /// The port with which we communicate with the child isolate.
- ///
- /// This port and all messages sent across it are specific to this
- /// transformer.
final SendPort _port;
-
- /// The result of calling [toString] on the transformer in the isolate.
final String _toString;
-
_ForeignTransformer(Map map)
: _port = map['port'],
_toString = map['toString'];
-
Future<bool> isPrimary(AssetId id) {
return call(_port, {
'type': 'isPrimary',
'id': serializeId(id)
});
}
-
Future apply(Transform transform) {
return call(_port, {
'type': 'apply',
'transform': serializeTransform(transform)
});
}
-
String toString() => _toString;
}
-
-class _ForeignDeclaringTransformer extends _ForeignTransformer
- implements DeclaringTransformer {
- _ForeignDeclaringTransformer(Map map)
- : super(map);
-
+class _ForeignDeclaringTransformer extends _ForeignTransformer implements
+ DeclaringTransformer {
+ _ForeignDeclaringTransformer(Map map) : super(map);
Future declareOutputs(DeclaringTransform transform) {
return call(_port, {
'type': 'declareOutputs',
@@ -58,50 +36,33 @@ class _ForeignDeclaringTransformer extends _ForeignTransformer
});
}
}
-
-class _ForeignLazyTransformer extends _ForeignDeclaringTransformer
- implements LazyTransformer {
- _ForeignLazyTransformer(Map map)
- : super(map);
+class _ForeignLazyTransformer extends _ForeignDeclaringTransformer implements
+ LazyTransformer {
+ _ForeignLazyTransformer(Map map) : super(map);
}
-
-/// A wrapper for an aggregate transformer that's in a different isolate.
class _ForeignAggregateTransformer extends AggregateTransformer {
- /// The port with which we communicate with the child isolate.
- ///
- /// This port and all messages sent across it are specific to this
- /// transformer.
final SendPort _port;
-
- /// The result of calling [toString] on the transformer in the isolate.
final String _toString;
-
_ForeignAggregateTransformer(Map map)
: _port = map['port'],
_toString = map['toString'];
-
Future<String> classifyPrimary(AssetId id) {
return call(_port, {
'type': 'classifyPrimary',
'id': serializeId(id)
});
}
-
Future apply(AggregateTransform transform) {
return call(_port, {
'type': 'apply',
'transform': serializeAggregateTransform(transform)
});
}
-
String toString() => _toString;
}
-
class _ForeignDeclaringAggregateTransformer extends _ForeignAggregateTransformer
implements DeclaringAggregateTransformer {
- _ForeignDeclaringAggregateTransformer(Map map)
- : super(map);
-
+ _ForeignDeclaringAggregateTransformer(Map map) : super(map);
Future declareOutputs(DeclaringAggregateTransform transform) {
return call(_port, {
'type': 'declareOutputs',
@@ -109,37 +70,26 @@ class _ForeignDeclaringAggregateTransformer extends _ForeignAggregateTransformer
});
}
}
-
-class _ForeignLazyAggregateTransformer
- extends _ForeignDeclaringAggregateTransformer
- implements LazyAggregateTransformer {
- _ForeignLazyAggregateTransformer(Map map)
- : super(map);
+class _ForeignLazyAggregateTransformer extends
+ _ForeignDeclaringAggregateTransformer implements LazyAggregateTransformer {
+ _ForeignLazyAggregateTransformer(Map map) : super(map);
}
-
-/// A wrapper for a transformer group that's in a different isolate.
class _ForeignGroup implements TransformerGroup {
final Iterable<Iterable> phases;
-
- /// The result of calling [toString] on the transformer group in the isolate.
final String _toString;
-
_ForeignGroup(TransformerConfig config, Map map)
: phases = map['phases'].map((phase) {
- return phase.map((transformer) => deserializeTransformerLike(
- transformer, config)).toList();
- }).toList(),
+ return phase.map(
+ (transformer) => deserializeTransformerLike(transformer, config)).toList();
+ }).toList(),
_toString = map['toString'];
-
String toString() => _toString;
}
-
-/// Converts a serializable map into a [Transformer], an [AggregateTransformer],
-/// or a [TransformerGroup].
deserializeTransformerLike(Map map, TransformerConfig config) {
var transformer;
- switch(map['type']) {
- case 'TransformerGroup': return new _ForeignGroup(config, map);
+ switch (map['type']) {
+ case 'TransformerGroup':
+ return new _ForeignGroup(config, map);
case 'Transformer':
transformer = new _ForeignTransformer(map);
break;
@@ -158,9 +108,9 @@ deserializeTransformerLike(Map map, TransformerConfig config) {
case 'LazyAggregateTransformer':
transformer = new _ForeignLazyAggregateTransformer(map);
break;
- default: assert(false);
+ default:
+ assert(false);
}
-
if (transformer is Transformer) {
return ExcludingTransformer.wrap(transformer, config);
} else {

Powered by Google App Engine
This is Rietveld 408576698