| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 part of dart2js.semantics_visitor; | 5 part of dart2js.semantics_visitor; |
| 6 | 6 |
| 7 enum SendStructureKind { | 7 enum SendStructureKind { |
| 8 GET, | 8 GET, |
| 9 SET, | 9 SET, |
| 10 INVOKE, | 10 INVOKE, |
| (...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 return new AccessSemantics.expression(); | 378 return new AccessSemantics.expression(); |
| 379 } | 379 } |
| 380 } else if (Elements.isErroneous(element)) { | 380 } else if (Elements.isErroneous(element)) { |
| 381 return new StaticAccess.unresolved(element); | 381 return new StaticAccess.unresolved(element); |
| 382 } else { | 382 } else { |
| 383 return handleStaticallyResolvedAccess(node, element, getter); | 383 return handleStaticallyResolvedAccess(node, element, getter); |
| 384 } | 384 } |
| 385 } else { | 385 } else { |
| 386 if (Elements.isErroneous(element)) { | 386 if (Elements.isErroneous(element)) { |
| 387 return new StaticAccess.unresolved(element); | 387 return new StaticAccess.unresolved(element); |
| 388 } else if (isCompound && Elements.isErroneous(getter)) { |
| 389 return new StaticAccess.unresolved(getter); |
| 388 } else if (element == null || element.isInstanceMember) { | 390 } else if (element == null || element.isInstanceMember) { |
| 389 if (node.receiver == null || node.receiver.isThis()) { | 391 if (node.receiver == null || node.receiver.isThis()) { |
| 390 return new AccessSemantics.thisProperty(); | 392 return new AccessSemantics.thisProperty(); |
| 391 } else { | 393 } else { |
| 392 return new DynamicAccess.dynamicProperty(node.receiver); | 394 return new DynamicAccess.dynamicProperty(node.receiver); |
| 393 } | 395 } |
| 394 } else if (element.impliesType) { | 396 } else if (element.impliesType) { |
| 395 // TODO(johnniwinther): Provide an [ErroneousElement]. | 397 // TODO(johnniwinther): Provide an [ErroneousElement]. |
| 396 // This happens for code like `C.this`. | 398 // This happens for code like `C.this`. |
| 397 return new StaticAccess.unresolved(null); | 399 return new StaticAccess.unresolved(null); |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 Element element = elements[node.send]; | 460 Element element = elements[node.send]; |
| 459 Selector selector = elements.getSelector(node.send); | 461 Selector selector = elements.getSelector(node.send); |
| 460 DartType type = elements.getType(node); | 462 DartType type = elements.getType(node); |
| 461 | 463 |
| 462 ConstructorAccessSemantics constructorAccessSemantics = | 464 ConstructorAccessSemantics constructorAccessSemantics = |
| 463 computeConstructorAccessSemantics(element, type); | 465 computeConstructorAccessSemantics(element, type); |
| 464 return new NewInvokeStructure(constructorAccessSemantics, selector); | 466 return new NewInvokeStructure(constructorAccessSemantics, selector); |
| 465 } | 467 } |
| 466 } | 468 } |
| 467 | 469 |
| OLD | NEW |