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

Unified Diff: pkg/compiler/lib/src/js_emitter/startup_emitter/deferred_fragment_hash.dart

Issue 1235973004: dart2js: Use the correct hashes for deferred code in the startup-emitter. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address comments. Created 5 years, 5 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: pkg/compiler/lib/src/js_emitter/startup_emitter/deferred_fragment_hash.dart
diff --git a/pkg/compiler/lib/src/js_emitter/full_emitter/deferred_output_unit_hash.dart b/pkg/compiler/lib/src/js_emitter/startup_emitter/deferred_fragment_hash.dart
similarity index 55%
copy from pkg/compiler/lib/src/js_emitter/full_emitter/deferred_output_unit_hash.dart
copy to pkg/compiler/lib/src/js_emitter/startup_emitter/deferred_fragment_hash.dart
index 8c79a8b20635f6d5505170ed3392434b964a0dcb..4c09dcf0eac4fdf575de7be32cfb2f907f56d38c 100644
--- a/pkg/compiler/lib/src/js_emitter/full_emitter/deferred_output_unit_hash.dart
+++ b/pkg/compiler/lib/src/js_emitter/startup_emitter/deferred_fragment_hash.dart
@@ -2,23 +2,25 @@
// 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.
-part of dart2js.js_emitter.full_emitter;
+part of dart2js.js_emitter.startup_emitter.model_emitter;
-class _DeferredOutputUnitHash extends jsAst.DeferredString {
+class _DeferredFragmentHash extends js.DeferredString {
String _hash;
- final OutputUnit _outputUnit;
+ final DeferredFragment _fragment;
- _DeferredOutputUnitHash(this._outputUnit);
+ _DeferredFragmentHash(this._fragment);
void setHash(String hash) {
assert(_hash == null);
_hash = hash;
}
+ @override
String get value {
assert(_hash != null);
+ // Note the additional quotes in the returned value.
return '"$_hash"';
}
- String toString() => "HashCode for ${_outputUnit} [$_hash]";
+ String toString() => "HashCode for ${_fragment} [$_hash]";
}
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/code_emitter_task.dart ('k') | pkg/compiler/lib/src/js_emitter/startup_emitter/emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698