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

Side by Side Diff: pkg/compiler/lib/src/js_backend/mirrors_data.dart

Issue 2804993002: Extract ResolutionWorldBuilderBase from ElementResolutionWorldBuilder (Closed)
Patch Set: Fix. 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
« no previous file with comments | « pkg/compiler/lib/src/elements/entities.dart ('k') | pkg/compiler/lib/src/kernel/elements.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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 import '../closure.dart'; 5 import '../closure.dart';
6 import '../common.dart'; 6 import '../common.dart';
7 import '../common_elements.dart'; 7 import '../common_elements.dart';
8 import '../compiler.dart'; 8 import '../compiler.dart';
9 import '../constants/values.dart'; 9 import '../constants/values.dart';
10 import '../elements/elements.dart'; 10 import '../elements/elements.dart';
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
651 foundClosure = true; 651 foundClosure = true;
652 } 652 }
653 } 653 }
654 } 654 }
655 // As we do not think about closures as classes, yet, we have to make sure 655 // As we do not think about closures as classes, yet, we have to make sure
656 // their superclasses are available for reflection manually. 656 // their superclasses are available for reflection manually.
657 if (foundClosure) { 657 if (foundClosure) {
658 ClassElement cls = _helpers.closureClass; 658 ClassElement cls = _helpers.closureClass;
659 _classesNeededForReflection.add(cls); 659 _classesNeededForReflection.add(cls);
660 } 660 }
661 Set<MethodElement> closurizedMembers = worldBuilder.closurizedMembers; 661 Set<FunctionEntity> closurizedMembers = worldBuilder.closurizedMembers;
662 if (closurizedMembers.any(_membersNeededForReflection.contains)) { 662 if (closurizedMembers.any(_membersNeededForReflection.contains)) {
663 ClassElement cls = _helpers.boundClosureClass; 663 ClassElement cls = _helpers.boundClosureClass;
664 _classesNeededForReflection.add(cls); 664 _classesNeededForReflection.add(cls);
665 } 665 }
666 // Add typedefs. 666 // Add typedefs.
667 _typedefsNeededForReflection.addAll( 667 _typedefsNeededForReflection.addAll(
668 closedWorld.allTypedefs.where(isTypedefReferencedFromMirrorSystem)); 668 closedWorld.allTypedefs.where(isTypedefReferencedFromMirrorSystem));
669 // Register all symbols of reflectable elements 669 // Register all symbols of reflectable elements
670 for (ClassElement element in _classesNeededForReflection) { 670 for (ClassElement element in _classesNeededForReflection) {
671 symbolsUsed.add(element.name); 671 symbolsUsed.add(element.name);
(...skipping 21 matching lines...) Expand all
693 } 693 }
694 694
695 /// Called when `const Symbol(name)` is seen. 695 /// Called when `const Symbol(name)` is seen.
696 void registerConstSymbol(String name) { 696 void registerConstSymbol(String name) {
697 symbolsUsed.add(name); 697 symbolsUsed.add(name);
698 if (name.endsWith('=')) { 698 if (name.endsWith('=')) {
699 symbolsUsed.add(name.substring(0, name.length - 1)); 699 symbolsUsed.add(name.substring(0, name.length - 1));
700 } 700 }
701 } 701 }
702 } 702 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/elements/entities.dart ('k') | pkg/compiler/lib/src/kernel/elements.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698