| 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 2797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2808 VariableDefinitions variableDefinitions = node.declaredIdentifier; | 2808 VariableDefinitions variableDefinitions = node.declaredIdentifier; |
| 2809 variable = elements[variableDefinitions.definitions.nodes.head]; | 2809 variable = elements[variableDefinitions.definitions.nodes.head]; |
| 2810 } | 2810 } |
| 2811 localsHandler.updateLocal(variable, pop()); | 2811 localsHandler.updateLocal(variable, pop()); |
| 2812 | 2812 |
| 2813 visit(node.body); | 2813 visit(node.body); |
| 2814 } | 2814 } |
| 2815 handleLoop(node, buildInitializer, buildCondition, () {}, buildBody); | 2815 handleLoop(node, buildInitializer, buildCondition, () {}, buildBody); |
| 2816 } | 2816 } |
| 2817 | 2817 |
| 2818 visitLabel(Label node) { |
| 2819 compiler.internalError('SsaBuilder.visitLabel', node: node); |
| 2820 } |
| 2821 |
| 2818 visitLabeledStatement(LabeledStatement node) { | 2822 visitLabeledStatement(LabeledStatement node) { |
| 2819 Statement body = node.getBody(); | 2823 Statement body = node.getBody(); |
| 2820 if (body is Loop || body is SwitchStatement) { | 2824 if (body is Loop || body is SwitchStatement) { |
| 2821 // Loops and switches handle their own labels. | 2825 // Loops and switches handle their own labels. |
| 2822 visit(body); | 2826 visit(body); |
| 2823 return; | 2827 return; |
| 2824 } | 2828 } |
| 2825 // Non-loop statements can only be break targets, not continue targets. | 2829 // Non-loop statements can only be break targets, not continue targets. |
| 2826 TargetElement targetElement = elements[body]; | 2830 TargetElement targetElement = elements[body]; |
| 2827 if (targetElement === null || targetElement.statement !== body) { | 2831 if (targetElement === null || targetElement.statement !== body) { |
| (...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3316 <HInstruction>[target, input], | 3320 <HInstruction>[target, input], |
| 3317 HType.STRING)); | 3321 HType.STRING)); |
| 3318 return builder.pop(); | 3322 return builder.pop(); |
| 3319 } | 3323 } |
| 3320 | 3324 |
| 3321 HInstruction result() { | 3325 HInstruction result() { |
| 3322 flushLiterals(); | 3326 flushLiterals(); |
| 3323 return prefix; | 3327 return prefix; |
| 3324 } | 3328 } |
| 3325 } | 3329 } |
| OLD | NEW |