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

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

Issue 1182563003: Handle most qualified sends. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Handle qualified access of ambiguous static members. 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 796e83bfe9b840105a1b60d984117e9be2b4d428..cc4a9ab079d5fcc48c7e5d581a9d91fd22c072d1 100644
--- a/pkg/compiler/lib/src/resolution/send_structure.dart
+++ b/pkg/compiler/lib/src/resolution/send_structure.dart
@@ -175,15 +175,14 @@ 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,
@@ -453,14 +452,13 @@ 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,
@@ -614,15 +612,14 @@ 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,
@@ -1278,17 +1275,16 @@ 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,
@@ -1705,16 +1701,15 @@ 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,
@@ -2022,16 +2017,15 @@ 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