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

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

Issue 1153243003: dart2js: Use frequency of occurence to sort metadata indices. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Addressed sra's comments Created 5 years, 6 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/helpers.dart
diff --git a/pkg/compiler/lib/src/js_emitter/helpers.dart b/pkg/compiler/lib/src/js_emitter/helpers.dart
index 017094b71868868de7518f2ac556f5451fdbb024..a5591ace9b0bc766fc17068d788a55eb956d025a 100644
--- a/pkg/compiler/lib/src/js_emitter/helpers.dart
+++ b/pkg/compiler/lib/src/js_emitter/helpers.dart
@@ -12,3 +12,22 @@ ClassElement computeMixinClass(MixinApplicationElement mixinApplication) {
}
return mixin;
}
+
+class _DeferredOutputUnitHash extends jsAst.DeferredString {
+ String _hash;
+ final OutputUnit _outputUnit;
+
+ _DeferredOutputUnitHash(this._outputUnit);
+
+ void setHash(String hash) {
+ assert(_hash == null);
+ _hash = hash;
+ }
+
+ String get value {
+ assert(_hash != null);
+ return '"$_hash"';
+ }
+
+ String toString() => "HashCode for ${_outputUnit} [$_hash]";
+}
« no previous file with comments | « pkg/compiler/lib/src/js_backend/type_variable_handler.dart ('k') | pkg/compiler/lib/src/js_emitter/js_emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698