| 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 3105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3116 visitCaseMatch(CaseMatch node) { | 3116 visitCaseMatch(CaseMatch node) { |
| 3117 compiler.internalError('SsaBuilder.visitCaseMatch'); | 3117 compiler.internalError('SsaBuilder.visitCaseMatch'); |
| 3118 } | 3118 } |
| 3119 | 3119 |
| 3120 visitTryStatement(TryStatement node) { | 3120 visitTryStatement(TryStatement node) { |
| 3121 work.allowSpeculativeOptimization = false; | 3121 work.allowSpeculativeOptimization = false; |
| 3122 // Save the current locals. The catch block and the finally block | 3122 // Save the current locals. The catch block and the finally block |
| 3123 // must not reuse the existing locals handler. None of the variables | 3123 // must not reuse the existing locals handler. None of the variables |
| 3124 // that have been defined in the body-block will be used, but for | 3124 // that have been defined in the body-block will be used, but for |
| 3125 // loops we will add (unnecessary) phis that will reference the body | 3125 // loops we will add (unnecessary) phis that will reference the body |
| 3126 // variables. This will make it look as if the variables were used | 3126 // variables. This makes it look as if the variables were used |
| 3127 // in a non-dominated block. | 3127 // in a non-dominated block. |
| 3128 LocalsHandler savedLocals = new LocalsHandler.from(localsHandler); | 3128 LocalsHandler savedLocals = new LocalsHandler.from(localsHandler); |
| 3129 HBasicBlock enterBlock = openNewBlock(); | 3129 HBasicBlock enterBlock = openNewBlock(); |
| 3130 HTry tryInstruction = new HTry(); | 3130 HTry tryInstruction = new HTry(); |
| 3131 List<HBasicBlock> blocks = <HBasicBlock>[]; | 3131 List<HBasicBlock> blocks = <HBasicBlock>[]; |
| 3132 blocks.add(close(tryInstruction)); | 3132 blocks.add(close(tryInstruction)); |
| 3133 | 3133 |
| 3134 HBasicBlock tryBody = graph.addNewBlock(); | 3134 HBasicBlock tryBody = graph.addNewBlock(); |
| 3135 enterBlock.addSuccessor(tryBody); | 3135 enterBlock.addSuccessor(tryBody); |
| 3136 open(tryBody); | 3136 open(tryBody); |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3403 <HInstruction>[target, input], | 3403 <HInstruction>[target, input], |
| 3404 HType.STRING)); | 3404 HType.STRING)); |
| 3405 return builder.pop(); | 3405 return builder.pop(); |
| 3406 } | 3406 } |
| 3407 | 3407 |
| 3408 HInstruction result(Node node) { | 3408 HInstruction result(Node node) { |
| 3409 flushLiterals(node); | 3409 flushLiterals(node); |
| 3410 return prefix; | 3410 return prefix; |
| 3411 } | 3411 } |
| 3412 } | 3412 } |
| OLD | NEW |