@@ -2972,36 +2972,39 @@ dummy_func(
2972
2972
CHECK_EVAL_BREAKER ();
2973
2973
}
2974
2974
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 * )
2979
2982
PyFunction_New (codeobj , GLOBALS ());
2980
2983
2981
2984
Py_DECREF (codeobj );
2982
- if (func == NULL ) {
2985
+ if (func_obj == NULL ) {
2983
2986
goto error ;
2984
2987
}
2985
2988
2986
2989
if (oparg & 0x08 ) {
2987
- assert (PyTuple_CheckExact (TOP () ));
2988
- func -> func_closure = POP () ;
2990
+ assert (PyTuple_CheckExact (closure ));
2991
+ func_obj -> func_closure = closure ;
2989
2992
}
2990
2993
if (oparg & 0x04 ) {
2991
- assert (PyTuple_CheckExact (TOP () ));
2992
- func -> func_annotations = POP () ;
2994
+ assert (PyTuple_CheckExact (annotations ));
2995
+ func_obj -> func_annotations = annotations ;
2993
2996
}
2994
2997
if (oparg & 0x02 ) {
2995
- assert (PyDict_CheckExact (TOP () ));
2996
- func -> func_kwdefaults = POP () ;
2998
+ assert (PyDict_CheckExact (kwdefaults ));
2999
+ func_obj -> func_kwdefaults = kwdefaults ;
2997
3000
}
2998
3001
if (oparg & 0x01 ) {
2999
- assert (PyTuple_CheckExact (TOP () ));
3000
- func -> func_defaults = POP () ;
3002
+ assert (PyTuple_CheckExact (defaults ));
3003
+ func_obj -> func_defaults = defaults ;
3001
3004
}
3002
3005
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 ;
3005
3008
}
3006
3009
3007
3010
inst (RETURN_GENERATOR , (-- )) {
0 commit comments