@@ -1351,8 +1351,6 @@ impl ExecutingFrame<'_> {
13511351 bytecode:: Instruction :: PopJumpIfTrue { target } => {
13521352 self . pop_jump_if ( vm, target. get ( arg) , true )
13531353 }
1354- bytecode:: Instruction :: PrintExpr => self . print_expr ( vm) ,
1355-
13561354 bytecode:: Instruction :: Raise { kind } => self . execute_raise ( vm, kind. get ( arg) ) ,
13571355 bytecode:: Instruction :: Resume { arg : resume_arg } => {
13581356 // Resume execution after yield, await, or at function start
@@ -2208,18 +2206,6 @@ impl ExecutingFrame<'_> {
22082206 Ok ( None )
22092207 }
22102208
2211- fn print_expr ( & mut self , vm : & VirtualMachine ) -> FrameResult {
2212- let expr = self . pop_value ( ) ;
2213-
2214- let displayhook = vm
2215- . sys_module
2216- . get_attr ( "displayhook" , vm)
2217- . map_err ( |_| vm. new_runtime_error ( "lost sys.displayhook" ) ) ?;
2218- displayhook. call ( ( expr, ) , vm) ?;
2219-
2220- Ok ( None )
2221- }
2222-
22232209 fn unpack_sequence ( & mut self , size : u32 , vm : & VirtualMachine ) -> FrameResult {
22242210 let value = self . pop_value ( ) ;
22252211 let elements: Vec < _ > = value. try_to_value ( vm) . map_err ( |e| {
@@ -2390,6 +2376,13 @@ impl ExecutingFrame<'_> {
23902376 vm : & VirtualMachine ,
23912377 ) -> PyResult {
23922378 match func {
2379+ bytecode:: IntrinsicFunction1 :: Print => {
2380+ let displayhook = vm
2381+ . sys_module
2382+ . get_attr ( "displayhook" , vm)
2383+ . map_err ( |_| vm. new_runtime_error ( "lost sys.displayhook" ) ) ?;
2384+ displayhook. call ( ( arg, ) , vm)
2385+ }
23932386 bytecode:: IntrinsicFunction1 :: ImportStar => {
23942387 // arg is the module object
23952388 self . push_value ( arg) ; // Push module back on stack for import_star
0 commit comments