mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 21:51:50 +00:00 
			
		
		
		
	Add a macro for "inlining" new frames (GH-99490)
This commit is contained in:
		
							parent
							
								
									a0d940d6ac
								
							
						
					
					
						commit
						6f8b0e781c
					
				
					 3 changed files with 28 additions and 86 deletions
				
			
		|  | @ -712,6 +712,16 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag) | |||
|         DISPATCH_GOTO(); \ | ||||
|     } | ||||
| 
 | ||||
| #define DISPATCH_INLINED(NEW_FRAME)                     \ | ||||
|     do {                                                \ | ||||
|         _PyFrame_SetStackPointer(frame, stack_pointer); \ | ||||
|         frame->prev_instr = next_instr - 1;             \ | ||||
|         (NEW_FRAME)->previous = frame;                  \ | ||||
|         frame = cframe.current_frame = (NEW_FRAME);     \ | ||||
|         CALL_STAT_INC(inlined_py_calls);                \ | ||||
|         goto start_frame;                               \ | ||||
|     } while (0) | ||||
| 
 | ||||
| #define CHECK_EVAL_BREAKER() \ | ||||
|     _Py_CHECK_EMSCRIPTEN_SIGNALS_PERIODICALLY(); \ | ||||
|     if (_Py_atomic_load_relaxed_int32(eval_breaker)) { \ | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Brandt Bucher
						Brandt Bucher