@@ -377,7 +377,7 @@ enum CollectionType {
377377impl Compiler {
378378 fn new ( opts : CompileOpts , source_file : SourceFile , code_name : String ) -> Self {
379379 let module_code = ir:: CodeInfo {
380- flags : bytecode:: CodeFlags :: NEW_LOCALS ,
380+ flags : bytecode:: CodeFlags :: NEWLOCALS ,
381381 source_path : source_file. name ( ) . to_owned ( ) ,
382382 private : None ,
383383 blocks : vec ! [ ir:: Block :: default ( ) ] ,
@@ -749,19 +749,19 @@ impl Compiler {
749749 CompilerScope :: Module => ( bytecode:: CodeFlags :: empty ( ) , 0 , 0 , 0 ) ,
750750 CompilerScope :: Class => ( bytecode:: CodeFlags :: empty ( ) , 0 , 0 , 0 ) ,
751751 CompilerScope :: Function | CompilerScope :: AsyncFunction | CompilerScope :: Lambda => (
752- bytecode:: CodeFlags :: NEW_LOCALS | bytecode:: CodeFlags :: IS_OPTIMIZED ,
752+ bytecode:: CodeFlags :: NEWLOCALS | bytecode:: CodeFlags :: OPTIMIZED ,
753753 0 , // Will be set later in enter_function
754754 0 , // Will be set later in enter_function
755755 0 , // Will be set later in enter_function
756756 ) ,
757757 CompilerScope :: Comprehension => (
758- bytecode:: CodeFlags :: NEW_LOCALS | bytecode:: CodeFlags :: IS_OPTIMIZED ,
758+ bytecode:: CodeFlags :: NEWLOCALS | bytecode:: CodeFlags :: OPTIMIZED ,
759759 0 ,
760760 1 , // comprehensions take one argument (.0)
761761 0 ,
762762 ) ,
763763 CompilerScope :: TypeParams => (
764- bytecode:: CodeFlags :: NEW_LOCALS | bytecode:: CodeFlags :: IS_OPTIMIZED ,
764+ bytecode:: CodeFlags :: NEWLOCALS | bytecode:: CodeFlags :: OPTIMIZED ,
765765 0 ,
766766 0 ,
767767 0 ,
@@ -1298,7 +1298,7 @@ impl Compiler {
12981298 let parent_obj_name = & parent. metadata . name ;
12991299
13001300 // Determine if parent is a function-like scope
1301- let is_function_parent = parent. flags . contains ( bytecode:: CodeFlags :: IS_OPTIMIZED )
1301+ let is_function_parent = parent. flags . contains ( bytecode:: CodeFlags :: OPTIMIZED )
13021302 && !parent_obj_name. starts_with ( "<" ) // Not a special scope like <lambda>, <listcomp>, etc.
13031303 && parent_obj_name != "<module>" ; // Not the module scope
13041304
@@ -1914,7 +1914,7 @@ impl Compiler {
19141914 && self
19151915 . current_code_info ( )
19161916 . flags
1917- . contains ( bytecode:: CodeFlags :: IS_GENERATOR )
1917+ . contains ( bytecode:: CodeFlags :: GENERATOR )
19181918 {
19191919 return Err ( self . error_ranged (
19201920 CodegenErrorType :: AsyncReturnValue ,
@@ -2062,7 +2062,7 @@ impl Compiler {
20622062 }
20632063
20642064 self . push_output (
2065- bytecode:: CodeFlags :: NEW_LOCALS | bytecode:: CodeFlags :: IS_OPTIMIZED ,
2065+ bytecode:: CodeFlags :: NEWLOCALS | bytecode:: CodeFlags :: OPTIMIZED ,
20662066 parameters. posonlyargs . len ( ) . to_u32 ( ) ,
20672067 ( parameters. posonlyargs . len ( ) + parameters. args . len ( ) ) . to_u32 ( ) ,
20682068 parameters. kwonlyargs . len ( ) . to_u32 ( ) ,
@@ -2080,11 +2080,11 @@ impl Compiler {
20802080 }
20812081
20822082 if let Some ( name) = parameters. vararg . as_deref ( ) {
2083- self . current_code_info ( ) . flags |= bytecode:: CodeFlags :: HAS_VARARGS ;
2083+ self . current_code_info ( ) . flags |= bytecode:: CodeFlags :: VARARGS ;
20842084 self . varname ( name. name . as_str ( ) ) ?;
20852085 }
20862086 if let Some ( name) = parameters. kwarg . as_deref ( ) {
2087- self . current_code_info ( ) . flags |= bytecode:: CodeFlags :: HAS_VARKEYWORDS ;
2087+ self . current_code_info ( ) . flags |= bytecode:: CodeFlags :: VARKEYWORDS ;
20882088 self . varname ( name. name . as_str ( ) ) ?;
20892089 }
20902090
@@ -3103,7 +3103,7 @@ impl Compiler {
31033103 self . enter_function ( name, parameters) ?;
31043104 self . current_code_info ( )
31053105 . flags
3106- . set ( bytecode:: CodeFlags :: IS_COROUTINE , is_async) ;
3106+ . set ( bytecode:: CodeFlags :: COROUTINE , is_async) ;
31073107
31083108 // Set up context
31093109 let prev_ctx = self . ctx ;
@@ -3233,7 +3233,7 @@ impl Compiler {
32333233 // Enter type params scope
32343234 let type_params_name = format ! ( "<generic parameters of {name}>" ) ;
32353235 self . push_output (
3236- bytecode:: CodeFlags :: IS_OPTIMIZED | bytecode:: CodeFlags :: NEW_LOCALS ,
3236+ bytecode:: CodeFlags :: OPTIMIZED | bytecode:: CodeFlags :: NEWLOCALS ,
32373237 0 ,
32383238 num_typeparam_args as u32 ,
32393239 0 ,
@@ -3664,7 +3664,7 @@ impl Compiler {
36643664 if is_generic {
36653665 let type_params_name = format ! ( "<generic parameters of {name}>" ) ;
36663666 self . push_output (
3667- bytecode:: CodeFlags :: IS_OPTIMIZED | bytecode:: CodeFlags :: NEW_LOCALS ,
3667+ bytecode:: CodeFlags :: OPTIMIZED | bytecode:: CodeFlags :: NEWLOCALS ,
36683668 0 ,
36693669 0 ,
36703670 0 ,
@@ -6361,9 +6361,9 @@ impl Compiler {
63616361 in_async_scope : prev_ctx. in_async_scope || is_async,
63626362 } ;
63636363
6364- let flags = bytecode:: CodeFlags :: NEW_LOCALS | bytecode:: CodeFlags :: IS_OPTIMIZED ;
6364+ let flags = bytecode:: CodeFlags :: NEWLOCALS | bytecode:: CodeFlags :: OPTIMIZED ;
63656365 let flags = if is_async {
6366- flags | bytecode:: CodeFlags :: IS_COROUTINE
6366+ flags | bytecode:: CodeFlags :: COROUTINE
63676367 } else {
63686368 flags
63696369 } ;
@@ -7030,7 +7030,7 @@ impl Compiler {
70307030 }
70317031
70327032 fn mark_generator ( & mut self ) {
7033- self . current_code_info ( ) . flags |= bytecode:: CodeFlags :: IS_GENERATOR
7033+ self . current_code_info ( ) . flags |= bytecode:: CodeFlags :: GENERATOR
70347034 }
70357035
70367036 /// Whether the expression contains an await expression and
0 commit comments