File tree 1 file changed +13
-2
lines changed
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) {
315
315
316
316
// Terminates a loop due to a break statement.
317
317
func 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 ()
319
320
}
320
321
321
322
// Continues a loop due to a continue statement. target is the address
322
323
// to jump to (which should be a FOR_ITER instruction).
323
324
func 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
325
336
}
326
337
327
338
// Implements assignment with a starred target: Unpacks an iterable in
You can’t perform that action at this time.
0 commit comments