| 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 1224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1235 } | 1235 } |
| 1236 } | 1236 } |
| 1237 | 1237 |
| 1238 void generateGetter(Send send, Element element) { | 1238 void generateGetter(Send send, Element element) { |
| 1239 Selector selector = elements.getSelector(send); | 1239 Selector selector = elements.getSelector(send); |
| 1240 if (Elements.isStaticOrTopLevelField(element)) { | 1240 if (Elements.isStaticOrTopLevelField(element)) { |
| 1241 push(new HStatic(element)); | 1241 push(new HStatic(element)); |
| 1242 if (element.kind == ElementKind.GETTER) { | 1242 if (element.kind == ElementKind.GETTER) { |
| 1243 push(new HInvokeStatic(selector, <HInstruction>[pop()])); | 1243 push(new HInvokeStatic(selector, <HInstruction>[pop()])); |
| 1244 } | 1244 } |
| 1245 } else if (element === null || Elements.isInstanceField(element)) { | 1245 } else if (Elements.isInstanceSend(send, elements)) { |
| 1246 HInstruction receiver; | 1246 HInstruction receiver; |
| 1247 if (send.receiver == null) { | 1247 if (send.receiver == null) { |
| 1248 receiver = localsHandler.readThis(); | 1248 receiver = localsHandler.readThis(); |
| 1249 } else { | 1249 } else { |
| 1250 visit(send.receiver); | 1250 visit(send.receiver); |
| 1251 receiver = pop(); | 1251 receiver = pop(); |
| 1252 } | 1252 } |
| 1253 SourceString getterName = send.selector.asIdentifier().source; | 1253 SourceString getterName = send.selector.asIdentifier().source; |
| 1254 Element staticInterceptor = null; | 1254 Element staticInterceptor = null; |
| 1255 if (methodInterceptionEnabled) { | 1255 if (methodInterceptionEnabled) { |
| (...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2068 } | 2068 } |
| 2069 | 2069 |
| 2070 visitCatchBlock(CatchBlock node) { | 2070 visitCatchBlock(CatchBlock node) { |
| 2071 visit(node.block); | 2071 visit(node.block); |
| 2072 } | 2072 } |
| 2073 | 2073 |
| 2074 visitTypedef(Typedef node) { | 2074 visitTypedef(Typedef node) { |
| 2075 compiler.unimplemented('SsaBuilder.visitTypedef', node: node); | 2075 compiler.unimplemented('SsaBuilder.visitTypedef', node: node); |
| 2076 } | 2076 } |
| 2077 } | 2077 } |
| OLD | NEW |