| 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 1150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1161 } | 1161 } |
| 1162 if (staticInterceptor != null) { | 1162 if (staticInterceptor != null) { |
| 1163 HStatic target = new HStatic(staticInterceptor); | 1163 HStatic target = new HStatic(staticInterceptor); |
| 1164 add(target); | 1164 add(target); |
| 1165 List<HInstruction> inputs = <HInstruction>[target, receiver]; | 1165 List<HInstruction> inputs = <HInstruction>[target, receiver]; |
| 1166 push(new HInvokeInterceptor(selector, getterName, true, inputs)); | 1166 push(new HInvokeInterceptor(selector, getterName, true, inputs)); |
| 1167 } else { | 1167 } else { |
| 1168 push(new HInvokeDynamicGetter(selector, null, getterName, receiver)); | 1168 push(new HInvokeDynamicGetter(selector, null, getterName, receiver)); |
| 1169 } | 1169 } |
| 1170 } else if (Elements.isStaticOrTopLevelFunction(element)) { | 1170 } else if (Elements.isStaticOrTopLevelFunction(element)) { |
| 1171 compiler.unimplemented("SsaBuilder.visitSend with static", node: send); | 1171 push(new HStatic(element)); |
| 1172 compiler.registerGetOfStaticFunction(element); |
| 1172 } else { | 1173 } else { |
| 1173 stack.add(localsHandler.readLocal(element)); | 1174 stack.add(localsHandler.readLocal(element)); |
| 1174 } | 1175 } |
| 1175 } | 1176 } |
| 1176 | 1177 |
| 1177 void generateSetter(SendSet send, Element element, HInstruction value) { | 1178 void generateSetter(SendSet send, Element element, HInstruction value) { |
| 1178 Selector selector = elements.getSelector(send); | 1179 Selector selector = elements.getSelector(send); |
| 1179 if (Elements.isStaticOrTopLevelField(element)) { | 1180 if (Elements.isStaticOrTopLevelField(element)) { |
| 1180 if (element.kind == ElementKind.SETTER) { | 1181 if (element.kind == ElementKind.SETTER) { |
| 1181 HStatic target = new HStatic(element); | 1182 HStatic target = new HStatic(element); |
| (...skipping 770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1952 } | 1953 } |
| 1953 | 1954 |
| 1954 visitCatchBlock(CatchBlock node) { | 1955 visitCatchBlock(CatchBlock node) { |
| 1955 visit(node.block); | 1956 visit(node.block); |
| 1956 } | 1957 } |
| 1957 | 1958 |
| 1958 visitTypedef(Typedef node) { | 1959 visitTypedef(Typedef node) { |
| 1959 compiler.unimplemented('SsaBuilder.visitTypedef', node: node); | 1960 compiler.unimplemented('SsaBuilder.visitTypedef', node: node); |
| 1960 } | 1961 } |
| 1961 } | 1962 } |
| OLD | NEW |