| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 class Interceptors { | 5 class Interceptors { |
| 6 Compiler compiler; | 6 Compiler compiler; |
| 7 Interceptors(Compiler this.compiler); | 7 Interceptors(Compiler this.compiler); |
| 8 | 8 |
| 9 SourceString mapOperatorToMethodName(Operator op) { | 9 SourceString mapOperatorToMethodName(Operator op) { |
| 10 String name = op.source.stringValue; | 10 String name = op.source.stringValue; |
| (...skipping 1146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1157 } | 1157 } |
| 1158 if (staticInterceptor != null) { | 1158 if (staticInterceptor != null) { |
| 1159 HStatic target = new HStatic(staticInterceptor); | 1159 HStatic target = new HStatic(staticInterceptor); |
| 1160 add(target); | 1160 add(target); |
| 1161 List<HInstruction> inputs = <HInstruction>[target, receiver]; | 1161 List<HInstruction> inputs = <HInstruction>[target, receiver]; |
| 1162 push(new HInvokeInterceptor(selector, getterName, true, inputs)); | 1162 push(new HInvokeInterceptor(selector, getterName, true, inputs)); |
| 1163 } else { | 1163 } else { |
| 1164 push(new HInvokeDynamicGetter(selector, null, getterName, receiver)); | 1164 push(new HInvokeDynamicGetter(selector, null, getterName, receiver)); |
| 1165 } | 1165 } |
| 1166 } else if (Elements.isStaticOrTopLevelFunction(element)) { | 1166 } else if (Elements.isStaticOrTopLevelFunction(element)) { |
| 1167 compiler.unimplemented("SsaBuilder.visitSend with static", node: send); | 1167 push(new HStatic(element)); |
| 1168 compiler.registerGetOfStaticFunction(element); |
| 1168 } else { | 1169 } else { |
| 1169 stack.add(localsHandler.readLocal(element)); | 1170 stack.add(localsHandler.readLocal(element)); |
| 1170 } | 1171 } |
| 1171 } | 1172 } |
| 1172 | 1173 |
| 1173 void generateSetter(SendSet send, Element element, HInstruction value) { | 1174 void generateSetter(SendSet send, Element element, HInstruction value) { |
| 1174 Selector selector = elements.getSelector(send); | 1175 Selector selector = elements.getSelector(send); |
| 1175 if (Elements.isStaticOrTopLevelField(element)) { | 1176 if (Elements.isStaticOrTopLevelField(element)) { |
| 1176 if (element.kind == ElementKind.SETTER) { | 1177 if (element.kind == ElementKind.SETTER) { |
| 1177 HStatic target = new HStatic(element); | 1178 HStatic target = new HStatic(element); |
| (...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1943 } | 1944 } |
| 1944 | 1945 |
| 1945 visitCatchBlock(CatchBlock node) { | 1946 visitCatchBlock(CatchBlock node) { |
| 1946 visit(node.block); | 1947 visit(node.block); |
| 1947 } | 1948 } |
| 1948 | 1949 |
| 1949 visitTypedef(Typedef node) { | 1950 visitTypedef(Typedef node) { |
| 1950 compiler.unimplemented('SsaBuilder.visitTypedef', node: node); | 1951 compiler.unimplemented('SsaBuilder.visitTypedef', node: node); |
| 1951 } | 1952 } |
| 1952 } | 1953 } |
| OLD | NEW |