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

Unified Diff: pkg/compiler/lib/src/js_backend/mirrors_analysis.dart

Issue 2932883002: Add FrontendStrategy.commonElements and remove Backend.commonElements (Closed)
Patch Set: Created 3 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 side-by-side diff with in-line comments
Download patch
Index: pkg/compiler/lib/src/js_backend/mirrors_analysis.dart
diff --git a/pkg/compiler/lib/src/js_backend/mirrors_analysis.dart b/pkg/compiler/lib/src/js_backend/mirrors_analysis.dart
index 6bc41cc82f3e19144a0dade020f311773be6bcc1..7fa3ecfe521b92c20c76ffe8d60776937002629f 100644
--- a/pkg/compiler/lib/src/js_backend/mirrors_analysis.dart
+++ b/pkg/compiler/lib/src/js_backend/mirrors_analysis.dart
@@ -384,6 +384,16 @@ class MirrorsHandler {
}
}
+ /// Set of classes that need to be considered for reflection although not
+ /// otherwise visible during resolution.
+ Iterable<ClassEntity> get _classesRequiredForReflection {
+ // TODO(herhut): Clean this up when classes needed for rti are tracked.
+ return [
+ _backend.compiler.commonElements.closureClass,
+ _backend.compiler.commonElements.jsIndexableClass
+ ];
+ }
+
/// Enqueue special classes that might not be visible by normal means or that
/// would not normally be enqueued:
///
@@ -392,7 +402,7 @@ class MirrorsHandler {
/// that none of its methods are reflectable, unless reflectable by
/// inheritance.
void _enqueueReflectiveSpecialClasses() {
- Iterable<ClassElement> classes = _backend.classesRequiredForReflection;
+ Iterable<ClassElement> classes = _classesRequiredForReflection;
for (ClassElement cls in classes) {
if (_backend.mirrorsData.isClassReferencedFromMirrorSystem(cls)) {
_logEnqueueReflectiveAction(cls);
« no previous file with comments | « pkg/compiler/lib/src/js_backend/element_strategy.dart ('k') | pkg/compiler/lib/src/js_emitter/full_emitter/class_emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698