@lower_constant(types.Record)
def constant_record(context, builder, ty, pyval):
 lty = ir.ArrayType(ir.IntType(8), pyval.nbytes)
 val = lty(bytearray(pyval.tostring()))
 return cgutils.alloca_once_value(builder, val)

@ lower_constant ( types . Record ) def constant_record ( context , builder , ty , pyval ) : lty = ir . ArrayType ( ir . IntType ( 8 ) , pyval . nbytes ) val = lty ( bytearray ( pyval . tostring ( ) ) ) return cgutils . alloca_once_value ( builder , val )
create a record constant as a stack-allocated array of bytes .