| 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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 element.enclosingElement.kind == ElementKind.CLASS) { | 177 element.enclosingElement.kind == ElementKind.CLASS) { |
| 178 String className = element.enclosingElement.name.slowToString(); | 178 String className = element.enclosingElement.name.slowToString(); |
| 179 String memberName = element.name.slowToString(); | 179 String memberName = element.name.slowToString(); |
| 180 name = "$className.$memberName"; | 180 name = "$className.$memberName"; |
| 181 if (element.kind == ElementKind.GENERATIVE_CONSTRUCTOR_BODY) { | 181 if (element.kind == ElementKind.GENERATIVE_CONSTRUCTOR_BODY) { |
| 182 name = "$name (body)"; | 182 name = "$name (body)"; |
| 183 } | 183 } |
| 184 } else { | 184 } else { |
| 185 name = "${element.name.slowToString()}"; | 185 name = "${element.name.slowToString()}"; |
| 186 } | 186 } |
| 187 compiler.tracer.traceCompilation(name); | 187 compiler.tracer.traceCompilation(name, work.compilationContext); |
| 188 compiler.tracer.traceGraph('builder', graph); | 188 compiler.tracer.traceGraph('builder', graph); |
| 189 } | 189 } |
| 190 return graph; | 190 return graph; |
| 191 }); | 191 }); |
| 192 } | 192 } |
| 193 | 193 |
| 194 HGraph compileConstructor(SsaBuilder builder, WorkItem work) { | 194 HGraph compileConstructor(SsaBuilder builder, WorkItem work) { |
| 195 // The body of the constructor will be generated in a separate function. | 195 // The body of the constructor will be generated in a separate function. |
| 196 final ClassElement classElement = work.element.enclosingElement; | 196 final ClassElement classElement = work.element.enclosingElement; |
| 197 return builder.buildFactory(classElement, work.element); | 197 return builder.buildFactory(classElement, work.element); |
| (...skipping 3401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3599 new HSubGraphBlockInformation(elseBranch.graph)); | 3599 new HSubGraphBlockInformation(elseBranch.graph)); |
| 3600 | 3600 |
| 3601 HBasicBlock conditionStartBlock = conditionBranch.block; | 3601 HBasicBlock conditionStartBlock = conditionBranch.block; |
| 3602 conditionStartBlock.setBlockFlow(info, joinBlock); | 3602 conditionStartBlock.setBlockFlow(info, joinBlock); |
| 3603 SubGraph conditionGraph = conditionBranch.graph; | 3603 SubGraph conditionGraph = conditionBranch.graph; |
| 3604 HIf branch = conditionGraph.end.last; | 3604 HIf branch = conditionGraph.end.last; |
| 3605 assert(branch is HIf); | 3605 assert(branch is HIf); |
| 3606 branch.blockInformation = conditionStartBlock.blockFlow; | 3606 branch.blockInformation = conditionStartBlock.blockFlow; |
| 3607 } | 3607 } |
| 3608 } | 3608 } |
| OLD | NEW |