Chromium Code Reviews| Index: frog/leg/ssa/builder.dart |
| =================================================================== |
| --- frog/leg/ssa/builder.dart (revision 3735) |
| +++ frog/leg/ssa/builder.dart (working copy) |
| @@ -783,7 +783,11 @@ |
| Selector selector = elements.getSelector(send); |
| if (Elements.isStaticOrTopLevelField(element)) { |
| push(new HStatic(element)); |
| - } else if (element === null || Elements.isInstanceField(element)) { |
| + if (element.kind == ElementKind.GETTER) { |
| + push(new HInvokeStatic(selector, <HInstruction>[pop()])); |
| + } |
| + } else if (element === null |
| + || Elements.isInstanceField(element)) { |
|
karlklose
2012/02/01 14:17:06
Does it fit in one line?
ngeoffray
2012/02/01 15:57:12
Done.
|
| HInstruction receiver; |
| if (send.receiver == null) { |
| receiver = thisDefinition; |
| @@ -820,18 +824,16 @@ |
| void generateSetter(SendSet send, Element element, HInstruction value) { |
| Selector selector = elements.getSelector(send); |
| if (Elements.isStaticOrTopLevelField(element)) { |
| - add(new HStaticStore(element, value)); |
| - stack.add(value); |
| - } else if (Elements.isInstanceField(element)) { |
| - SourceString methodName = element.name; |
| - HInstruction receiver = thisDefinition; |
| - if (receiver === null) { |
| - compiler.unimplemented("Ssa.generateSetter.", node: send); |
| + if (element.kind == ElementKind.SETTER) { |
| + HStatic target = new HStatic(element); |
| + add(target); |
| + add(new HInvokeStatic(selector, <HInstruction>[target, value])); |
| + } else { |
| + add(new HStaticStore(element, value)); |
| } |
| - add(new HInvokeDynamicSetter( |
| - selector, element, methodName, receiver, value)); |
| stack.add(value); |
| - } else if (element === null) { |
| + } else if (element === null |
|
karlklose
2012/02/01 14:17:06
ditto.
ngeoffray
2012/02/01 15:57:12
Done.
|
| + || Elements.isInstanceField(element)) { |
| SourceString dartSetterName = send.selector.asIdentifier().source; |
| HInstruction receiver; |
| if (send.receiver == null) { |