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

Unified Diff: lib/compiler/implementation/resolver.dart

Issue 10836339: Get rid of the name in HInvokeDynamic (just use the selector instead). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix checked mode. Created 8 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 | « lib/compiler/implementation/js_backend/backend.dart ('k') | lib/compiler/implementation/ssa/builder.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/resolver.dart
diff --git a/lib/compiler/implementation/resolver.dart b/lib/compiler/implementation/resolver.dart
index b5cae609591094447d7d015c3ffcade9adf5ba3d..fec0242eef332ab9706544afff5782b6dd5727ca 100644
--- a/lib/compiler/implementation/resolver.dart
+++ b/lib/compiler/implementation/resolver.dart
@@ -10,12 +10,12 @@ interface TreeElements {
class TreeElementMapping implements TreeElements {
Map<Node, Element> map;
- Map<Send, Selector> selectors;
+ Map<Node, Selector> selectors;
Map<TypeAnnotation, Type> types;
TreeElementMapping()
: map = new LinkedHashMap<Node, Element>(),
- selectors = new LinkedHashMap<Send, Selector>(),
+ selectors = new LinkedHashMap<Node, Selector>(),
types = new LinkedHashMap<TypeAnnotation, Type>();
operator []=(Node node, Element element) => map[node] = element;
@@ -28,11 +28,11 @@ class TreeElementMapping implements TreeElements {
Type getType(TypeAnnotation annotation) => types[annotation];
- void setSelector(Send send, Selector selector) {
- selectors[send] = selector;
+ void setSelector(Node node, Selector selector) {
+ selectors[node] = selector;
}
- Selector getSelector(Send send) => selectors[send];
+ Selector getSelector(Node node) => selectors[node];
}
class ResolverTask extends CompilerTask {
@@ -1339,8 +1339,14 @@ class ResolverVisitor extends CommonResolverVisitor<Element> {
bool isComplex = source !== '=';
if (isComplex) {
if (selector.isSetter()) {
+ // TODO(kasperl): We're registering the getter selector for
+ // compound assignments on the AST selector node. In the code
+ // generator, we then fetch it from there when generating the
+ // getter for a SendSet node.
+ Selector getterSelector = new Selector.getterFrom(selector);
+ registerSend(getterSelector, getter);
+ mapping.setSelector(node.selector, getterSelector);
useElement(node.selector, getter);
- registerSend(new Selector.getterFrom(selector), getter);
} else {
// TODO(kasperl): If [getter] is resolved, it will actually
// refer to the []= operator which isn't the one we want to
« no previous file with comments | « lib/compiler/implementation/js_backend/backend.dart ('k') | lib/compiler/implementation/ssa/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698