| 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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 if (element.isMember()) { | 190 if (element.isMember()) { |
| 191 String className = element.getEnclosingClass().name.slowToString(); | 191 String className = element.getEnclosingClass().name.slowToString(); |
| 192 String memberName = element.name.slowToString(); | 192 String memberName = element.name.slowToString(); |
| 193 name = "$className.$memberName"; | 193 name = "$className.$memberName"; |
| 194 if (element.kind == ElementKind.GENERATIVE_CONSTRUCTOR_BODY) { | 194 if (element.kind == ElementKind.GENERATIVE_CONSTRUCTOR_BODY) { |
| 195 name = "$name (body)"; | 195 name = "$name (body)"; |
| 196 } | 196 } |
| 197 } else { | 197 } else { |
| 198 name = "${element.name.slowToString()}"; | 198 name = "${element.name.slowToString()}"; |
| 199 } | 199 } |
| 200 compiler.tracer.traceCompilation(name); | 200 compiler.tracer.traceCompilation(name, work.compilationContext); |
| 201 compiler.tracer.traceGraph('builder', graph); | 201 compiler.tracer.traceGraph('builder', graph); |
| 202 } | 202 } |
| 203 return graph; | 203 return graph; |
| 204 }); | 204 }); |
| 205 } | 205 } |
| 206 | 206 |
| 207 HGraph compileConstructor(SsaBuilder builder, WorkItem work) { | 207 HGraph compileConstructor(SsaBuilder builder, WorkItem work) { |
| 208 // The body of the constructor will be generated in a separate function. | 208 // The body of the constructor will be generated in a separate function. |
| 209 final ClassElement classElement = work.element.getEnclosingClass(); | 209 final ClassElement classElement = work.element.getEnclosingClass(); |
| 210 return builder.buildFactory(classElement, work.element); | 210 return builder.buildFactory(classElement, work.element); |
| (...skipping 3414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3625 new HSubGraphBlockInformation(elseBranch.graph)); | 3625 new HSubGraphBlockInformation(elseBranch.graph)); |
| 3626 | 3626 |
| 3627 HBasicBlock conditionStartBlock = conditionBranch.block; | 3627 HBasicBlock conditionStartBlock = conditionBranch.block; |
| 3628 conditionStartBlock.setBlockFlow(info, joinBlock); | 3628 conditionStartBlock.setBlockFlow(info, joinBlock); |
| 3629 SubGraph conditionGraph = conditionBranch.graph; | 3629 SubGraph conditionGraph = conditionBranch.graph; |
| 3630 HIf branch = conditionGraph.end.last; | 3630 HIf branch = conditionGraph.end.last; |
| 3631 assert(branch is HIf); | 3631 assert(branch is HIf); |
| 3632 branch.blockInformation = conditionStartBlock.blockFlow; | 3632 branch.blockInformation = conditionStartBlock.blockFlow; |
| 3633 } | 3633 } |
| 3634 } | 3634 } |
| OLD | NEW |