Convert return formats to value lists.
With the Return and ReturnReg formats converted to using value lists for storing their arguments, thee are no remaining instruction formats with variable argument lists in boxed storage. The Return and ReturnReg formats are also going to be merged since they are identical now.
This commit is contained in:
@@ -51,8 +51,8 @@ Call = InstructionFormat(
|
||||
IndirectCall = InstructionFormat(
|
||||
sig_ref, VALUE, VARIABLE_ARGS,
|
||||
multiple_results=True, value_list=True)
|
||||
Return = InstructionFormat(VARIABLE_ARGS, boxed_storage=True)
|
||||
ReturnReg = InstructionFormat(VALUE, VARIABLE_ARGS, boxed_storage=True)
|
||||
Return = InstructionFormat(VARIABLE_ARGS, value_list=True)
|
||||
ReturnReg = InstructionFormat(VALUE, VARIABLE_ARGS, value_list=True)
|
||||
|
||||
# Finally extract the names of global variables in this module.
|
||||
InstructionFormat.extract_names(globals())
|
||||
|
||||
@@ -63,6 +63,10 @@ class InstructionFormat(object):
|
||||
self.value_operands = tuple(
|
||||
i for i, k in enumerate(self.kinds) if k is VALUE)
|
||||
|
||||
# We require a value list for storage of variable arguments.
|
||||
if VARIABLE_ARGS in self.kinds:
|
||||
assert self.has_value_list, "Need a value list for variable args"
|
||||
|
||||
# The typevar_operand argument must point to a 'value' operand.
|
||||
self.typevar_operand = kwargs.get('typevar_operand', None) # type: int
|
||||
if self.typevar_operand is not None:
|
||||
|
||||
Reference in New Issue
Block a user