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