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 |
(...skipping 19 matching lines...) Expand all Loading... |
30 import 'inferrer/type_graph_inferrer.dart' as type_graph_inferrer; | 30 import 'inferrer/type_graph_inferrer.dart' as type_graph_inferrer; |
31 import 'io/line_column_provider.dart' as io; | 31 import 'io/line_column_provider.dart' as io; |
32 import 'io/source_map_builder.dart' as io; | 32 import 'io/source_map_builder.dart' as io; |
33 import 'js/js.dart' as js; | 33 import 'js/js.dart' as js; |
34 import 'js_backend/js_backend.dart' as js_backend; | 34 import 'js_backend/js_backend.dart' as js_backend; |
35 import 'js_emitter/js_emitter.dart' as js_emitter; | 35 import 'js_emitter/js_emitter.dart' as js_emitter; |
36 import 'js_emitter/full_emitter/emitter.dart' as full; | 36 import 'js_emitter/full_emitter/emitter.dart' as full; |
37 import 'js_emitter/program_builder/program_builder.dart' as program_builder; | 37 import 'js_emitter/program_builder/program_builder.dart' as program_builder; |
38 import 'resolution/semantic_visitor.dart' as semantic_visitor; | 38 import 'resolution/semantic_visitor.dart' as semantic_visitor; |
39 import 'resolution/operators.dart' as operators; | 39 import 'resolution/operators.dart' as operators; |
| 40 import 'script.dart'; |
40 import 'source_file_provider.dart' as source_file_provider; | 41 import 'source_file_provider.dart' as source_file_provider; |
41 import 'ssa/ssa.dart' as ssa; | 42 import 'ssa/ssa.dart' as ssa; |
42 import 'tree/tree.dart' as tree; | 43 import 'tree/tree.dart' as tree; |
43 import 'util/util.dart' as util; | 44 import 'util/util.dart' as util; |
| 45 import 'world.dart'; |
44 | 46 |
45 import 'scanner/scannerlib.dart' show | 47 import 'scanner/scannerlib.dart' show |
46 PartialClassElement, | 48 PartialClassElement, |
47 PartialFunctionElement; | 49 PartialFunctionElement; |
48 | 50 |
49 class ElementVisitor extends elements_visitor.BaseElementVisitor { | 51 class ElementVisitor extends elements_visitor.BaseElementVisitor { |
50 visitElement(e, a) {} | 52 visitElement(e, a) {} |
51 } | 53 } |
52 | 54 |
53 void main(List<String> arguments) { | 55 void main(List<String> arguments) { |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 map..addFirst(null, null, null) | 251 map..addFirst(null, null, null) |
250 ..forEachLine(null) | 252 ..forEachLine(null) |
251 ..getFirstElementsInLine(null) | 253 ..getFirstElementsInLine(null) |
252 ..forEachColumn(null, null); | 254 ..forEachColumn(null, null); |
253 provider.getOffset(null, null); | 255 provider.getOffset(null, null); |
254 } | 256 } |
255 | 257 |
256 usedByTests() { | 258 usedByTests() { |
257 // TODO(ahe): We should try to avoid including API used only for tests. In | 259 // TODO(ahe): We should try to avoid including API used only for tests. In |
258 // most cases, such API can be moved to a test library. | 260 // most cases, such API can be moved to a test library. |
259 dart2jslib.World world = null; | 261 World world = null; |
260 dart2jslib.Compiler compiler = null; | 262 dart2jslib.Compiler compiler = null; |
261 compiler.currentlyInUserCode(); | 263 compiler.currentlyInUserCode(); |
262 type_graph_inferrer.TypeGraphInferrer typeGraphInferrer = null; | 264 type_graph_inferrer.TypeGraphInferrer typeGraphInferrer = null; |
263 source_file_provider.SourceFileProvider sourceFileProvider = null; | 265 source_file_provider.SourceFileProvider sourceFileProvider = null; |
264 sourceFileProvider.getSourceFile(null); | 266 sourceFileProvider.getSourceFile(null); |
265 world.hasAnyUserDefinedGetter(null, null); | 267 world.hasAnyUserDefinedGetter(null, null); |
266 world.subclassesOf(null); | 268 world.subclassesOf(null); |
267 world.classHierarchyNode(null); | 269 world.classHierarchyNode(null); |
268 typeGraphInferrer.getCallersOf(null); | 270 typeGraphInferrer.getCallersOf(null); |
269 dart_types.Types.sorted(null); | 271 dart_types.Types.sorted(null); |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 useTypes() { | 306 useTypes() { |
305 new dart_types.ResolvedTypedefType(null, null, null).unalias(null); | 307 new dart_types.ResolvedTypedefType(null, null, null).unalias(null); |
306 } | 308 } |
307 | 309 |
308 useCodeEmitterTask(js_emitter.CodeEmitterTask codeEmitterTask) { | 310 useCodeEmitterTask(js_emitter.CodeEmitterTask codeEmitterTask) { |
309 full.Emitter fullEmitter = codeEmitterTask.emitter; | 311 full.Emitter fullEmitter = codeEmitterTask.emitter; |
310 fullEmitter.clearCspPrecompiledNodes(); | 312 fullEmitter.clearCspPrecompiledNodes(); |
311 fullEmitter.buildLazilyInitializedStaticField(null, isolateProperties: null); | 313 fullEmitter.buildLazilyInitializedStaticField(null, isolateProperties: null); |
312 } | 314 } |
313 | 315 |
314 useScript(dart2jslib.Script script) { | 316 useScript(Script script) { |
315 script.copyWithFile(null); | 317 script.copyWithFile(null); |
316 } | 318 } |
317 | 319 |
318 useProgramBuilder(program_builder.ProgramBuilder builder) { | 320 useProgramBuilder(program_builder.ProgramBuilder builder) { |
319 builder.buildMethodHackForIncrementalCompilation(null); | 321 builder.buildMethodHackForIncrementalCompilation(null); |
320 builder.buildFieldsHackForIncrementalCompilation(null); | 322 builder.buildFieldsHackForIncrementalCompilation(null); |
321 } | 323 } |
322 | 324 |
323 useSemanticVisitor() { | 325 useSemanticVisitor() { |
324 operators.UnaryOperator.fromKind(null); | 326 operators.UnaryOperator.fromKind(null); |
325 operators.BinaryOperator.fromKind(null); | 327 operators.BinaryOperator.fromKind(null); |
326 new semantic_visitor.BulkSendVisitor() | 328 new semantic_visitor.BulkSendVisitor() |
327 ..apply(null, null) | 329 ..apply(null, null) |
328 ..visitSuperFieldFieldCompound(null, null, null, null, null, null); | 330 ..visitSuperFieldFieldCompound(null, null, null, null, null, null); |
329 new semantic_visitor.TraversalVisitor(null).apply(null, null); | 331 new semantic_visitor.TraversalVisitor(null).apply(null, null); |
330 new semantic_visitor.BulkDeclarationVisitor().apply(null, null); | 332 new semantic_visitor.BulkDeclarationVisitor().apply(null, null); |
331 } | 333 } |
332 | 334 |
333 class TreeVisitor1 extends tree_ir.ExpressionVisitor1 | 335 class TreeVisitor1 extends tree_ir.ExpressionVisitor1 |
334 with tree_ir.StatementVisitor1 { | 336 with tree_ir.StatementVisitor1 { |
335 noSuchMethod(inv) {} | 337 noSuchMethod(inv) {} |
336 } | 338 } |
337 | 339 |
338 useTreeVisitors() { | 340 useTreeVisitors() { |
339 new TreeVisitor1().visitExpression(null, null); | 341 new TreeVisitor1().visitExpression(null, null); |
340 new TreeVisitor1().visitStatement(null, null); | 342 new TreeVisitor1().visitStatement(null, null); |
341 } | 343 } |
OLD | NEW |