| 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 1037 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1048 visitStaticSend(node); | 1048 visitStaticSend(node); |
| 1049 } else { | 1049 } else { |
| 1050 compiler.internalError("Cannot generate code for send", node: node); | 1050 compiler.internalError("Cannot generate code for send", node: node); |
| 1051 } | 1051 } |
| 1052 } | 1052 } |
| 1053 } | 1053 } |
| 1054 | 1054 |
| 1055 visitNewExpression(NewExpression node) => visitSend(node.send); | 1055 visitNewExpression(NewExpression node) => visitSend(node.send); |
| 1056 | 1056 |
| 1057 HInstruction updateDefinition(Node node, HInstruction value) { | 1057 HInstruction updateDefinition(Node node, HInstruction value) { |
| 1058 VariableElement element = elements[node]; | 1058 Element element = elements[node]; |
| 1059 if (element is !VariableElement) { |
| 1060 compiler.internalError("expected a variable", node: node); |
| 1061 } |
| 1059 definitions[element] = value; | 1062 definitions[element] = value; |
| 1060 return value; | 1063 return value; |
| 1061 } | 1064 } |
| 1062 | 1065 |
| 1063 visitSendSet(SendSet node) { | 1066 visitSendSet(SendSet node) { |
| 1064 Operator op = node.assignmentOperator; | 1067 Operator op = node.assignmentOperator; |
| 1065 if (node.isIndex) { | 1068 if (node.isIndex) { |
| 1066 HStatic target = new HStatic(interceptors.getIndexAssignmentInterceptor())
; | 1069 HStatic target = new HStatic(interceptors.getIndexAssignmentInterceptor())
; |
| 1067 add(target); | 1070 add(target); |
| 1068 visit(node.receiver); | 1071 visit(node.receiver); |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1414 } | 1417 } |
| 1415 | 1418 |
| 1416 visitCatchBlock(CatchBlock node) { | 1419 visitCatchBlock(CatchBlock node) { |
| 1417 compiler.unimplemented('SsaBuilder.visitCatchBlock', node: node); | 1420 compiler.unimplemented('SsaBuilder.visitCatchBlock', node: node); |
| 1418 } | 1421 } |
| 1419 | 1422 |
| 1420 visitTypedef(Typedef node) { | 1423 visitTypedef(Typedef node) { |
| 1421 compiler.unimplemented('SsaBuilder.visitTypedef', node: node); | 1424 compiler.unimplemented('SsaBuilder.visitTypedef', node: node); |
| 1422 } | 1425 } |
| 1423 } | 1426 } |
| OLD | NEW |