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

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

Issue 559833004: Cache snapshots of (mostly) immutable transformer phases. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes 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/transformer_isolate.dart
diff --git a/sdk/lib/_internal/pub_generated/lib/src/barback/transformer_isolate.dart b/sdk/lib/_internal/pub_generated/lib/src/barback/transformer_isolate.dart
index 7e7f14ccf8da1dfdf17ea600a5d1e038edbc7aab..f45a9a81345740706adb952af707142c0ac4c0f2 100644
--- a/sdk/lib/_internal/pub_generated/lib/src/barback/transformer_isolate.dart
+++ b/sdk/lib/_internal/pub_generated/lib/src/barback/transformer_isolate.dart
@@ -21,7 +21,7 @@ class TransformerIsolate {
final Map<TransformerId, Uri> _idsToUrls;
final BarbackMode _mode;
static Future<TransformerIsolate> spawn(AssetEnvironment environment,
- BarbackServer transformerServer, List<TransformerId> ids) {
+ BarbackServer transformerServer, List<TransformerId> ids, {String snapshot}) {
return mapFromIterableAsync(ids, value: (id) {
return id.getAssetId(environment.barback);
}).then((idsToAssetIds) {
@@ -43,7 +43,8 @@ class TransformerIsolate {
var port = new ReceivePort();
return dart.runInIsolate(
code.toString(),
- port.sendPort).then((_) => port.first).then((sendPort) {
+ port.sendPort,
+ snapshot: snapshot).then((_) => port.first).then((sendPort) {
return new TransformerIsolate._(sendPort, environment.mode, idsToUrls);
}).catchError((error, stackTrace) {
if (error is! CrossIsolateException) throw error;
@@ -61,7 +62,7 @@ class TransformerIsolate {
TransformerIsolate._(this._port, this._mode, this._idsToUrls);
Future<Set<Transformer>> create(TransformerConfig config) {
return call(_port, {
- 'library': _idsToUrls[config.id].toString(),
+ 'library': _idsToUrls[config.id].path.toString(),
'mode': _mode.name,
'configuration': JSON.encode(config.configuration)
}).then((transformers) {

Powered by Google App Engine
This is Rietveld 408576698