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

Side by Side 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, 4 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.full_emitter; 5 part of dart2js.js_emitter.startup_emitter.model_emitter;
6 6
7 class _DeferredOutputUnitHash extends jsAst.DeferredString { 7 class _DeferredFragmentHash extends js.DeferredString {
8 String _hash; 8 String _hash;
9 final OutputUnit _outputUnit; 9 final DeferredFragment _fragment;
10 10
11 _DeferredOutputUnitHash(this._outputUnit); 11 _DeferredFragmentHash(this._fragment);
12 12
13 void setHash(String hash) { 13 void setHash(String hash) {
14 assert(_hash == null); 14 assert(_hash == null);
15 _hash = hash; 15 _hash = hash;
16 } 16 }
17 17
18 @override
18 String get value { 19 String get value {
19 assert(_hash != null); 20 assert(_hash != null);
21 // Note the additional quotes in the returned value.
20 return '"$_hash"'; 22 return '"$_hash"';
21 } 23 }
22 24
23 String toString() => "HashCode for ${_outputUnit} [$_hash]"; 25 String toString() => "HashCode for ${_fragment} [$_hash]";
24 } 26 }
OLDNEW
« 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