@@ -536,21 +536,24 @@ dummy_func(void) {
536536 }
537537
538538 op (_TO_BOOL , (value -- res )) {
539- int already_bool = optimize_to_bool (this_instr , ctx , value , & res , false);
539+ int already_bool = optimize_to_bool (this_instr , ctx , value , & res ,
540+ _POP_TOP , _LOAD_CONST_INLINE_BORROW );
540541 if (!already_bool ) {
541542 res = sym_new_truthiness (ctx , value , true);
542543 }
543544 }
544545
545546 op (_TO_BOOL_BOOL , (value -- value )) {
546- int already_bool = optimize_to_bool (this_instr , ctx , value , & value , false);
547+ int already_bool = optimize_to_bool (this_instr , ctx , value , & value ,
548+ _POP_TOP , _LOAD_CONST_INLINE_BORROW );
547549 if (!already_bool ) {
548550 sym_set_type (value , & PyBool_Type );
549551 }
550552 }
551553
552554 op (_TO_BOOL_INT , (value -- res , v )) {
553- int already_bool = optimize_to_bool (this_instr , ctx , value , & res , true);
555+ int already_bool = optimize_to_bool (this_instr , ctx , value , & res ,
556+ _NOP , _INSERT_1_LOAD_CONST_INLINE_BORROW );
554557 if (!already_bool ) {
555558 sym_set_type (value , & PyLong_Type );
556559 res = sym_new_truthiness (ctx , value , true);
@@ -559,15 +562,17 @@ dummy_func(void) {
559562 }
560563
561564 op (_TO_BOOL_LIST , (value -- res , v )) {
562- int already_bool = optimize_to_bool (this_instr , ctx , value , & res , true);
565+ int already_bool = optimize_to_bool (this_instr , ctx , value , & res ,
566+ _NOP , _INSERT_1_LOAD_CONST_INLINE_BORROW );
563567 if (!already_bool ) {
564568 res = sym_new_type (ctx , & PyBool_Type );
565569 }
566570 v = value ;
567571 }
568572
569573 op (_TO_BOOL_NONE , (value -- res )) {
570- int already_bool = optimize_to_bool (this_instr , ctx , value , & res , false);
574+ int already_bool = optimize_to_bool (this_instr , ctx , value , & res ,
575+ _POP_TOP , _LOAD_CONST_INLINE_BORROW );
571576 if (!already_bool ) {
572577 sym_set_const (value , Py_None );
573578 res = sym_new_const (ctx , Py_False );
@@ -593,7 +598,8 @@ dummy_func(void) {
593598 }
594599
595600 op (_TO_BOOL_STR , (value -- res , v )) {
596- int already_bool = optimize_to_bool (this_instr , ctx , value , & res , true);
601+ int already_bool = optimize_to_bool (this_instr , ctx , value , & res ,
602+ _NOP , _INSERT_1_LOAD_CONST_INLINE_BORROW );
597603 v = value ;
598604 if (!already_bool ) {
599605 res = sym_new_truthiness (ctx , value , true);
@@ -837,7 +843,8 @@ dummy_func(void) {
837843 if (watched_mutations < _Py_MAX_ALLOWED_GLOBALS_MODIFICATIONS ) {
838844 PyDict_Watch (GLOBALS_WATCHER_ID , dict );
839845 _Py_BloomFilter_Add (dependencies , dict );
840- PyObject * res = convert_global_to_const (this_instr , dict , true);
846+ PyObject * res = convert_global_to_const (this_instr , dict ,
847+ _INSERT_1_LOAD_CONST_INLINE_BORROW , _INSERT_1_LOAD_CONST_INLINE );
841848 if (res == NULL ) {
842849 attr = sym_new_not_null (ctx );
843850 }
@@ -890,31 +897,31 @@ dummy_func(void) {
890897 PyTypeObject * type = (PyTypeObject * )sym_get_const (ctx , owner );
891898 PyObject * name = get_co_name (ctx , oparg >> 1 );
892899 attr = lookup_attr (ctx , dependencies , this_instr , type , name ,
893- true );
900+ _POP_TOP , _LOAD_CONST_INLINE_BORROW , _LOAD_CONST_INLINE );
894901 }
895902
896903 op (_LOAD_ATTR_NONDESCRIPTOR_WITH_VALUES , (descr /4 , owner -- attr )) {
897904 (void )descr ;
898905 PyTypeObject * type = sym_get_type (owner );
899906 PyObject * name = get_co_name (ctx , oparg >> 1 );
900907 attr = lookup_attr (ctx , dependencies , this_instr , type , name ,
901- true );
908+ _POP_TOP , _LOAD_CONST_INLINE_BORROW , _LOAD_CONST_INLINE );
902909 }
903910
904911 op (_LOAD_ATTR_NONDESCRIPTOR_NO_DICT , (descr /4 , owner -- attr )) {
905912 (void )descr ;
906913 PyTypeObject * type = sym_get_type (owner );
907914 PyObject * name = get_co_name (ctx , oparg >> 1 );
908915 attr = lookup_attr (ctx , dependencies , this_instr , type , name ,
909- true );
916+ _POP_TOP , _LOAD_CONST_INLINE_BORROW , _LOAD_CONST_INLINE );
910917 }
911918
912919 op (_LOAD_ATTR_METHOD_WITH_VALUES , (descr /4 , owner -- attr , self )) {
913920 (void )descr ;
914921 PyTypeObject * type = sym_get_type (owner );
915922 PyObject * name = get_co_name (ctx , oparg >> 1 );
916923 attr = lookup_attr (ctx , dependencies , this_instr , type , name ,
917- false );
924+ _NOP , _INSERT_1_LOAD_CONST_INLINE_BORROW , _INSERT_1_LOAD_CONST_INLINE );
918925 self = owner ;
919926 }
920927
@@ -923,7 +930,7 @@ dummy_func(void) {
923930 PyTypeObject * type = sym_get_type (owner );
924931 PyObject * name = get_co_name (ctx , oparg >> 1 );
925932 attr = lookup_attr (ctx , dependencies , this_instr , type , name ,
926- false );
933+ _NOP , _INSERT_1_LOAD_CONST_INLINE_BORROW , _INSERT_1_LOAD_CONST_INLINE );
927934 self = owner ;
928935 }
929936
@@ -932,7 +939,7 @@ dummy_func(void) {
932939 PyTypeObject * type = sym_get_type (owner );
933940 PyObject * name = get_co_name (ctx , oparg >> 1 );
934941 attr = lookup_attr (ctx , dependencies , this_instr , type , name ,
935- false );
942+ _NOP , _INSERT_1_LOAD_CONST_INLINE_BORROW , _INSERT_1_LOAD_CONST_INLINE );
936943 self = owner ;
937944 }
938945
@@ -2007,7 +2014,8 @@ dummy_func(void) {
20072014 ctx -> builtins_watched = true;
20082015 }
20092016 if (ctx -> frame -> globals_checked_version != 0 && ctx -> frame -> globals_watched ) {
2010- cnst = convert_global_to_const (this_instr , builtins , false);
2017+ cnst = convert_global_to_const (this_instr , builtins ,
2018+ _LOAD_CONST_INLINE_BORROW , _LOAD_CONST_INLINE );
20112019 }
20122020 }
20132021 if (cnst == NULL ) {
@@ -2046,7 +2054,8 @@ dummy_func(void) {
20462054 ctx -> frame -> globals_checked_version = version ;
20472055 }
20482056 if (ctx -> frame -> globals_checked_version == version ) {
2049- cnst = convert_global_to_const (this_instr , globals , false);
2057+ cnst = convert_global_to_const (this_instr , globals ,
2058+ _LOAD_CONST_INLINE_BORROW , _LOAD_CONST_INLINE );
20502059 }
20512060 }
20522061 }
0 commit comments