| 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 'dart2js.dart' as dart2js; | 11 import 'dart2js.dart' as dart2js; |
| 12 | 12 |
| 13 import 'dart2jslib.dart' as dart2jslib; | 13 import 'dart2jslib.dart' as dart2jslib; |
| 14 | 14 |
| 15 import 'tree/tree.dart' as tree; | 15 import 'tree/tree.dart' as tree; |
| 16 | 16 |
| 17 import 'util/util.dart' as util; | 17 import 'util/util.dart' as util; |
| 18 | 18 |
| 19 import 'elements/elements.dart' as elements; | |
| 20 | |
| 21 import 'elements/visitor.dart' as elements_visitor; | 19 import 'elements/visitor.dart' as elements_visitor; |
| 22 | 20 |
| 23 import 'js/js.dart' as js; | 21 import 'js/js.dart' as js; |
| 24 | 22 |
| 25 import 'types/concrete_types_inferrer.dart' as concrete_types_inferrer; | 23 import 'types/concrete_types_inferrer.dart' as concrete_types_inferrer; |
| 26 | 24 |
| 27 import 'colors.dart' as colors; | 25 import 'colors.dart' as colors; |
| 28 | 26 |
| 29 import 'filenames.dart' as filenames; | 27 import 'filenames.dart' as filenames; |
| 30 | 28 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 50 useElementVisitor(new ElementVisitor()); | 48 useElementVisitor(new ElementVisitor()); |
| 51 useJs(new js.Program(null)); | 49 useJs(new js.Program(null)); |
| 52 useJs(new js.Blob(null)); | 50 useJs(new js.Blob(null)); |
| 53 useJs(new js.NamedFunction(null, null)); | 51 useJs(new js.NamedFunction(null, null)); |
| 54 useConcreteTypesInferrer(null); | 52 useConcreteTypesInferrer(null); |
| 55 useColor(); | 53 useColor(); |
| 56 useFilenames(); | 54 useFilenames(); |
| 57 useSsa(null); | 55 useSsa(null); |
| 58 useCodeBuffer(null); | 56 useCodeBuffer(null); |
| 59 usedByTests(); | 57 usedByTests(); |
| 60 useElements(null, null); | |
| 61 } | 58 } |
| 62 | 59 |
| 63 void useConstant(dart2jslib.Constant constant, dart2jslib.ConstantSystem cs) { | 60 void useConstant(dart2jslib.Constant constant, dart2jslib.ConstantSystem cs) { |
| 64 constant.isObject(); | 61 constant.isObject(); |
| 65 cs.isBool(constant); | 62 cs.isBool(constant); |
| 66 } | 63 } |
| 67 | 64 |
| 68 void useNode(tree.Node node) { | 65 void useNode(tree.Node node) { |
| 69 node | 66 node |
| 70 ..asBreakStatement() | 67 ..asBreakStatement() |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 | 168 |
| 172 useCodeBuffer(dart2jslib.CodeBuffer buffer) { | 169 useCodeBuffer(dart2jslib.CodeBuffer buffer) { |
| 173 buffer.writeln(); | 170 buffer.writeln(); |
| 174 } | 171 } |
| 175 | 172 |
| 176 usedByTests() { | 173 usedByTests() { |
| 177 // TODO(ahe): We should try to avoid including API used only for tests. In | 174 // TODO(ahe): We should try to avoid including API used only for tests. In |
| 178 // most cases, such API can be moved to a test library. | 175 // most cases, such API can be moved to a test library. |
| 179 dart2jslib.World world = null; | 176 dart2jslib.World world = null; |
| 180 dart2jslib.Compiler compiler = null; | 177 dart2jslib.Compiler compiler = null; |
| 181 compiler.currentlyInUserCode(); | |
| 182 compiler.inUserCode(null); | |
| 183 type_graph_inferrer.TypeGraphInferrer typeGraphInferrer = null; | 178 type_graph_inferrer.TypeGraphInferrer typeGraphInferrer = null; |
| 184 source_file_provider.SourceFileProvider sourceFileProvider = null; | 179 source_file_provider.SourceFileProvider sourceFileProvider = null; |
| 185 world.hasAnyUserDefinedGetter(null); | 180 world.hasAnyUserDefinedGetter(null); |
| 186 compiler.importHelperLibrary(null); | 181 compiler.importHelperLibrary(null); |
| 187 typeGraphInferrer.getCallersOf(null); | 182 typeGraphInferrer.getCallersOf(null); |
| 188 dart_types.Types.sorted(null); | 183 dart_types.Types.sorted(null); |
| 189 new universe.TypedSelector.subclass(null, null); | 184 new universe.TypedSelector.subclass(null, null); |
| 190 new universe.TypedSelector.subtype(null, null); | 185 new universe.TypedSelector.subtype(null, null); |
| 191 new universe.TypedSelector.exact(null, null); | 186 new universe.TypedSelector.exact(null, null); |
| 192 sourceFileProvider.readStringFromUri(null); | 187 sourceFileProvider.readStringFromUri(null); |
| 193 } | 188 } |
| 194 | |
| 195 useElements(elements.ClassElement e, elements.Name n) { | |
| 196 e.lookupClassMember(null); | |
| 197 e.lookupInterfaceMember(null); | |
| 198 n.isAccessibleFrom(null); | |
| 199 } | |
| OLD | NEW |