Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(189)

Side by Side Diff: pkg/compiler/lib/src/use_unused_api.dart

Issue 1182913003: Split TypedSelector into Selector and TypeMask. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Add SelectorMask for FunctionSetNode.cache Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 18 matching lines...) Expand all
29 import 'io/code_output.dart' as io; 29 import 'io/code_output.dart' as io;
30 import 'io/source_map_builder.dart' as io; 30 import 'io/source_map_builder.dart' as io;
31 import 'js/js.dart' as js; 31 import 'js/js.dart' as js;
32 import 'js_backend/js_backend.dart' as js_backend; 32 import 'js_backend/js_backend.dart' as js_backend;
33 import 'js_emitter/js_emitter.dart' as js_emitter; 33 import 'js_emitter/js_emitter.dart' as js_emitter;
34 import 'js_emitter/program_builder.dart' as program_builder; 34 import 'js_emitter/program_builder.dart' as program_builder;
35 import 'resolution/semantic_visitor.dart' as semantic_visitor; 35 import 'resolution/semantic_visitor.dart' as semantic_visitor;
36 import 'source_file_provider.dart' as source_file_provider; 36 import 'source_file_provider.dart' as source_file_provider;
37 import 'ssa/ssa.dart' as ssa; 37 import 'ssa/ssa.dart' as ssa;
38 import 'tree/tree.dart' as tree; 38 import 'tree/tree.dart' as tree;
39 import 'universe/universe.dart' as universe;
40 import 'util/util.dart' as util; 39 import 'util/util.dart' as util;
41 40
42 import 'scanner/scannerlib.dart' show 41 import 'scanner/scannerlib.dart' show
43 PartialClassElement, 42 PartialClassElement,
44 PartialFunctionElement; 43 PartialFunctionElement;
45 44
46 class ElementVisitor extends elements_visitor.BaseElementVisitor { 45 class ElementVisitor extends elements_visitor.BaseElementVisitor {
47 visitElement(e, a) {} 46 visitElement(e, a) {}
48 } 47 }
49 48
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 } 225 }
227 226
228 usedByTests() { 227 usedByTests() {
229 // TODO(ahe): We should try to avoid including API used only for tests. In 228 // TODO(ahe): We should try to avoid including API used only for tests. In
230 // most cases, such API can be moved to a test library. 229 // most cases, such API can be moved to a test library.
231 dart2jslib.World world = null; 230 dart2jslib.World world = null;
232 dart2jslib.Compiler compiler = null; 231 dart2jslib.Compiler compiler = null;
233 compiler.currentlyInUserCode(); 232 compiler.currentlyInUserCode();
234 type_graph_inferrer.TypeGraphInferrer typeGraphInferrer = null; 233 type_graph_inferrer.TypeGraphInferrer typeGraphInferrer = null;
235 source_file_provider.SourceFileProvider sourceFileProvider = null; 234 source_file_provider.SourceFileProvider sourceFileProvider = null;
236 world.hasAnyUserDefinedGetter(null); 235 world.hasAnyUserDefinedGetter(null, null);
237 typeGraphInferrer.getCallersOf(null); 236 typeGraphInferrer.getCallersOf(null);
238 dart_types.Types.sorted(null); 237 dart_types.Types.sorted(null);
239 new dart_types.Types(compiler).copy(compiler); 238 new dart_types.Types(compiler).copy(compiler);
240 new universe.TypedSelector.subclass(null, null, compiler.world);
241 new universe.TypedSelector.subtype(null, null, compiler.world);
242 new universe.TypedSelector.exact(null, null, compiler.world);
243 sourceFileProvider.readStringFromUri(null); 239 sourceFileProvider.readStringFromUri(null);
244 } 240 }
245 241
246 useElements( 242 useElements(
247 [elements.ClassElement e, 243 [elements.ClassElement e,
248 elements.Name n, 244 elements.Name n,
249 modelx.FieldElementX f, 245 modelx.FieldElementX f,
250 PartialClassElement pce, 246 PartialClassElement pce,
251 PartialFunctionElement pfe, 247 PartialFunctionElement pfe,
252 elements.LibraryElement l]) { 248 elements.LibraryElement l]) {
253 e.lookupClassMember(null); 249 e.lookupClassMember(null);
254 e.lookupInterfaceMember(null); 250 e.lookupInterfaceMember(null);
255 n.isAccessibleFrom(null); 251 n.isAccessibleFrom(null);
256 f.reuseElement(); 252 f.reuseElement();
257 pce.copyWithEnclosing(null); 253 pce.copyWithEnclosing(null);
258 pfe.copyWithEnclosing(null); 254 pfe.copyWithEnclosing(null);
259 l.forEachImport(null); 255 l.forEachImport(null);
260 } 256 }
261 257
262 useIr(ir_builder.IrBuilder builder) { 258 useIr(ir_builder.IrBuilder builder) {
263 builder 259 builder
264 ..buildStringConstant(null) 260 ..buildStringConstant(null)
265 ..buildDynamicGet(null, null); 261 ..buildDynamicGet(null, null, null);
266 } 262 }
267 263
268 useCompiler(dart2jslib.Compiler compiler) { 264 useCompiler(dart2jslib.Compiler compiler) {
269 compiler.libraryLoader 265 compiler.libraryLoader
270 ..reset() 266 ..reset()
271 ..resetAsync(null) 267 ..resetAsync(null)
272 ..lookupLibrary(null); 268 ..lookupLibrary(null);
273 compiler.forgetElement(null); 269 compiler.forgetElement(null);
274 compiler.backend.constantCompilerTask.copyConstantValues(null); 270 compiler.backend.constantCompilerTask.copyConstantValues(null);
275 } 271 }
(...skipping 25 matching lines...) Expand all
301 297
302 class TreeVisitor1 extends tree_ir.ExpressionVisitor1 298 class TreeVisitor1 extends tree_ir.ExpressionVisitor1
303 with tree_ir.StatementVisitor1 { 299 with tree_ir.StatementVisitor1 {
304 noSuchMethod(inv) {} 300 noSuchMethod(inv) {}
305 } 301 }
306 302
307 useTreeVisitors() { 303 useTreeVisitors() {
308 new TreeVisitor1().visitExpression(null, null); 304 new TreeVisitor1().visitExpression(null, null);
309 new TreeVisitor1().visitStatement(null, null); 305 new TreeVisitor1().visitStatement(null, null);
310 } 306 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698