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

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

Issue 2992863002: Support forEachClassMember on closure classes (Closed)
Patch Set: Updated cf. comments Created 3 years, 4 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
« no previous file with comments | « pkg/compiler/lib/src/common/codegen.dart ('k') | pkg/compiler/lib/src/js_emitter/metadata_collector.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_backend/impact_transformer.dart
diff --git a/pkg/compiler/lib/src/js_backend/impact_transformer.dart b/pkg/compiler/lib/src/js_backend/impact_transformer.dart
index f6df88a73314994de0115749405b1828ca9b1918..d390090623f634e5bd6694d9009bf2860eee1ae7 100644
--- a/pkg/compiler/lib/src/js_backend/impact_transformer.dart
+++ b/pkg/compiler/lib/src/js_backend/impact_transformer.dart
@@ -4,13 +4,14 @@
library js_backend.backend.impact_transformer;
+import '../closure.dart';
import '../common.dart';
import '../common_elements.dart';
import '../common/backend_api.dart' show ImpactTransformer;
import '../common/codegen.dart' show CodegenImpact;
import '../common/resolution.dart' show ResolutionImpact;
-import '../constants/expressions.dart';
import '../common_elements.dart' show ElementEnvironment;
+import '../constants/expressions.dart';
import '../elements/entities.dart';
import '../elements/types.dart';
import '../native/enqueue.dart';
@@ -427,11 +428,18 @@ class CodegenImpactTransformer {
for (StaticUse staticUse in impact.staticUses) {
switch (staticUse.kind) {
- case StaticUseKind.CLOSURE:
- Local closure = staticUse.element;
- if (_rtiNeed.localFunctionNeedsRti(closure)) {
+ case StaticUseKind.CALL_METHOD:
+ FunctionEntity callMethod = staticUse.element;
+ // TODO(johnniwinther): Remove [localFunctionNeedsRti] and use
+ // the call method instead.
+ if (_rtiNeed.methodNeedsRti(callMethod)) {
_impacts.computeSignature
.registerImpact(transformed, _elementEnvironment);
+ } else if (callMethod is SynthesizedCallMethodElementX) {
+ if (_rtiNeed.localFunctionNeedsRti(callMethod.expression)) {
+ _impacts.computeSignature
+ .registerImpact(transformed, _elementEnvironment);
+ }
}
break;
case StaticUseKind.CONST_CONSTRUCTOR_INVOKE:
« no previous file with comments | « pkg/compiler/lib/src/common/codegen.dart ('k') | pkg/compiler/lib/src/js_emitter/metadata_collector.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698