| OLD | NEW |
| 1 library dart2js.unsugar_cps; | 1 library dart2js.unsugar_cps; |
| 2 | 2 |
| 3 import '../../cps_ir/cps_ir_nodes.dart'; | 3 import '../../cps_ir/cps_ir_nodes.dart'; |
| 4 | 4 |
| 5 // TODO(karlklose): share the [ParentVisitor]. | 5 // TODO(karlklose): share the [ParentVisitor]. |
| 6 import '../../cps_ir/optimizers.dart'; | 6 import '../../cps_ir/optimizers.dart'; |
| 7 import '../../constants/expressions.dart'; | 7 import '../../constants/expressions.dart'; |
| 8 import '../../constants/values.dart'; | 8 import '../../constants/values.dart'; |
| 9 import '../../elements/elements.dart' show | 9 import '../../elements/elements.dart' show |
| 10 ClassElement, | 10 ClassElement, |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 if (_exceptionParameter.hasAtLeastOneUse || | 186 if (_exceptionParameter.hasAtLeastOneUse || |
| 187 stackTraceParameter.hasAtLeastOneUse) { | 187 stackTraceParameter.hasAtLeastOneUse) { |
| 188 Parameter exceptionValue = new Parameter(null); | 188 Parameter exceptionValue = new Parameter(null); |
| 189 exceptionValue.substituteFor(_exceptionParameter); | 189 exceptionValue.substituteFor(_exceptionParameter); |
| 190 insertStaticCall(_glue.getExceptionUnwrapper(), [_exceptionParameter], | 190 insertStaticCall(_glue.getExceptionUnwrapper(), [_exceptionParameter], |
| 191 exceptionValue, body); | 191 exceptionValue, body); |
| 192 | 192 |
| 193 if (stackTraceParameter.hasAtLeastOneUse) { | 193 if (stackTraceParameter.hasAtLeastOneUse) { |
| 194 Parameter stackTraceValue = new Parameter(null); | 194 Parameter stackTraceValue = new Parameter(null); |
| 195 stackTraceValue.substituteFor(stackTraceParameter); | 195 stackTraceValue.substituteFor(stackTraceParameter); |
| 196 insertStaticCall(_glue.getTraceFromException(), [exceptionValue], | 196 insertStaticCall(_glue.getTraceFromException(), [_exceptionParameter], |
| 197 stackTraceValue, body); | 197 stackTraceValue, body); |
| 198 } | 198 } |
| 199 } | 199 } |
| 200 | 200 |
| 201 assert(stackTraceParameter.hasNoUses); | 201 assert(stackTraceParameter.hasNoUses); |
| 202 node.handler.parameters.removeLast(); | 202 node.handler.parameters.removeLast(); |
| 203 } | 203 } |
| 204 | 204 |
| 205 @override | 205 @override |
| 206 visitLetHandler(LetHandler node) { | 206 visitLetHandler(LetHandler node) { |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 new LetPrim(i, | 286 new LetPrim(i, |
| 287 new Branch(new IsTrue(i), | 287 new Branch(new IsTrue(i), |
| 288 node.trueContinuation.definition, | 288 node.trueContinuation.definition, |
| 289 node.falseContinuation.definition))); | 289 node.falseContinuation.definition))); |
| 290 condition.value.unlink(); | 290 condition.value.unlink(); |
| 291 node.trueContinuation.unlink(); | 291 node.trueContinuation.unlink(); |
| 292 node.falseContinuation.unlink(); | 292 node.falseContinuation.unlink(); |
| 293 parent.body = newNode; | 293 parent.body = newNode; |
| 294 } | 294 } |
| 295 } | 295 } |
| OLD | NEW |