@@ -2972,36 +2972,39 @@ dummy_func(
29722972 CHECK_EVAL_BREAKER ();
29732973 }
29742974
2975- // error: MAKE_FUNCTION has irregular stack effect
2976- inst (MAKE_FUNCTION ) {
2977- PyObject * codeobj = POP ();
2978- PyFunctionObject * func = (PyFunctionObject * )
2975+ inst (MAKE_FUNCTION , (defaults if (oparg & 0x01 ),
2976+ kwdefaults if (oparg & 0x02 ),
2977+ annotations if (oparg & 0x04 ),
2978+ closure if (oparg & 0x08 ),
2979+ codeobj -- func )) {
2980+
2981+ PyFunctionObject * func_obj = (PyFunctionObject * )
29792982 PyFunction_New (codeobj , GLOBALS ());
29802983
29812984 Py_DECREF (codeobj );
2982- if (func == NULL ) {
2985+ if (func_obj == NULL ) {
29832986 goto error ;
29842987 }
29852988
29862989 if (oparg & 0x08 ) {
2987- assert (PyTuple_CheckExact (TOP () ));
2988- func -> func_closure = POP () ;
2990+ assert (PyTuple_CheckExact (closure ));
2991+ func_obj -> func_closure = closure ;
29892992 }
29902993 if (oparg & 0x04 ) {
2991- assert (PyTuple_CheckExact (TOP () ));
2992- func -> func_annotations = POP () ;
2994+ assert (PyTuple_CheckExact (annotations ));
2995+ func_obj -> func_annotations = annotations ;
29932996 }
29942997 if (oparg & 0x02 ) {
2995- assert (PyDict_CheckExact (TOP () ));
2996- func -> func_kwdefaults = POP () ;
2998+ assert (PyDict_CheckExact (kwdefaults ));
2999+ func_obj -> func_kwdefaults = kwdefaults ;
29973000 }
29983001 if (oparg & 0x01 ) {
2999- assert (PyTuple_CheckExact (TOP () ));
3000- func -> func_defaults = POP () ;
3002+ assert (PyTuple_CheckExact (defaults ));
3003+ func_obj -> func_defaults = defaults ;
30013004 }
30023005
3003- func -> func_version = ((PyCodeObject * )codeobj )-> co_version ;
3004- PUSH (( PyObject * )func ) ;
3006+ func_obj -> func_version = ((PyCodeObject * )codeobj )-> co_version ;
3007+ func = ( PyObject * )func_obj ;
30053008 }
30063009
30073010 inst (RETURN_GENERATOR , (-- )) {
@@ -3027,22 +3030,12 @@ dummy_func(
30273030 goto resume_frame ;
30283031 }
30293032
3030- // error: BUILD_SLICE has irregular stack effect
3031- inst (BUILD_SLICE ) {
3032- PyObject * start , * stop , * step , * slice ;
3033- if (oparg == 3 )
3034- step = POP ();
3035- else
3036- step = NULL ;
3037- stop = POP ();
3038- start = TOP ();
3033+ inst (BUILD_SLICE , (start , stop , step if (oparg == 3 ) -- slice )) {
30393034 slice = PySlice_New (start , stop , step );
30403035 Py_DECREF (start );
30413036 Py_DECREF (stop );
30423037 Py_XDECREF (step );
3043- SET_TOP (slice );
3044- if (slice == NULL )
3045- goto error ;
3038+ ERROR_IF (slice == NULL , error );
30463039 }
30473040
30483041 // error: FORMAT_VALUE has irregular stack effect
0 commit comments