mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 05:31:20 +00:00 
			
		
		
		
	WITH_CLEANUP_START uses fastcall
Modify WITH_CLEANUP_START bytecode: replace PyObject_CallFunctionObjArgs() with _PyObject_FastCall().
This commit is contained in:
		
							parent
							
								
									27580c1fb5
								
							
						
					
					
						commit
						842cfff321
					
				
					 1 changed files with 10 additions and 3 deletions
				
			
		|  | @ -3135,8 +3135,12 @@ _PyEval_EvalFrameDefault(PyFrameObject *f, int throwflag) | ||||||
|                gotos should still be resumed.) |                gotos should still be resumed.) | ||||||
|             */ |             */ | ||||||
| 
 | 
 | ||||||
|  |             PyObject* stack[3]; | ||||||
|             PyObject *exit_func; |             PyObject *exit_func; | ||||||
|             PyObject *exc = TOP(), *val = Py_None, *tb = Py_None, *res; |             PyObject *exc, *val, *tb, *res; | ||||||
|  | 
 | ||||||
|  |             val = tb = Py_None; | ||||||
|  |             exc = TOP(); | ||||||
|             if (exc == Py_None) { |             if (exc == Py_None) { | ||||||
|                 (void)POP(); |                 (void)POP(); | ||||||
|                 exit_func = TOP(); |                 exit_func = TOP(); | ||||||
|  | @ -3180,8 +3184,11 @@ _PyEval_EvalFrameDefault(PyFrameObject *f, int throwflag) | ||||||
|                 assert(block->b_type == EXCEPT_HANDLER); |                 assert(block->b_type == EXCEPT_HANDLER); | ||||||
|                 block->b_level--; |                 block->b_level--; | ||||||
|             } |             } | ||||||
|             /* XXX Not the fastest way to call it... */ | 
 | ||||||
|             res = PyObject_CallFunctionObjArgs(exit_func, exc, val, tb, NULL); |             stack[0] = exc; | ||||||
|  |             stack[1] = val; | ||||||
|  |             stack[2] = tb; | ||||||
|  |             res = _PyObject_FastCall(exit_func, stack, 3); | ||||||
|             Py_DECREF(exit_func); |             Py_DECREF(exit_func); | ||||||
|             if (res == NULL) |             if (res == NULL) | ||||||
|                 goto error; |                 goto error; | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Victor Stinner
						Victor Stinner