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

Unified Diff: pkg/compiler/lib/src/resolution/send_structure.dart

Issue 1185483004: Revert "Handle most qualified sends." (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/resolution/send_resolver.dart ('k') | pkg/compiler/lib/src/warnings.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/resolution/send_structure.dart
diff --git a/pkg/compiler/lib/src/resolution/send_structure.dart b/pkg/compiler/lib/src/resolution/send_structure.dart
index cc4a9ab079d5fcc48c7e5d581a9d91fd22c072d1..796e83bfe9b840105a1b60d984117e9be2b4d428 100644
--- a/pkg/compiler/lib/src/resolution/send_structure.dart
+++ b/pkg/compiler/lib/src/resolution/send_structure.dart
@@ -175,14 +175,15 @@ class InvokeStructure<R, A> implements SendStructure<R, A> {
R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) {
switch (semantics.kind) {
- case AccessKind.CONDITIONAL_DYNAMIC_PROPERTY:
- return visitor.visitIfNotNullDynamicPropertyInvoke(
- node,
- node.receiver,
- node.argumentsNode,
- selector,
- arg);
case AccessKind.DYNAMIC_PROPERTY:
+ if (node.isConditional) {
+ return visitor.visitIfNotNullDynamicPropertyInvoke(
+ node,
+ node.receiver,
+ node.argumentsNode,
+ selector,
+ arg);
+ }
return visitor.visitDynamicPropertyInvoke(
node,
node.receiver,
@@ -452,13 +453,14 @@ class GetStructure<R, A> implements SendStructure<R, A> {
R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) {
switch (semantics.kind) {
- case AccessKind.CONDITIONAL_DYNAMIC_PROPERTY:
- return visitor.visitIfNotNullDynamicPropertyGet(
- node,
- node.receiver,
- selector,
- arg);
case AccessKind.DYNAMIC_PROPERTY:
+ if (node.isConditional) {
+ return visitor.visitIfNotNullDynamicPropertyGet(
+ node,
+ node.receiver,
+ selector,
+ arg);
+ }
return visitor.visitDynamicPropertyGet(
node,
node.receiver,
@@ -612,14 +614,15 @@ class SetStructure<R, A> implements SendStructure<R, A> {
R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) {
switch (semantics.kind) {
- case AccessKind.CONDITIONAL_DYNAMIC_PROPERTY:
- return visitor.visitIfNotNullDynamicPropertySet(
- node,
- node.receiver,
- selector,
- node.arguments.single,
- arg);
case AccessKind.DYNAMIC_PROPERTY:
+ if (node.isConditional) {
+ return visitor.visitIfNotNullDynamicPropertySet(
+ node,
+ node.receiver,
+ selector,
+ node.arguments.single,
+ arg);
+ }
return visitor.visitDynamicPropertySet(
node,
node.receiver,
@@ -1275,16 +1278,17 @@ class CompoundStructure<R, A> implements SendStructure<R, A> {
R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) {
switch (semantics.kind) {
- case AccessKind.CONDITIONAL_DYNAMIC_PROPERTY:
- return visitor.visitIfNotNullDynamicPropertyCompound(
- node,
- node.receiver,
- operator,
- node.arguments.single,
- getterSelector,
- setterSelector,
- arg);
case AccessKind.DYNAMIC_PROPERTY:
+ if (node.isConditional) {
+ return visitor.visitIfNotNullDynamicPropertyCompound(
+ node,
+ node.receiver,
+ operator,
+ node.arguments.single,
+ getterSelector,
+ setterSelector,
+ arg);
+ }
return visitor.visitDynamicPropertyCompound(
node,
node.receiver,
@@ -1701,15 +1705,16 @@ class PrefixStructure<R, A> implements SendStructure<R, A> {
R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) {
switch (semantics.kind) {
- case AccessKind.CONDITIONAL_DYNAMIC_PROPERTY:
- return visitor.visitIfNotNullDynamicPropertyPrefix(
- node,
- node.receiver,
- operator,
- getterSelector,
- setterSelector,
- arg);
case AccessKind.DYNAMIC_PROPERTY:
+ if (node.isConditional) {
+ return visitor.visitIfNotNullDynamicPropertyPrefix(
+ node,
+ node.receiver,
+ operator,
+ getterSelector,
+ setterSelector,
+ arg);
+ }
return visitor.visitDynamicPropertyPrefix(
node,
node.receiver,
@@ -2017,15 +2022,16 @@ class PostfixStructure<R, A> implements SendStructure<R, A> {
R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) {
switch (semantics.kind) {
- case AccessKind.CONDITIONAL_DYNAMIC_PROPERTY:
- return visitor.visitIfNotNullDynamicPropertyPostfix(
- node,
- node.receiver,
- operator,
- getterSelector,
- setterSelector,
- arg);
case AccessKind.DYNAMIC_PROPERTY:
+ if (node.isConditional) {
+ return visitor.visitIfNotNullDynamicPropertyPostfix(
+ node,
+ node.receiver,
+ operator,
+ getterSelector,
+ setterSelector,
+ arg);
+ }
return visitor.visitDynamicPropertyPostfix(
node,
node.receiver,
« no previous file with comments | « pkg/compiler/lib/src/resolution/send_resolver.dart ('k') | pkg/compiler/lib/src/warnings.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698