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

Side by Side Diff: pkg/compiler/lib/src/js_emitter/lazy_emitter/model_emitter.dart

Issue 1803303002: Move all flags to CompilerOptions (first step to stop passing the compiler to (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 library dart2js.js_emitter.lazy_emitter.model_emitter; 5 library dart2js.js_emitter.lazy_emitter.model_emitter;
6 6
7 import '../../compiler.dart' show 7 import '../../compiler.dart' show
8 Compiler; 8 Compiler;
9 import '../../constants/values.dart' show 9 import '../../constants/values.dart' show
10 ConstantValue, 10 ConstantValue,
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 /// string in parenthesis. The result is also escaped. 186 /// string in parenthesis. The result is also escaped.
187 /// 187 ///
188 /// See [_UnparsedNode] for details. 188 /// See [_UnparsedNode] for details.
189 js.Literal unparse(Compiler compiler, js.Node value, 189 js.Literal unparse(Compiler compiler, js.Node value,
190 {bool protectForEval: true}) { 190 {bool protectForEval: true}) {
191 return new js.UnparsedNode(value, compiler, protectForEval); 191 return new js.UnparsedNode(value, compiler, protectForEval);
192 } 192 }
193 193
194 String buildGeneratedBy(compiler) { 194 String buildGeneratedBy(compiler) {
195 var suffix = ''; 195 var suffix = '';
196 if (compiler.hasBuildId) suffix = ' version: ${compiler.buildId}'; 196 if (compiler.options.hasBuildId) {
197 suffix = ' version: ${compiler.options.buildId}';
198 }
197 return '// Generated by dart2js, the Dart to JavaScript compiler$suffix.\n'; 199 return '// Generated by dart2js, the Dart to JavaScript compiler$suffix.\n';
198 } 200 }
199 201
200 js.Statement emitMainFragment(Program program) { 202 js.Statement emitMainFragment(Program program) {
201 MainFragment fragment = program.fragments.first; 203 MainFragment fragment = program.fragments.first;
202 List<js.Expression> elements = fragment.libraries.map(emitLibrary).toList(); 204 List<js.Expression> elements = fragment.libraries.map(emitLibrary).toList();
203 elements.add( 205 elements.add(
204 emitLazilyInitializedStatics(fragment.staticLazilyInitializedFields)); 206 emitLazilyInitializedStatics(fragment.staticLazilyInitializedFields));
205 elements.add(emitConstants(fragment.constants)); 207 elements.add(emitConstants(fragment.constants));
206 208
(...skipping 1043 matching lines...) Expand 10 before | Expand all | Expand 10 after
1250 1252
1251 var end = Date.now(); 1253 var end = Date.now();
1252 // print('Setup: ' + (end - start) + ' ms.'); 1254 // print('Setup: ' + (end - start) + ' ms.');
1253 1255
1254 #invokeMain; // Start main. 1256 #invokeMain; // Start main.
1255 1257
1256 })(Date.now(), #code) 1258 })(Date.now(), #code)
1257 }"""; 1259 }""";
1258 1260
1259 } 1261 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698