File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -315,13 +315,24 @@ func do_PRINT_EXPR(vm *Vm, arg int32) {
315315
316316// Terminates a loop due to a break statement.
317317func do_BREAK_LOOP (vm * Vm , arg int32 ) {
318- vm .NotImplemented ("BREAK_LOOP" , arg )
318+ vm .frame .Lasti = vm .frame .Block .Handler
319+ vm .frame .PopBlock ()
319320}
320321
321322// Continues a loop due to a continue statement. target is the address
322323// to jump to (which should be a FOR_ITER instruction).
323324func do_CONTINUE_LOOP (vm * Vm , target int32 ) {
324- vm .NotImplemented ("CONTINUE_LOOP" , target )
325+ switch vm .frame .Block .Type {
326+ case SETUP_LOOP :
327+ case SETUP_WITH :
328+ vm .NotImplemented ("CONTINUE_LOOP WITH" , target )
329+ case SETUP_EXCEPT :
330+ vm .NotImplemented ("CONTINUE_LOOP EXCEPT" , target )
331+ case SETUP_FINALLY :
332+ vm .NotImplemented ("CONTINUE_LOOP FINALLY" , target )
333+ default :
334+ }
335+ vm .frame .Lasti = vm .frame .Block .Handler
325336}
326337
327338// Implements assignment with a starred target: Unpacks an iterable in
You can’t perform that action at this time.
0 commit comments