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

Side by Side Diff: pkg/compiler/lib/src/js_emitter/code_emitter_task.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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_emitter/startup_emitter/deferred_fragment_hash.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 const USE_LAZY_EMITTER = const bool.fromEnvironment("dart2js.use.lazy.emitter"); 7 const USE_LAZY_EMITTER = const bool.fromEnvironment("dart2js.use.lazy.emitter");
8 const USE_STARTUP_EMITTER = 8 const USE_STARTUP_EMITTER =
9 const bool.fromEnvironment("dart2js.use.startup.emitter"); 9 const bool.fromEnvironment("dart2js.use.startup.emitter");
10 10
(...skipping 25 matching lines...) Expand all
36 Set<ClassElement> neededClasses; 36 Set<ClassElement> neededClasses;
37 37
38 CodeEmitterTask(Compiler compiler, Namer namer, bool generateSourceMap) 38 CodeEmitterTask(Compiler compiler, Namer namer, bool generateSourceMap)
39 : super(compiler), 39 : super(compiler),
40 this.namer = namer, 40 this.namer = namer,
41 this.typeTestRegistry = new TypeTestRegistry(compiler) { 41 this.typeTestRegistry = new TypeTestRegistry(compiler) {
42 nativeEmitter = new NativeEmitter(this); 42 nativeEmitter = new NativeEmitter(this);
43 if (USE_LAZY_EMITTER) { 43 if (USE_LAZY_EMITTER) {
44 emitter = new lazy_js_emitter.Emitter(compiler, namer, nativeEmitter); 44 emitter = new lazy_js_emitter.Emitter(compiler, namer, nativeEmitter);
45 } else if (USE_STARTUP_EMITTER) { 45 } else if (USE_STARTUP_EMITTER) {
46 emitter = new startup_js_emitter.Emitter(compiler, namer, nativeEmitter); 46 emitter = new startup_js_emitter.Emitter(
47 compiler, namer, nativeEmitter, generateSourceMap);
47 } else { 48 } else {
48 emitter = 49 emitter =
49 new full_js_emitter.Emitter(compiler, namer, generateSourceMap, this); 50 new full_js_emitter.Emitter(compiler, namer, generateSourceMap, this);
50 } 51 }
51 metadataCollector = new MetadataCollector(compiler, emitter); 52 metadataCollector = new MetadataCollector(compiler, emitter);
52 } 53 }
53 54
54 String get name => 'Code emitter'; 55 String get name => 'Code emitter';
55 56
56 /// Returns the string that is used to find library patches that are 57 /// Returns the string that is used to find library patches that are
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 bool isConstantInlinedOrAlreadyEmitted(ConstantValue constant); 202 bool isConstantInlinedOrAlreadyEmitted(ConstantValue constant);
202 203
203 /// Returns the JS code for accessing the given [constant]. 204 /// Returns the JS code for accessing the given [constant].
204 jsAst.Expression constantReference(ConstantValue constant); 205 jsAst.Expression constantReference(ConstantValue constant);
205 206
206 /// Returns the JS template for the given [builtin]. 207 /// Returns the JS template for the given [builtin].
207 jsAst.Template templateForBuiltin(JsBuiltin builtin); 208 jsAst.Template templateForBuiltin(JsBuiltin builtin);
208 209
209 void invalidateCaches(); 210 void invalidateCaches();
210 } 211 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_emitter/startup_emitter/deferred_fragment_hash.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698