mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 21:51:50 +00:00 
			
		
		
		
	gh-132732: JIT: Only allow compact ints in pure evaluation (GH-136040)
This commit is contained in:
		
							parent
							
								
									0e5d096130
								
							
						
					
					
						commit
						c419af9e27
					
				
					 1 changed files with 4 additions and 2 deletions
				
			
		|  | @ -206,9 +206,11 @@ _Py_uop_sym_is_safe_const(JitOptContext *ctx, JitOptRef sym) | |||
|     if (const_val == NULL) { | ||||
|         return false; | ||||
|     } | ||||
|     if (_PyLong_CheckExactAndCompact(const_val)) { | ||||
|         return true; | ||||
|     } | ||||
|     PyTypeObject *typ = Py_TYPE(const_val); | ||||
|     return (typ == &PyLong_Type) || | ||||
|            (typ == &PyUnicode_Type) || | ||||
|     return (typ == &PyUnicode_Type) || | ||||
|            (typ == &PyFloat_Type) || | ||||
|            (typ == &PyTuple_Type) || | ||||
|            (typ == &PyBool_Type); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Ken Jin
						Ken Jin