| 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 graph = compileConstructor(builder, work); | 159 graph = compileConstructor(builder, work); |
| 160 break; | 160 break; |
| 161 case ElementKind.GENERATIVE_CONSTRUCTOR_BODY: | 161 case ElementKind.GENERATIVE_CONSTRUCTOR_BODY: |
| 162 case ElementKind.FUNCTION: | 162 case ElementKind.FUNCTION: |
| 163 case ElementKind.GETTER: | 163 case ElementKind.GETTER: |
| 164 case ElementKind.SETTER: | 164 case ElementKind.SETTER: |
| 165 graph = builder.buildMethod(work.element); | 165 graph = builder.buildMethod(work.element); |
| 166 break; | 166 break; |
| 167 } | 167 } |
| 168 assert(graph.isValid()); | 168 assert(graph.isValid()); |
| 169 graph.calledInLoop = element.calledInLoop; |
| 169 if (compiler.tracer.enabled) { | 170 if (compiler.tracer.enabled) { |
| 170 String name; | 171 String name; |
| 171 if (element.enclosingElement !== null && | 172 if (element.enclosingElement !== null && |
| 172 element.enclosingElement.kind == ElementKind.CLASS) { | 173 element.enclosingElement.kind == ElementKind.CLASS) { |
| 173 String className = element.enclosingElement.name.slowToString(); | 174 String className = element.enclosingElement.name.slowToString(); |
| 174 String memberName = element.name.slowToString(); | 175 String memberName = element.name.slowToString(); |
| 175 name = "$className.$memberName"; | 176 name = "$className.$memberName"; |
| 176 if (element.kind == ElementKind.GENERATIVE_CONSTRUCTOR_BODY) { | 177 if (element.kind == ElementKind.GENERATIVE_CONSTRUCTOR_BODY) { |
| 177 name = "$name (body)"; | 178 name = "$name (body)"; |
| 178 } | 179 } |
| (...skipping 3263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3442 void visitNodeList(NodeList node) { | 3443 void visitNodeList(NodeList node) { |
| 3443 node.visitChildren(this); | 3444 node.visitChildren(this); |
| 3444 } | 3445 } |
| 3445 | 3446 |
| 3446 HInstruction concat(HInstruction left, HInstruction right) { | 3447 HInstruction concat(HInstruction left, HInstruction right) { |
| 3447 HInstruction instruction = new HStringConcat(left, right, node); | 3448 HInstruction instruction = new HStringConcat(left, right, node); |
| 3448 builder.add(instruction); | 3449 builder.add(instruction); |
| 3449 return instruction; | 3450 return instruction; |
| 3450 } | 3451 } |
| 3451 } | 3452 } |
| OLD | NEW |