@@ -268,6 +268,7 @@ impl Frame {
268268 }
269269 }
270270
271+ #[ cfg_attr( feature = "flame-it" , flame( "Frame" ) ) ]
271272 pub fn run ( & self , vm : & VirtualMachine ) -> Result < ExecutionResult , PyObjectRef > {
272273 let filename = & self . code . source_path . to_string ( ) ;
273274
@@ -334,6 +335,7 @@ impl Frame {
334335
335336 /// Execute a single instruction.
336337 #[ allow( clippy:: cognitive_complexity) ]
338+ #[ cfg_attr( feature = "flame-it" , flame( "Frame" ) ) ]
337339 fn execute_instruction ( & self , vm : & VirtualMachine ) -> FrameResult {
338340 let instruction = self . fetch_instruction ( ) ;
339341
@@ -891,6 +893,7 @@ impl Frame {
891893 }
892894 }
893895
896+ #[ cfg_attr( feature = "flame-it" , flame( "Frame" ) ) ]
894897 fn get_elements (
895898 & self ,
896899 vm : & VirtualMachine ,
@@ -912,6 +915,7 @@ impl Frame {
912915 }
913916 }
914917
918+ #[ cfg_attr( feature = "flame-it" , flame( "Frame" ) ) ]
915919 fn import (
916920 & self ,
917921 vm : & VirtualMachine ,
@@ -938,6 +942,7 @@ impl Frame {
938942 Ok ( None )
939943 }
940944
945+ #[ cfg_attr( feature = "flame-it" , flame( "Frame" ) ) ]
941946 fn import_star ( & self , vm : & VirtualMachine , module : & str , level : usize ) -> FrameResult {
942947 let module = vm. import ( module, & vm. ctx . new_tuple ( vec ! [ ] ) , level) ?;
943948
@@ -951,6 +956,7 @@ impl Frame {
951956 }
952957
953958 // Unwind all blocks:
959+ #[ cfg_attr( feature = "flame-it" , flame( "Frame" ) ) ]
954960 fn unwind_blocks ( & self , vm : & VirtualMachine ) -> Option < PyObjectRef > {
955961 while let Some ( block) = self . pop_block ( ) {
956962 match block. typ {
@@ -978,6 +984,7 @@ impl Frame {
978984 None
979985 }
980986
987+ #[ cfg_attr( feature = "flame-it" , flame( "Frame" ) ) ]
981988 fn unwind_loop ( & self , vm : & VirtualMachine ) -> Block {
982989 loop {
983990 let block = self . current_block ( ) . expect ( "not in a loop" ) ;
@@ -1003,6 +1010,7 @@ impl Frame {
10031010 }
10041011 }
10051012
1013+ #[ cfg_attr( feature = "flame-it" , flame( "Frame" ) ) ]
10061014 fn unwind_exception ( & self , vm : & VirtualMachine , exc : PyObjectRef ) -> Option < PyObjectRef > {
10071015 // unwind block stack on exception and find any handlers:
10081016 while let Some ( block) = self . pop_block ( ) {
@@ -1105,6 +1113,7 @@ impl Frame {
11051113 }
11061114 }
11071115
1116+ #[ cfg_attr( feature = "flame-it" , flame( "Frame" ) ) ]
11081117 fn load_name (
11091118 & self ,
11101119 vm : & VirtualMachine ,
@@ -1150,6 +1159,7 @@ impl Frame {
11501159 * self . lasti . borrow_mut ( ) = target_pc;
11511160 }
11521161
1162+ #[ cfg_attr( feature = "flame-it" , flame( "Frame" ) ) ]
11531163 fn execute_binop (
11541164 & self ,
11551165 vm : & VirtualMachine ,
@@ -1194,6 +1204,7 @@ impl Frame {
11941204 Ok ( None )
11951205 }
11961206
1207+ #[ cfg_attr( feature = "flame-it" , flame( "Frame" ) ) ]
11971208 fn execute_unop ( & self , vm : & VirtualMachine , op : & bytecode:: UnaryOperator ) -> FrameResult {
11981209 let a = self . pop_value ( ) ;
11991210 let value = match * op {
@@ -1234,6 +1245,7 @@ impl Frame {
12341245 Ok ( result)
12351246 }
12361247
1248+ #[ cfg_attr( feature = "flame-it" , flame( "Frame" ) ) ]
12371249 fn execute_compare (
12381250 & self ,
12391251 vm : & VirtualMachine ,
@@ -1326,6 +1338,7 @@ impl Frame {
13261338 stack[ stack. len ( ) - depth - 1 ] . clone ( )
13271339 }
13281340
1341+ #[ cfg_attr( feature = "flame-it" , flame( "Frame" ) ) ]
13291342 fn get_exception ( & self , vm : & VirtualMachine , none_allowed : bool ) -> PyResult {
13301343 let exception = self . pop_value ( ) ;
13311344 if none_allowed && vm. get_none ( ) . is ( & exception)
0 commit comments