| 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 1098 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1109 if (member.kind == ElementKind.FIELD) { | 1109 if (member.kind == ElementKind.FIELD) { |
| 1110 Element capturedLocal = nestedClosureData.capturedFieldMapping[member]; | 1110 Element capturedLocal = nestedClosureData.capturedFieldMapping[member]; |
| 1111 assert(capturedLocal != null); | 1111 assert(capturedLocal != null); |
| 1112 capturedVariables.add(localsHandler.readLocal(capturedLocal)); | 1112 capturedVariables.add(localsHandler.readLocal(capturedLocal)); |
| 1113 } | 1113 } |
| 1114 } | 1114 } |
| 1115 | 1115 |
| 1116 push(new HForeignNew(closureClassElement, capturedVariables)); | 1116 push(new HForeignNew(closureClassElement, capturedVariables)); |
| 1117 } | 1117 } |
| 1118 | 1118 |
| 1119 visitFunctionDeclaration(FunctionDeclaration node) { |
| 1120 visit(node.function); |
| 1121 localsHandler.updateLocal(elements[node], pop()); |
| 1122 } |
| 1123 |
| 1119 visitIdentifier(Identifier node) { | 1124 visitIdentifier(Identifier node) { |
| 1120 if (node.isThis()) { | 1125 if (node.isThis()) { |
| 1121 stack.add(localsHandler.readThis()); | 1126 stack.add(localsHandler.readThis()); |
| 1122 } else { | 1127 } else { |
| 1123 compiler.internalError("SsaBuilder.visitIdentifier on non-this", | 1128 compiler.internalError("SsaBuilder.visitIdentifier on non-this", |
| 1124 node: node); | 1129 node: node); |
| 1125 } | 1130 } |
| 1126 } | 1131 } |
| 1127 | 1132 |
| 1128 visitIf(If node) { | 1133 visitIf(If node) { |
| (...skipping 1149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2278 } | 2283 } |
| 2279 | 2284 |
| 2280 visitCatchBlock(CatchBlock node) { | 2285 visitCatchBlock(CatchBlock node) { |
| 2281 visit(node.block); | 2286 visit(node.block); |
| 2282 } | 2287 } |
| 2283 | 2288 |
| 2284 visitTypedef(Typedef node) { | 2289 visitTypedef(Typedef node) { |
| 2285 compiler.unimplemented('SsaBuilder.visitTypedef', node: node); | 2290 compiler.unimplemented('SsaBuilder.visitTypedef', node: node); |
| 2286 } | 2291 } |
| 2287 } | 2292 } |
| OLD | NEW |