mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 05:31:20 +00:00 
			
		
		
		
	gh-131798: Optimize _UNARY_INVERT (GH-135222)
				
					
				
			This commit is contained in:
		
							parent
							
								
									c19e36cc4e
								
							
						
					
					
						commit
						b150b6aca7
					
				
					 4 changed files with 33 additions and 1 deletions
				
			
		
							
								
								
									
										9
									
								
								Python/optimizer_cases.c.h
									
										
									
										generated
									
									
									
								
							
							
						
						
									
										9
									
								
								Python/optimizer_cases.c.h
									
										
									
										generated
									
									
									
								
							|  | @ -285,8 +285,15 @@ | |||
|         } | ||||
| 
 | ||||
|         case _UNARY_INVERT: { | ||||
|             JitOptSymbol *value; | ||||
|             JitOptSymbol *res; | ||||
|             res = sym_new_not_null(ctx); | ||||
|             value = stack_pointer[-1]; | ||||
|             if (sym_matches_type(value, &PyLong_Type)) { | ||||
|                 res = sym_new_type(ctx, &PyLong_Type); | ||||
|             } | ||||
|             else { | ||||
|                 res = sym_new_not_null(ctx); | ||||
|             } | ||||
|             stack_pointer[-1] = res; | ||||
|             break; | ||||
|         } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Noam Cohen
						Noam Cohen