Remove some has_value_list workarounds.
Now that all variable_args formats use has_value_list, we can remove some workarounds that allowed the old boxed_storage form.
This commit is contained in:
@@ -61,7 +61,7 @@ VARIABLE_ARGS = OperandKind(
|
|||||||
passed to an extended basic block, or a variable number of results
|
passed to an extended basic block, or a variable number of results
|
||||||
returned from an instruction.
|
returned from an instruction.
|
||||||
""",
|
""",
|
||||||
default_member='varargs')
|
rust_type='&[Value]')
|
||||||
|
|
||||||
|
|
||||||
# Instances of immediate operand types are provided in the
|
# Instances of immediate operand types are provided in the
|
||||||
|
|||||||
@@ -510,10 +510,7 @@ def gen_format_constructor(iform, fmt):
|
|||||||
|
|
||||||
# Normal operand arguments.
|
# Normal operand arguments.
|
||||||
for idx, kind in enumerate(iform.kinds):
|
for idx, kind in enumerate(iform.kinds):
|
||||||
if kind is cdsl.operands.VARIABLE_ARGS and iform.has_value_list:
|
args.append('op{}: {}'.format(idx, kind.rust_type))
|
||||||
args.append('op{}: &[Value]'.format(idx, kind.rust_type))
|
|
||||||
else:
|
|
||||||
args.append('op{}: {}'.format(idx, kind.rust_type))
|
|
||||||
|
|
||||||
proto = '{}({})'.format(iform.name, ', '.join(args))
|
proto = '{}({})'.format(iform.name, ', '.join(args))
|
||||||
proto += " -> (Inst, &'f mut DataFlowGraph)"
|
proto += " -> (Inst, &'f mut DataFlowGraph)"
|
||||||
@@ -575,8 +572,6 @@ def gen_member_inits(iform, fmt):
|
|||||||
|
|
||||||
# Immediates and entity references.
|
# Immediates and entity references.
|
||||||
for idx, member in enumerate(iform.members):
|
for idx, member in enumerate(iform.members):
|
||||||
if iform.has_value_list and member == 'varargs':
|
|
||||||
continue
|
|
||||||
if member:
|
if member:
|
||||||
fmt.line('{}: op{},'.format(member, idx))
|
fmt.line('{}: op{},'.format(member, idx))
|
||||||
|
|
||||||
@@ -606,9 +601,6 @@ def gen_inst_builder(inst, fmt):
|
|||||||
t = 'T{}{}'.format(1 + len(tmpl_types), op.kind.name)
|
t = 'T{}{}'.format(1 + len(tmpl_types), op.kind.name)
|
||||||
tmpl_types.append('{}: Into<{}>'.format(t, op.kind.rust_type))
|
tmpl_types.append('{}: Into<{}>'.format(t, op.kind.rust_type))
|
||||||
into_args.append(op.name)
|
into_args.append(op.name)
|
||||||
elif (inst.format.has_value_list and
|
|
||||||
op.kind is cdsl.operands.VARIABLE_ARGS):
|
|
||||||
t = '&[Value]'
|
|
||||||
else:
|
else:
|
||||||
t = op.kind.rust_type
|
t = op.kind.rust_type
|
||||||
args.append('{}: {}'.format(op.name, t))
|
args.append('{}: {}'.format(op.name, t))
|
||||||
|
|||||||
Reference in New Issue
Block a user