| 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 13 matching lines...) Expand all Loading... |
| 24 import 'inferrer/concrete_types_inferrer.dart' as concrete_types_inferrer; | 24 import 'inferrer/concrete_types_inferrer.dart' as concrete_types_inferrer; |
| 25 import 'inferrer/type_graph_inferrer.dart' as type_graph_inferrer; | 25 import 'inferrer/type_graph_inferrer.dart' as type_graph_inferrer; |
| 26 import 'js/js.dart' as js; | 26 import 'js/js.dart' as js; |
| 27 import 'js_emitter/js_emitter.dart' as js_emitter; | 27 import 'js_emitter/js_emitter.dart' as js_emitter; |
| 28 import 'source_file_provider.dart' as source_file_provider; | 28 import 'source_file_provider.dart' as source_file_provider; |
| 29 import 'ssa/ssa.dart' as ssa; | 29 import 'ssa/ssa.dart' as ssa; |
| 30 import 'tree/tree.dart' as tree; | 30 import 'tree/tree.dart' as tree; |
| 31 import 'universe/universe.dart' as universe; | 31 import 'universe/universe.dart' as universe; |
| 32 import 'util/util.dart' as util; | 32 import 'util/util.dart' as util; |
| 33 | 33 |
| 34 import 'scanner/scannerlib.dart' show |
| 35 PartialClassElement, |
| 36 PartialFunctionElement; |
| 37 |
| 34 class ElementVisitor extends elements_visitor.ElementVisitor { | 38 class ElementVisitor extends elements_visitor.ElementVisitor { |
| 35 visitElement(e) {} | 39 visitElement(e) {} |
| 36 } | 40 } |
| 37 | 41 |
| 38 void main(List<String> arguments) { | 42 void main(List<String> arguments) { |
| 39 useApi(); | 43 useApi(); |
| 40 dart2js.main(arguments); | 44 dart2js.main(arguments); |
| 41 useConstant(null, null); | 45 useConstant(null, null); |
| 42 useNode(null); | 46 useNode(null); |
| 43 useUtil(null); | 47 useUtil(null); |
| 44 useSetlet(null); | 48 useSetlet(null); |
| 45 useImmutableEmptySet(null); | 49 useImmutableEmptySet(null); |
| 46 useElementVisitor(new ElementVisitor()); | 50 useElementVisitor(new ElementVisitor()); |
| 47 useJs(new js.Program(null)); | 51 useJs(new js.Program(null)); |
| 48 useJs(new js.Blob(null)); | 52 useJs(new js.Blob(null)); |
| 49 useJs(new js.NamedFunction(null, null)); | 53 useJs(new js.NamedFunction(null, null)); |
| 50 useConcreteTypesInferrer(null); | 54 useConcreteTypesInferrer(null); |
| 51 useColor(); | 55 useColor(); |
| 52 useFilenames(); | 56 useFilenames(); |
| 53 useSsa(null); | 57 useSsa(null); |
| 54 useCodeBuffer(null); | 58 useCodeBuffer(null); |
| 55 usedByTests(); | 59 usedByTests(); |
| 56 useElements(null, null, null); | 60 useElements(null, null, null, null, null); |
| 57 useIr(null, null, null); | 61 useIr(null, null, null); |
| 58 useCompiler(null); | 62 useCompiler(null); |
| 59 useTypes(); | 63 useTypes(); |
| 60 useCodeEmitterTask(null); | 64 useCodeEmitterTask(null); |
| 61 } | 65 } |
| 62 | 66 |
| 63 useApi() { | 67 useApi() { |
| 64 api.ReadStringFromUri uri; | 68 api.ReadStringFromUri uri; |
| 65 } | 69 } |
| 66 | 70 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 ..asTryStatement() | 116 ..asTryStatement() |
| 113 ..asTypeAnnotation() | 117 ..asTypeAnnotation() |
| 114 ..asTypeVariable() | 118 ..asTypeVariable() |
| 115 ..asTypedef() | 119 ..asTypedef() |
| 116 ..asWhile() | 120 ..asWhile() |
| 117 ..asYield(); | 121 ..asYield(); |
| 118 } | 122 } |
| 119 | 123 |
| 120 void useUtil(util.Link link) { | 124 void useUtil(util.Link link) { |
| 121 link.reversePrependAll(link); | 125 link.reversePrependAll(link); |
| 126 link.copyWithout(link); |
| 122 util.longestCommonPrefixLength(null, null); | 127 util.longestCommonPrefixLength(null, null); |
| 123 new util.Pair(null, null); | 128 new util.Pair(null, null); |
| 124 } | 129 } |
| 125 | 130 |
| 126 void useSetlet(util.Setlet setlet) { | 131 void useSetlet(util.Setlet setlet) { |
| 127 setlet.difference(setlet); | 132 setlet.difference(setlet); |
| 128 setlet.retainWhere(null); | 133 setlet.retainWhere(null); |
| 129 } | 134 } |
| 130 | 135 |
| 131 void useImmutableEmptySet(util.ImmutableEmptySet set) { | 136 void useImmutableEmptySet(util.ImmutableEmptySet set) { |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 world.hasAnyUserDefinedGetter(null); | 203 world.hasAnyUserDefinedGetter(null); |
| 199 typeGraphInferrer.getCallersOf(null); | 204 typeGraphInferrer.getCallersOf(null); |
| 200 dart_types.Types.sorted(null); | 205 dart_types.Types.sorted(null); |
| 201 new dart_types.Types(compiler).copy(compiler); | 206 new dart_types.Types(compiler).copy(compiler); |
| 202 new universe.TypedSelector.subclass(null, null, compiler.world); | 207 new universe.TypedSelector.subclass(null, null, compiler.world); |
| 203 new universe.TypedSelector.subtype(null, null, compiler.world); | 208 new universe.TypedSelector.subtype(null, null, compiler.world); |
| 204 new universe.TypedSelector.exact(null, null, compiler.world); | 209 new universe.TypedSelector.exact(null, null, compiler.world); |
| 205 sourceFileProvider.readStringFromUri(null); | 210 sourceFileProvider.readStringFromUri(null); |
| 206 } | 211 } |
| 207 | 212 |
| 208 useElements(elements.ClassElement e, elements.Name n, modelx.FieldElementX f) { | 213 useElements( |
| 214 elements.ClassElement e, |
| 215 elements.Name n, |
| 216 modelx.FieldElementX f, |
| 217 PartialClassElement pce, |
| 218 PartialFunctionElement pfe) { |
| 209 e.lookupClassMember(null); | 219 e.lookupClassMember(null); |
| 210 e.lookupInterfaceMember(null); | 220 e.lookupInterfaceMember(null); |
| 211 n.isAccessibleFrom(null); | 221 n.isAccessibleFrom(null); |
| 212 f.reuseElement(); | 222 f.reuseElement(); |
| 223 pce.copyWithEnclosing(null); |
| 224 pfe.copyWithEnclosing(null); |
| 213 } | 225 } |
| 214 | 226 |
| 215 useIr(cps_ir_nodes_sexpr.SExpressionStringifier stringifier, | 227 useIr(cps_ir_nodes_sexpr.SExpressionStringifier stringifier, |
| 216 ir_builder.IrBuilderTask task, | 228 ir_builder.IrBuilderTask task, |
| 217 ir_builder.IrBuilder builder) { | 229 ir_builder.IrBuilder builder) { |
| 218 new cps_ir_nodes_sexpr.SExpressionStringifier(); | 230 new cps_ir_nodes_sexpr.SExpressionStringifier(); |
| 219 stringifier | 231 stringifier |
| 220 ..newContinuationName() | 232 ..newContinuationName() |
| 221 ..newValueName() | 233 ..newValueName() |
| 222 ..visitConstant(null) | 234 ..visitConstant(null) |
| (...skipping 26 matching lines...) Expand all Loading... |
| 249 compiler.forgetElement(null); | 261 compiler.forgetElement(null); |
| 250 } | 262 } |
| 251 | 263 |
| 252 useTypes() { | 264 useTypes() { |
| 253 new dart_types.ResolvedTypedefType(null, null, null).unalias(null); | 265 new dart_types.ResolvedTypedefType(null, null, null).unalias(null); |
| 254 } | 266 } |
| 255 | 267 |
| 256 useCodeEmitterTask(js_emitter.CodeEmitterTask codeEmitterTask) { | 268 useCodeEmitterTask(js_emitter.CodeEmitterTask codeEmitterTask) { |
| 257 codeEmitterTask.oldEmitter.clearCspPrecompiledNodes(); | 269 codeEmitterTask.oldEmitter.clearCspPrecompiledNodes(); |
| 258 } | 270 } |
| OLD | NEW |