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

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

Issue 2808763005: Extract OrderedTypeSetBuilderBase from OrderedTypeSetBuilder (Closed)
Patch Set: Created 3 years, 8 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 library dart2js.mirrors_used; 5 library dart2js.mirrors_used;
6 6
7 import 'common/tasks.dart' show CompilerTask; 7 import 'common/tasks.dart' show CompilerTask;
8 import 'common.dart'; 8 import 'common.dart';
9 import 'compile_time_constants.dart' show ConstantCompiler; 9 import 'compile_time_constants.dart' show ConstantCompiler;
10 import 'compiler.dart' show Compiler; 10 import 'compiler.dart' show Compiler;
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 } 416 }
417 417
418 /// Find the first non-implementation interface of constant. 418 /// Find the first non-implementation interface of constant.
419 ResolutionDartType apiTypeOf(ConstantValue constant) { 419 ResolutionDartType apiTypeOf(ConstantValue constant) {
420 ResolutionDartType type = constant.getType(compiler.commonElements); 420 ResolutionDartType type = constant.getType(compiler.commonElements);
421 LibraryElement library = type.element.library; 421 LibraryElement library = type.element.library;
422 if (type.isInterfaceType && library.isInternalLibrary) { 422 if (type.isInterfaceType && library.isInternalLibrary) {
423 ResolutionInterfaceType interface = type; 423 ResolutionInterfaceType interface = type;
424 ClassElement cls = type.element; 424 ClassElement cls = type.element;
425 cls.ensureResolved(compiler.resolution); 425 cls.ensureResolved(compiler.resolution);
426 for (ResolutionDartType supertype in cls.allSupertypes) { 426 for (ResolutionInterfaceType supertype in cls.allSupertypes) {
427 if (supertype.isInterfaceType && 427 if (supertype.isInterfaceType &&
428 !supertype.element.library.isInternalLibrary) { 428 !supertype.element.library.isInternalLibrary) {
429 return interface.asInstanceOf(supertype.element); 429 return interface.asInstanceOf(supertype.element);
430 } 430 }
431 } 431 }
432 } 432 }
433 return type; 433 return type;
434 } 434 }
435 435
436 /// Convert a list of strings and types to a list of elements. Types are 436 /// Convert a list of strings and types to a list of elements. Types are
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 // @MirrorsUsed(targets: fisk) 566 // @MirrorsUsed(targets: fisk)
567 // ^^^^ 567 // ^^^^
568 // 568 //
569 // Instead of saying 'fisk' should pretty print the problematic constant 569 // Instead of saying 'fisk' should pretty print the problematic constant
570 // value. 570 // value.
571 return spannable; 571 return spannable;
572 } 572 }
573 return node; 573 return node;
574 } 574 }
575 } 575 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart ('k') | pkg/compiler/lib/src/ordered_typeset.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698