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..f2708ddf905864539c741fa1aaa332aae4f132fc 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.TokenString { |
+ String _hash; |
+ final OutputUnit _outputUnit; |
+ |
+ _DeferredOutputUnitHash(this._outputUnit); |
+ |
+ void setHash(String hash) { |
karlklose
2015/05/28 09:39:52
Maybe this pattern could be extraced in a class 'L
herhut
2015/06/01 12:09:41
There is a tiny little bit of work hidden in here:
|
+ assert(_hash == null); |
+ _hash = hash; |
+ } |
+ |
+ String get value { |
+ assert(_hash != null); |
+ return '"$_hash"'; |
+ } |
+ |
+ String toString() => "HashCode for ${_outputUnit} [$_hash]"; |
+} |