| 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 import 'colors.dart' as colors; | 12 import 'colors.dart' as colors; |
| 13 import 'compiler.dart' as compiler; | 13 import 'compiler.dart' as compiler; |
| 14 import 'constants/constant_system.dart' as constants; | 14 import 'constants/constant_system.dart' as constants; |
| 15 import 'constants/constructors.dart' as constants; | 15 import 'constants/constructors.dart' as constants; |
| 16 import 'constants/evaluation.dart' as constants; | 16 import 'constants/evaluation.dart' as constants; |
| 17 import 'constants/expressions.dart' as constants; | 17 import 'constants/expressions.dart' as constants; |
| 18 import 'constants/values.dart' as constants; | 18 import 'constants/values.dart' as constants; |
| 19 import 'dart2js.dart' as dart2js; | 19 import 'dart2js.dart' as dart2js; |
| 20 import 'elements/resolution_types.dart' as dart_types; | 20 import 'elements/resolution_types.dart' as dart_types; |
| 21 import 'deferred_load.dart' as deferred_load; | 21 import 'deferred_load.dart' as deferred_load; |
| 22 import 'diagnostics/source_span.dart' as diagnostics; | 22 import 'diagnostics/source_span.dart' as diagnostics; |
| 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/names.dart' as names; |
| 25 import 'elements/operators.dart' as operators; | 26 import 'elements/operators.dart' as operators; |
| 26 import 'elements/visitor.dart' as elements_visitor; | 27 import 'elements/visitor.dart' as elements_visitor; |
| 27 import 'filenames.dart' as filenames; | 28 import 'filenames.dart' as filenames; |
| 28 import 'inferrer/type_graph_inferrer.dart' as type_graph_inferrer; | 29 import 'inferrer/type_graph_inferrer.dart' as type_graph_inferrer; |
| 29 import 'io/location_provider.dart' as io; | 30 import 'io/location_provider.dart' as io; |
| 30 import 'io/source_map_builder.dart' as io; | 31 import 'io/source_map_builder.dart' as io; |
| 31 import 'js/js.dart' as js; | 32 import 'js/js.dart' as js; |
| 32 import 'js_backend/js_backend.dart' as js_backend; | 33 import 'js_backend/js_backend.dart' as js_backend; |
| 33 import 'parser/partial_elements.dart' | 34 import 'parser/partial_elements.dart' |
| 34 show PartialClassElement, PartialFunctionElement; | 35 show PartialClassElement, PartialFunctionElement; |
| 35 import 'resolution/semantic_visitor.dart' as semantic_visitor; | 36 import 'resolution/semantic_visitor.dart' as semantic_visitor; |
| 36 import 'script.dart'; | 37 import 'script.dart'; |
| 37 import 'source_file_provider.dart' as source_file_provider; | 38 import 'source_file_provider.dart' as source_file_provider; |
| 38 import 'ssa/nodes.dart' as ssa; | 39 import 'ssa/nodes.dart' as ssa; |
| 39 import 'tree/tree.dart' as tree; | 40 import 'tree/tree.dart' as tree; |
| 40 import 'util/util.dart' as util; | 41 import 'util/util.dart' as util; |
| 41 import 'world.dart'; | 42 import 'world.dart'; |
| 42 | 43 |
| 43 class ElementVisitor extends elements_visitor.BaseElementVisitor { | 44 class ElementVisitor extends elements_visitor.BaseElementVisitor { |
| 44 visitElement(e, a) {} | 45 visitElement(e, a) {} |
| 45 } | 46 } |
| 46 | 47 |
| 47 void main(List<String> arguments) { | 48 void main(List<String> arguments) { |
| 48 useApi(null); | 49 useApi(null); |
| 49 dart2js.main(arguments); | 50 dart2js.main(arguments); |
| 50 elements.Name.isPublicName(null); | 51 names.Name.isPublicName(null); |
| 51 useConstant(); | 52 useConstant(); |
| 52 useNode(null); | 53 useNode(null); |
| 53 useUtil(null); | 54 useUtil(null); |
| 54 useSetlet(null); | 55 useSetlet(null); |
| 55 useImmutableEmptySet(null); | 56 useImmutableEmptySet(null); |
| 56 useElementVisitor(new ElementVisitor()); | 57 useElementVisitor(new ElementVisitor()); |
| 57 useJsNode(new js.Program(null)); | 58 useJsNode(new js.Program(null)); |
| 58 useJsNode(new js.NamedFunction(null, null)); | 59 useJsNode(new js.NamedFunction(null, null)); |
| 59 useJsNode(new js.ArrayHole()); | 60 useJsNode(new js.ArrayHole()); |
| 60 useJsOther(new js.SimpleJavaScriptPrintingContext()); | 61 useJsOther(new js.SimpleJavaScriptPrintingContext()); |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 closedWorld.getClassHierarchyNode(null); | 251 closedWorld.getClassHierarchyNode(null); |
| 251 closedWorld.getClassSet(null); | 252 closedWorld.getClassSet(null); |
| 252 closedWorld.haveAnyCommonSubtypes(null, null); | 253 closedWorld.haveAnyCommonSubtypes(null, null); |
| 253 typeGraphInferrer.getCallersOf(null); | 254 typeGraphInferrer.getCallersOf(null); |
| 254 dart_types.Types.sorted(null); | 255 dart_types.Types.sorted(null); |
| 255 new dart_types.Types(null).copy(null); | 256 new dart_types.Types(null).copy(null); |
| 256 } | 257 } |
| 257 | 258 |
| 258 useElements( | 259 useElements( |
| 259 [elements.ClassElement e, | 260 [elements.ClassElement e, |
| 260 elements.Name n, | 261 names.Name n, |
| 261 modelx.FieldElementX f, | 262 modelx.FieldElementX f, |
| 262 PartialClassElement pce, | 263 PartialClassElement pce, |
| 263 PartialFunctionElement pfe, | 264 PartialFunctionElement pfe, |
| 264 elements.LibraryElement l]) { | 265 elements.LibraryElement l]) { |
| 265 e.lookupClassMember(null); | 266 e.lookupClassMember(null); |
| 266 e.lookupInterfaceMember(null); | 267 e.lookupInterfaceMember(null); |
| 267 n.isAccessibleFrom(null); | 268 n.isAccessibleFrom(null); |
| 268 f.reuseElement(); | 269 f.reuseElement(); |
| 269 pce.copyWithEnclosing(null); | 270 pce.copyWithEnclosing(null); |
| 270 pfe.copyWithEnclosing(null); | 271 pfe.copyWithEnclosing(null); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 290 operators.UnaryOperator.fromKind(null); | 291 operators.UnaryOperator.fromKind(null); |
| 291 operators.BinaryOperator.fromKind(null); | 292 operators.BinaryOperator.fromKind(null); |
| 292 new semantic_visitor.BulkSendVisitor()..apply(null, null); | 293 new semantic_visitor.BulkSendVisitor()..apply(null, null); |
| 293 new semantic_visitor.TraversalVisitor(null).apply(null, null); | 294 new semantic_visitor.TraversalVisitor(null).apply(null, null); |
| 294 new semantic_visitor.BulkDeclarationVisitor().apply(null, null); | 295 new semantic_visitor.BulkDeclarationVisitor().apply(null, null); |
| 295 } | 296 } |
| 296 | 297 |
| 297 useDeferred([deferred_load.DeferredLoadTask task]) { | 298 useDeferred([deferred_load.DeferredLoadTask task]) { |
| 298 task.dump(); | 299 task.dump(); |
| 299 } | 300 } |
| OLD | NEW |