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

Side by Side 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: 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 unified diff | Download patch
OLDNEW
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698