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

Side by Side Diff: pkg/compiler/lib/src/js/js.dart

Issue 1880323002: dart2js cleanup: remove unused imports and variables (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: merge master Created 4 years, 8 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 js; 5 library js;
6 6
7 import 'package:js_ast/js_ast.dart'; 7 import 'package:js_ast/js_ast.dart';
8 export 'package:js_ast/js_ast.dart';
9 8
10 import '../common.dart'; 9 import '../common.dart';
11 import '../compiler.dart' show Compiler; 10 import '../compiler.dart' show Compiler;
12 import '../dump_info.dart' show DumpInfoTask; 11 import '../dump_info.dart' show DumpInfoTask;
13 import '../io/code_output.dart' show CodeBuffer, CodeOutput; 12 import '../io/code_output.dart' show CodeBuffer;
14 import '../js_emitter/js_emitter.dart' show USE_LAZY_EMITTER; 13 import '../js_emitter/js_emitter.dart' show USE_LAZY_EMITTER;
14 import 'js_source_mapping.dart';
15 15
16 import 'js_source_mapping.dart'; 16 export 'package:js_ast/js_ast.dart';
17 17
18 String prettyPrint(Node node, Compiler compiler, 18 String prettyPrint(Node node, Compiler compiler,
19 {bool allowVariableMinification: true, 19 {bool allowVariableMinification: true,
20 Renamer renamerForNames: JavaScriptPrintingOptions.identityRenamer}) { 20 Renamer renamerForNames: JavaScriptPrintingOptions.identityRenamer}) {
21 // TODO(johnniwinther): Do we need all the options here? 21 // TODO(johnniwinther): Do we need all the options here?
22 JavaScriptPrintingOptions options = new JavaScriptPrintingOptions( 22 JavaScriptPrintingOptions options = new JavaScriptPrintingOptions(
23 shouldCompressOutput: compiler.options.enableMinification, 23 shouldCompressOutput: compiler.options.enableMinification,
24 minifyLocalVariables: allowVariableMinification, 24 minifyLocalVariables: allowVariableMinification,
25 preferSemicolonToNewlineInMinifiedOutput: USE_LAZY_EMITTER, 25 preferSemicolonToNewlineInMinifiedOutput: USE_LAZY_EMITTER,
26 renamerForNames: renamerForNames); 26 renamerForNames: renamerForNames);
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 } 187 }
188 if (node is PropertyAccess) { 188 if (node is PropertyAccess) {
189 PropertyAccess access = node; 189 PropertyAccess access = node;
190 if (access.receiver is InterpolatedExpression) { 190 if (access.receiver is InterpolatedExpression) {
191 InterpolatedExpression hole = access.receiver; 191 InterpolatedExpression hole = access.receiver;
192 return hole.isPositional && hole.nameOrPosition == 0; 192 return hole.isPositional && hole.nameOrPosition == 0;
193 } 193 }
194 } 194 }
195 return false; 195 return false;
196 } 196 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/io/start_end_information.dart ('k') | pkg/compiler/lib/src/js/js_source_mapping.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698