}}}
(context *funcContext, stmt *ast.WhileStmt)
| 978 | } // }}} |
| 979 | |
| 980 | func compileWhileStmt(context *funcContext, stmt *ast.WhileStmt) { // {{{ |
| 981 | thenlabel := context.NewLabel() |
| 982 | elselabel := context.NewLabel() |
| 983 | condlabel := context.NewLabel() |
| 984 | |
| 985 | context.SetLabelPc(condlabel, context.Code.LastPC()) |
| 986 | compileBranchCondition(context, context.RegTop(), stmt.Condition, thenlabel, elselabel, false) |
| 987 | context.SetLabelPc(thenlabel, context.Code.LastPC()) |
| 988 | context.EnterBlock(elselabel, stmt) |
| 989 | compileChunk(context, stmt.Stmts, false) |
| 990 | context.CloseUpvalues() |
| 991 | context.Code.AddASbx(OP_JMP, 0, condlabel, eline(stmt)) |
| 992 | context.LeaveBlock() |
| 993 | context.SetLabelPc(elselabel, context.Code.LastPC()) |
| 994 | } // }}} |
| 995 | |
| 996 | func compileRepeatStmt(context *funcContext, stmt *ast.RepeatStmt) { // {{{ |
| 997 | initlabel := context.NewLabel() |
no test coverage detected
searching dependent graphs…