#NEWLINE# @ lower_builtin ( '*=' , types . List , types . Integer ) #NEWLINE# def list_mul_inplace( context , builder , sig , args ) : #NEWLINE# #INDENT# inst = ListInstance ( context , builder , sig . args [ 0 ] , args [ 0 ] ) #NEWLINE# src_size = inst . size #NEWLINE# mult = args [ 1 ] #NEWLINE# zero = ir . Constant ( mult . type , 0 ) #NEWLINE# mult = builder . select ( cgutils . is_neg_int ( builder , mult ) , zero , mult ) #NEWLINE# nitems = builder . mul ( mult , src_size ) #NEWLINE# inst . resize ( nitems ) #NEWLINE# with cgutils . for_range_slice ( builder , src_size , nitems , src_size , inc = True ) as ( dest_offset , _ ) : #NEWLINE# #INDENT# with cgutils . for_range ( builder , src_size ) as loop : #NEWLINE# #INDENT# value = inst . getitem ( loop . index ) #NEWLINE# inst . setitem ( builder . add ( loop . index , dest_offset ) , value ) #NEWLINE# #UNINDENT# #UNINDENT# return impl_ret_borrowed ( context , builder , sig . return_type , inst . value )