OLD | NEW |
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 /// This file use methods that aren't used by dart2js.dart, but that we wish to | 5 /// This file use methods that aren't used by dart2js.dart, but that we wish to |
6 /// keep anyway. This might be general API that isn't currently in use, | 6 /// keep anyway. This might be general API that isn't currently in use, |
7 /// debugging aids, or API only used for testing (see TODO below). | 7 /// debugging aids, or API only used for testing (see TODO below). |
8 | 8 |
9 library dart2js.use_unused_api; | 9 library dart2js.use_unused_api; |
10 | 10 |
11 import '../compiler.dart' as api; | 11 import '../compiler.dart' as api; |
12 | 12 |
13 import 'colors.dart' as colors; | 13 import 'colors.dart' as colors; |
14 import 'constants/constant_system.dart' as constants; | 14 import 'constants/constant_system.dart' as constants; |
15 import 'constants/expressions.dart' as constants; | 15 import 'constants/expressions.dart' as constants; |
16 import 'constants/values.dart' as constants; | 16 import 'constants/values.dart' as constants; |
17 import 'cps_ir/cps_ir_builder.dart' as ir_builder; | 17 import 'cps_ir/cps_ir_builder.dart' as ir_builder; |
18 import 'cps_ir/cps_ir_builder_task.dart' as ir_builder; | 18 import 'cps_ir/cps_ir_builder_task.dart' as ir_builder; |
19 import 'tree_ir/tree_ir_nodes.dart' as tree_ir; | 19 import 'tree_ir/tree_ir_nodes.dart' as tree_ir; |
20 import 'dart_types.dart' as dart_types; | 20 import 'dart_types.dart' as dart_types; |
21 import 'dart2js.dart' as dart2js; | 21 import 'dart2js.dart' as dart2js; |
22 import 'dart2jslib.dart' as dart2jslib; | 22 import 'dart2jslib.dart' as dart2jslib; |
23 import 'elements/elements.dart' as elements; | 23 import 'elements/elements.dart' as elements; |
24 import 'elements/modelx.dart' as modelx; | 24 import 'elements/modelx.dart' as modelx; |
25 import 'elements/visitor.dart' as elements_visitor; | 25 import 'elements/visitor.dart' as elements_visitor; |
26 import 'filenames.dart' as filenames; | 26 import 'filenames.dart' as filenames; |
27 import 'inferrer/concrete_types_inferrer.dart' as concrete_types_inferrer; | 27 import 'inferrer/concrete_types_inferrer.dart' as concrete_types_inferrer; |
28 import 'inferrer/type_graph_inferrer.dart' as type_graph_inferrer; | 28 import 'inferrer/type_graph_inferrer.dart' as type_graph_inferrer; |
29 import 'io/code_output.dart' as io; | 29 import 'io/line_column_provider.dart' as io; |
30 import 'io/source_map_builder.dart' as io; | 30 import 'io/source_map_builder.dart' as io; |
31 import 'js/js.dart' as js; | 31 import 'js/js.dart' as js; |
32 import 'js_backend/js_backend.dart' as js_backend; | 32 import 'js_backend/js_backend.dart' as js_backend; |
33 import 'js_emitter/js_emitter.dart' as js_emitter; | 33 import 'js_emitter/js_emitter.dart' as js_emitter; |
34 import 'js_emitter/program_builder.dart' as program_builder; | 34 import 'js_emitter/program_builder.dart' as program_builder; |
35 import 'resolution/semantic_visitor.dart' as semantic_visitor; | 35 import 'resolution/semantic_visitor.dart' as semantic_visitor; |
36 import 'source_file_provider.dart' as source_file_provider; | 36 import 'source_file_provider.dart' as source_file_provider; |
37 import 'ssa/ssa.dart' as ssa; | 37 import 'ssa/ssa.dart' as ssa; |
38 import 'tree/tree.dart' as tree; | 38 import 'tree/tree.dart' as tree; |
39 import 'util/util.dart' as util; | 39 import 'util/util.dart' as util; |
(...skipping 18 matching lines...) Expand all Loading... |
58 useElementVisitor(new ElementVisitor()); | 58 useElementVisitor(new ElementVisitor()); |
59 useJsNode(new js.Program(null)); | 59 useJsNode(new js.Program(null)); |
60 useJsNode(new js.NamedFunction(null, null)); | 60 useJsNode(new js.NamedFunction(null, null)); |
61 useJsNode(new js.ArrayHole()); | 61 useJsNode(new js.ArrayHole()); |
62 useJsOther(new js.SimpleJavaScriptPrintingContext()); | 62 useJsOther(new js.SimpleJavaScriptPrintingContext()); |
63 useJsBackend(null); | 63 useJsBackend(null); |
64 useConcreteTypesInferrer(null); | 64 useConcreteTypesInferrer(null); |
65 useColor(); | 65 useColor(); |
66 useFilenames(); | 66 useFilenames(); |
67 useSsa(null); | 67 useSsa(null); |
68 useIo(null, null); | 68 useIo(); |
69 usedByTests(); | 69 usedByTests(); |
70 useElements(); | 70 useElements(); |
71 useIr(null); | 71 useIr(null); |
72 useCompiler(null); | 72 useCompiler(null); |
73 useTypes(); | 73 useTypes(); |
74 useCodeEmitterTask(null); | 74 useCodeEmitterTask(null); |
75 useScript(null); | 75 useScript(null); |
76 useProgramBuilder(null); | 76 useProgramBuilder(null); |
77 useSemanticVisitor(); | 77 useSemanticVisitor(); |
78 useTreeVisitors(); | 78 useTreeVisitors(); |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 useFilenames() { | 210 useFilenames() { |
211 filenames.appendSlash(null); | 211 filenames.appendSlash(null); |
212 } | 212 } |
213 | 213 |
214 useSsa(ssa.HInstruction instruction) { | 214 useSsa(ssa.HInstruction instruction) { |
215 instruction.isConstantNumber(); | 215 instruction.isConstantNumber(); |
216 new ssa.HAndOrBlockInformation(null, null, null); | 216 new ssa.HAndOrBlockInformation(null, null, null); |
217 new ssa.HStatementSequenceInformation(null); | 217 new ssa.HStatementSequenceInformation(null); |
218 } | 218 } |
219 | 219 |
220 useIo(io.CodeBuffer buffer, io.LineColumnMap map) { | 220 useIo([io.LineColumnMap map, |
| 221 io.LineColumnProvider provider]) { |
221 map..addFirst(null, null, null) | 222 map..addFirst(null, null, null) |
222 ..forEachLine(null) | 223 ..forEachLine(null) |
223 ..getFirstElementsInLine(null) | 224 ..getFirstElementsInLine(null) |
224 ..forEachColumn(null, null); | 225 ..forEachColumn(null, null); |
| 226 provider.getOffset(null, null); |
225 } | 227 } |
226 | 228 |
227 usedByTests() { | 229 usedByTests() { |
228 // TODO(ahe): We should try to avoid including API used only for tests. In | 230 // TODO(ahe): We should try to avoid including API used only for tests. In |
229 // most cases, such API can be moved to a test library. | 231 // most cases, such API can be moved to a test library. |
230 dart2jslib.World world = null; | 232 dart2jslib.World world = null; |
231 dart2jslib.Compiler compiler = null; | 233 dart2jslib.Compiler compiler = null; |
232 compiler.currentlyInUserCode(); | 234 compiler.currentlyInUserCode(); |
233 type_graph_inferrer.TypeGraphInferrer typeGraphInferrer = null; | 235 type_graph_inferrer.TypeGraphInferrer typeGraphInferrer = null; |
234 source_file_provider.SourceFileProvider sourceFileProvider = null; | 236 source_file_provider.SourceFileProvider sourceFileProvider = null; |
| 237 sourceFileProvider.getSourceFile(null); |
235 world.hasAnyUserDefinedGetter(null, null); | 238 world.hasAnyUserDefinedGetter(null, null); |
236 typeGraphInferrer.getCallersOf(null); | 239 typeGraphInferrer.getCallersOf(null); |
237 dart_types.Types.sorted(null); | 240 dart_types.Types.sorted(null); |
238 new dart_types.Types(compiler).copy(compiler); | 241 new dart_types.Types(compiler).copy(compiler); |
239 sourceFileProvider.readStringFromUri(null); | 242 sourceFileProvider.readStringFromUri(null); |
240 } | 243 } |
241 | 244 |
242 useElements( | 245 useElements( |
243 [elements.ClassElement e, | 246 [elements.ClassElement e, |
244 elements.Name n, | 247 elements.Name n, |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 | 302 |
300 class TreeVisitor1 extends tree_ir.ExpressionVisitor1 | 303 class TreeVisitor1 extends tree_ir.ExpressionVisitor1 |
301 with tree_ir.StatementVisitor1 { | 304 with tree_ir.StatementVisitor1 { |
302 noSuchMethod(inv) {} | 305 noSuchMethod(inv) {} |
303 } | 306 } |
304 | 307 |
305 useTreeVisitors() { | 308 useTreeVisitors() { |
306 new TreeVisitor1().visitExpression(null, null); | 309 new TreeVisitor1().visitExpression(null, null); |
307 new TreeVisitor1().visitStatement(null, null); | 310 new TreeVisitor1().visitStatement(null, null); |
308 } | 311 } |
OLD | NEW |