@@ -43,13 +43,12 @@ extern int
4343optimize_to_bool (
4444 _PyUOpInstruction * this_instr ,
4545 JitOptContext * ctx ,
46- int * out_len ,
4746 JitOptSymbol * value ,
4847 JitOptSymbol * * result_ptr ,
4948 bool insert_mode );
5049
5150extern void
52- eliminate_pop_guard (_PyUOpInstruction * this_instr , JitOptContext * ctx , int * out_len , bool exit );
51+ eliminate_pop_guard (_PyUOpInstruction * this_instr , JitOptContext * ctx , bool exit );
5352
5453extern PyCodeObject * get_code (_PyUOpInstruction * op );
5554
@@ -58,7 +57,6 @@ dummy_func(void) {
5857
5958 PyCodeObject * co ;
6059 int oparg ;
61- int out_len ;
6260 JitOptSymbol * flag ;
6361 JitOptSymbol * left ;
6462 JitOptSymbol * right ;
@@ -389,36 +387,36 @@ dummy_func(void) {
389387 }
390388
391389 op (_TO_BOOL , (value -- res )) {
392- int already_bool = optimize_to_bool (this_instr , ctx , & out_len , value , & res , false);
390+ int already_bool = optimize_to_bool (this_instr , ctx , value , & res , false);
393391 if (!already_bool ) {
394392 res = sym_new_truthiness (ctx , value , true);
395393 }
396394 }
397395
398396 op (_TO_BOOL_BOOL , (value -- value )) {
399- int already_bool = optimize_to_bool (this_instr , ctx , & out_len , value , & value , false);
397+ int already_bool = optimize_to_bool (this_instr , ctx , value , & value , false);
400398 if (!already_bool ) {
401399 sym_set_type (value , & PyBool_Type );
402400 }
403401 }
404402
405403 op (_TO_BOOL_INT , (value -- res )) {
406- int already_bool = optimize_to_bool (this_instr , ctx , & out_len , value , & res , false);
404+ int already_bool = optimize_to_bool (this_instr , ctx , value , & res , false);
407405 if (!already_bool ) {
408406 sym_set_type (value , & PyLong_Type );
409407 res = sym_new_truthiness (ctx , value , true);
410408 }
411409 }
412410
413411 op (_TO_BOOL_LIST , (value -- res )) {
414- int already_bool = optimize_to_bool (this_instr , ctx , & out_len , value , & res , false);
412+ int already_bool = optimize_to_bool (this_instr , ctx , value , & res , false);
415413 if (!already_bool ) {
416414 res = sym_new_type (ctx , & PyBool_Type );
417415 }
418416 }
419417
420418 op (_TO_BOOL_NONE , (value -- res )) {
421- int already_bool = optimize_to_bool (this_instr , ctx , & out_len , value , & res , false);
419+ int already_bool = optimize_to_bool (this_instr , ctx , value , & res , false);
422420 if (!already_bool ) {
423421 sym_set_const (value , Py_None );
424422 res = sym_new_const (ctx , Py_False );
@@ -444,7 +442,7 @@ dummy_func(void) {
444442 }
445443
446444 op (_TO_BOOL_STR , (value -- res , v )) {
447- int already_bool = optimize_to_bool (this_instr , ctx , & out_len , value , & res , true);
445+ int already_bool = optimize_to_bool (this_instr , ctx , value , & res , true);
448446 v = value ;
449447 if (!already_bool ) {
450448 res = sym_new_truthiness (ctx , value , true);
@@ -707,7 +705,7 @@ dummy_func(void) {
707705 (void )descr ;
708706 PyTypeObject * type = (PyTypeObject * )sym_get_const (ctx , owner );
709707 PyObject * name = get_co_name (ctx , oparg >> 1 );
710- attr = lookup_attr (ctx , dependencies , this_instr , & out_len , type , name ,
708+ attr = lookup_attr (ctx , dependencies , this_instr , type , name ,
711709 _POP_TOP_LOAD_CONST_INLINE_BORROW ,
712710 _POP_TOP_LOAD_CONST_INLINE );
713711 }
@@ -716,7 +714,7 @@ dummy_func(void) {
716714 (void )descr ;
717715 PyTypeObject * type = sym_get_type (owner );
718716 PyObject * name = get_co_name (ctx , oparg >> 1 );
719- attr = lookup_attr (ctx , dependencies , this_instr , & out_len , type , name ,
717+ attr = lookup_attr (ctx , dependencies , this_instr , type , name ,
720718 _POP_TOP_LOAD_CONST_INLINE_BORROW ,
721719 _POP_TOP_LOAD_CONST_INLINE );
722720 }
@@ -725,7 +723,7 @@ dummy_func(void) {
725723 (void )descr ;
726724 PyTypeObject * type = sym_get_type (owner );
727725 PyObject * name = get_co_name (ctx , oparg >> 1 );
728- attr = lookup_attr (ctx , dependencies , this_instr , & out_len , type , name ,
726+ attr = lookup_attr (ctx , dependencies , this_instr , type , name ,
729727 _POP_TOP_LOAD_CONST_INLINE_BORROW ,
730728 _POP_TOP_LOAD_CONST_INLINE );
731729 }
@@ -734,7 +732,7 @@ dummy_func(void) {
734732 (void )descr ;
735733 PyTypeObject * type = sym_get_type (owner );
736734 PyObject * name = get_co_name (ctx , oparg >> 1 );
737- attr = lookup_attr (ctx , dependencies , this_instr , & out_len , type , name ,
735+ attr = lookup_attr (ctx , dependencies , this_instr , type , name ,
738736 _LOAD_CONST_UNDER_INLINE_BORROW ,
739737 _LOAD_CONST_UNDER_INLINE );
740738 self = owner ;
@@ -744,7 +742,7 @@ dummy_func(void) {
744742 (void )descr ;
745743 PyTypeObject * type = sym_get_type (owner );
746744 PyObject * name = get_co_name (ctx , oparg >> 1 );
747- attr = lookup_attr (ctx , dependencies , this_instr , & out_len , type , name ,
745+ attr = lookup_attr (ctx , dependencies , this_instr , type , name ,
748746 _LOAD_CONST_UNDER_INLINE_BORROW ,
749747 _LOAD_CONST_UNDER_INLINE );
750748 self = owner ;
@@ -754,7 +752,7 @@ dummy_func(void) {
754752 (void )descr ;
755753 PyTypeObject * type = sym_get_type (owner );
756754 PyObject * name = get_co_name (ctx , oparg >> 1 );
757- attr = lookup_attr (ctx , dependencies , this_instr , & out_len , type , name ,
755+ attr = lookup_attr (ctx , dependencies , this_instr , type , name ,
758756 _LOAD_CONST_UNDER_INLINE_BORROW ,
759757 _LOAD_CONST_UNDER_INLINE );
760758 self = owner ;
@@ -775,7 +773,7 @@ dummy_func(void) {
775773 if (sym_is_const (ctx , callable ) && sym_matches_type (callable , & PyFunction_Type )) {
776774 assert (PyFunction_Check (sym_get_const (ctx , callable )));
777775 ADD_OP (_CHECK_FUNCTION_VERSION_INLINE , 0 , func_version );
778- ctx -> out_buffer [out_len - 1 ].operand1 = (uintptr_t )sym_get_const (ctx , callable );
776+ ctx -> out_buffer [ctx -> out_len - 1 ].operand1 = (uintptr_t )sym_get_const (ctx , callable );
779777 }
780778 sym_set_type (callable , & PyFunction_Type );
781779 }
@@ -785,7 +783,7 @@ dummy_func(void) {
785783 PyMethodObject * method = (PyMethodObject * )sym_get_const (ctx , callable );
786784 assert (PyMethod_Check (method ));
787785 ADD_OP (_CHECK_FUNCTION_VERSION_INLINE , 0 , func_version );
788- ctx -> out_buffer [out_len - 1 ].operand1 = (uintptr_t )method -> im_func ;
786+ ctx -> out_buffer [ctx -> out_len - 1 ].operand1 = (uintptr_t )method -> im_func ;
789787 }
790788 sym_set_type (callable , & PyMethod_Type );
791789 }
@@ -1119,7 +1117,7 @@ dummy_func(void) {
11191117 if (sym_is_const (ctx , flag )) {
11201118 PyObject * value = sym_get_const (ctx , flag );
11211119 assert (value != NULL );
1122- eliminate_pop_guard (this_instr , ctx , & out_len , value != Py_True );
1120+ eliminate_pop_guard (this_instr , ctx , value != Py_True );
11231121 }
11241122 sym_set_const (flag , Py_True );
11251123 }
@@ -1164,7 +1162,7 @@ dummy_func(void) {
11641162 if (sym_is_const (ctx , flag )) {
11651163 PyObject * value = sym_get_const (ctx , flag );
11661164 assert (value != NULL );
1167- eliminate_pop_guard (this_instr , ctx , & out_len , value != Py_False );
1165+ eliminate_pop_guard (this_instr , ctx , value != Py_False );
11681166 }
11691167 sym_set_const (flag , Py_False );
11701168 }
@@ -1173,11 +1171,11 @@ dummy_func(void) {
11731171 if (sym_is_const (ctx , val )) {
11741172 PyObject * value = sym_get_const (ctx , val );
11751173 assert (value != NULL );
1176- eliminate_pop_guard (this_instr , ctx , & out_len , !Py_IsNone (value ));
1174+ eliminate_pop_guard (this_instr , ctx , !Py_IsNone (value ));
11771175 }
11781176 else if (sym_has_type (val )) {
11791177 assert (!sym_matches_type (val , & _PyNone_Type ));
1180- eliminate_pop_guard (this_instr , ctx , & out_len , true);
1178+ eliminate_pop_guard (this_instr , ctx , true);
11811179 }
11821180 sym_set_const (val , Py_None );
11831181 }
@@ -1186,11 +1184,11 @@ dummy_func(void) {
11861184 if (sym_is_const (ctx , val )) {
11871185 PyObject * value = sym_get_const (ctx , val );
11881186 assert (value != NULL );
1189- eliminate_pop_guard (this_instr , ctx , & out_len , Py_IsNone (value ));
1187+ eliminate_pop_guard (this_instr , ctx , Py_IsNone (value ));
11901188 }
11911189 else if (sym_has_type (val )) {
11921190 assert (!sym_matches_type (val , & _PyNone_Type ));
1193- eliminate_pop_guard (this_instr , ctx , & out_len , false);
1191+ eliminate_pop_guard (this_instr , ctx , false);
11941192 }
11951193 }
11961194
@@ -1525,7 +1523,7 @@ dummy_func(void) {
15251523 ctx -> frame -> globals_watched = true;
15261524 }
15271525 if (ctx -> frame -> globals_checked_version != version && this_instr [-1 ].opcode == _NOP ) {
1528- REPLACE_OP (& ctx -> out_buffer [out_len - 1 ], _GUARD_GLOBALS_VERSION , 0 , version );
1526+ REPLACE_OP (& ctx -> out_buffer [ctx -> out_len - 1 ], _GUARD_GLOBALS_VERSION , 0 , version );
15291527 ctx -> frame -> globals_checked_version = version ;
15301528 }
15311529 if (ctx -> frame -> globals_checked_version == version ) {
0 commit comments