mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 23:21:29 +00:00 
			
		
		
		
	Issue #28823: Simplified compiling with opcode BUILD_MAP_UNPACK.
This commit is contained in:
		
							parent
							
								
									b69ee8c386
								
							
						
					
					
						commit
						3d85fae91f
					
				
					 1 changed files with 2 additions and 5 deletions
				
			
		| 
						 | 
					@ -3344,11 +3344,8 @@ compiler_dict(struct compiler *c, expr_ty e)
 | 
				
			||||||
    /* If there is more than one dict, they need to be merged into a new
 | 
					    /* If there is more than one dict, they need to be merged into a new
 | 
				
			||||||
     * dict.  If there is one dict and it's an unpacking, then it needs
 | 
					     * dict.  If there is one dict and it's an unpacking, then it needs
 | 
				
			||||||
     * to be copied into a new dict." */
 | 
					     * to be copied into a new dict." */
 | 
				
			||||||
    while (containers > 1 || is_unpacking) {
 | 
					    if (containers > 1 || is_unpacking) {
 | 
				
			||||||
        int oparg = containers < 255 ? containers : 255;
 | 
					        ADDOP_I(c, BUILD_MAP_UNPACK, containers);
 | 
				
			||||||
        ADDOP_I(c, BUILD_MAP_UNPACK, oparg);
 | 
					 | 
				
			||||||
        containers -= (oparg - 1);
 | 
					 | 
				
			||||||
        is_unpacking = 0;
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    return 1;
 | 
					    return 1;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue