| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 TreeElements elements = work.resolutionTree; | 93 TreeElements elements = work.resolutionTree; |
| 94 HInstruction.idCounter = 0; | 94 HInstruction.idCounter = 0; |
| 95 SsaBuilder builder = new SsaBuilder(compiler, elements); | 95 SsaBuilder builder = new SsaBuilder(compiler, elements); |
| 96 HGraph graph; | 96 HGraph graph; |
| 97 switch (element.kind) { | 97 switch (element.kind) { |
| 98 case ElementKind.GENERATIVE_CONSTRUCTOR: | 98 case ElementKind.GENERATIVE_CONSTRUCTOR: |
| 99 graph = compileConstructor(builder, work); | 99 graph = compileConstructor(builder, work); |
| 100 break; | 100 break; |
| 101 case ElementKind.GENERATIVE_CONSTRUCTOR_BODY: | 101 case ElementKind.GENERATIVE_CONSTRUCTOR_BODY: |
| 102 case ElementKind.FUNCTION: | 102 case ElementKind.FUNCTION: |
| 103 case ElementKind.GETTER: |
| 104 case ElementKind.SETTER: |
| 103 graph = builder.buildMethod(work.element); | 105 graph = builder.buildMethod(work.element); |
| 104 break; | 106 break; |
| 105 } | 107 } |
| 106 assert(graph.isValid()); | 108 assert(graph.isValid()); |
| 107 if (GENERATE_SSA_TRACE) { | 109 if (GENERATE_SSA_TRACE) { |
| 108 String name; | 110 String name; |
| 109 if (element.enclosingElement !== null) { | 111 if (element.enclosingElement !== null) { |
| 110 name = "${element.enclosingElement.name}.${element.name}"; | 112 name = "${element.enclosingElement.name}.${element.name}"; |
| 111 if (element.kind == ElementKind.GENERATIVE_CONSTRUCTOR_BODY) { | 113 if (element.kind == ElementKind.GENERATIVE_CONSTRUCTOR_BODY) { |
| 112 name = "$name (body)"; | 114 name = "$name (body)"; |
| (...skipping 1293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1406 } | 1408 } |
| 1407 | 1409 |
| 1408 visitCatchBlock(CatchBlock node) { | 1410 visitCatchBlock(CatchBlock node) { |
| 1409 compiler.unimplemented('SsaBuilder.visitCatchBlock', node: node); | 1411 compiler.unimplemented('SsaBuilder.visitCatchBlock', node: node); |
| 1410 } | 1412 } |
| 1411 | 1413 |
| 1412 visitTypedef(Typedef node) { | 1414 visitTypedef(Typedef node) { |
| 1413 compiler.unimplemented('SsaBuilder.visitTypedef', node: node); | 1415 compiler.unimplemented('SsaBuilder.visitTypedef', node: node); |
| 1414 } | 1416 } |
| 1415 } | 1417 } |
| OLD | NEW |