OLD | NEW |
---|---|
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 part of dart2js.js_emitter; | 5 part of dart2js.js_emitter; |
6 | 6 |
7 ClassElement computeMixinClass(MixinApplicationElement mixinApplication) { | 7 ClassElement computeMixinClass(MixinApplicationElement mixinApplication) { |
8 ClassElement mixin = mixinApplication.mixin; | 8 ClassElement mixin = mixinApplication.mixin; |
9 while (mixin.isMixinApplication) { | 9 while (mixin.isMixinApplication) { |
10 mixinApplication = mixin; | 10 mixinApplication = mixin; |
11 mixin = mixinApplication.mixin; | 11 mixin = mixinApplication.mixin; |
12 } | 12 } |
13 return mixin; | 13 return mixin; |
14 } | 14 } |
15 | |
16 class _DeferredOutputUnitHash extends jsAst.TokenString { | |
17 String _hash; | |
18 final OutputUnit _outputUnit; | |
19 | |
20 _DeferredOutputUnitHash(this._outputUnit); | |
21 | |
22 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:
| |
23 assert(_hash == null); | |
24 _hash = hash; | |
25 } | |
26 | |
27 String get value { | |
28 assert(_hash != null); | |
29 return '"$_hash"'; | |
30 } | |
31 | |
32 String toString() => "HashCode for ${_outputUnit} [$_hash]"; | |
33 } | |
OLD | NEW |