(node)
| 102840 | } |
| 102841 | } |
| 102842 | function transformAndEmitDoStatement(node) { |
| 102843 | if (containsYield(node)) { |
| 102844 | // [source] |
| 102845 | // do { |
| 102846 | // /*body*/ |
| 102847 | // } |
| 102848 | // while (i < 10); |
| 102849 | // |
| 102850 | // [intermediate] |
| 102851 | // .loop conditionLabel, endLabel |
| 102852 | // .mark loopLabel |
| 102853 | // /*body*/ |
| 102854 | // .mark conditionLabel |
| 102855 | // .brtrue loopLabel, (i < 10) |
| 102856 | // .endloop |
| 102857 | // .mark endLabel |
| 102858 | var conditionLabel = defineLabel(); |
| 102859 | var loopLabel = defineLabel(); |
| 102860 | beginLoopBlock(/*continueLabel*/ conditionLabel); |
| 102861 | markLabel(loopLabel); |
| 102862 | transformAndEmitEmbeddedStatement(node.statement); |
| 102863 | markLabel(conditionLabel); |
| 102864 | emitBreakWhenTrue(loopLabel, ts.visitNode(node.expression, visitor, ts.isExpression)); |
| 102865 | endLoopBlock(); |
| 102866 | } |
| 102867 | else { |
| 102868 | emitStatement(ts.visitNode(node, visitor, ts.isStatement)); |
| 102869 | } |
| 102870 | } |
| 102871 | function visitDoStatement(node) { |
| 102872 | if (inStatementContainingYield) { |
| 102873 | beginScriptLoopBlock(); |
no test coverage detected