astgen: add missing ZIR tags to test comparison functions
Add validate_struct_init_ty, struct_init_empty_result, struct_init_empty, struct_init_field_type, struct_init, struct_init_ref, validate_array_init_ref_ty, validate_array_init_ty to the test comparison switch cases. Add func/func_inferred proto_hash to hash skip mask. Tests added: struct init typed, enum decl. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -440,6 +440,10 @@ fn expectEqualData(
|
||||
},
|
||||
.ensure_result_non_error,
|
||||
.restore_err_ret_index_unconditional,
|
||||
.validate_struct_init_ty,
|
||||
.struct_init_empty_result,
|
||||
.struct_init_empty,
|
||||
.struct_init_empty_ref_result,
|
||||
=> {
|
||||
const r = ref.un_node;
|
||||
const g = got.un_node;
|
||||
@@ -491,6 +495,11 @@ fn expectEqualData(
|
||||
.array_init,
|
||||
.array_init_ref,
|
||||
.error_set_decl,
|
||||
.struct_init_field_type,
|
||||
.struct_init,
|
||||
.struct_init_ref,
|
||||
.validate_array_init_ref_ty,
|
||||
.validate_array_init_ty,
|
||||
=> {
|
||||
const r = ref.pl_node;
|
||||
const g = got.pl_node;
|
||||
@@ -784,6 +793,10 @@ fn dataMatches(tag: Zir.Inst.Tag, ref: Zir.Inst.Data, got: c.ZirInstData) bool {
|
||||
},
|
||||
.ensure_result_non_error,
|
||||
.restore_err_ret_index_unconditional,
|
||||
.validate_struct_init_ty,
|
||||
.struct_init_empty_result,
|
||||
.struct_init_empty,
|
||||
.struct_init_empty_ref_result,
|
||||
=> {
|
||||
return @intFromEnum(ref.un_node.src_node) == got.un_node.src_node and
|
||||
@intFromEnum(ref.un_node.operand) == got.un_node.operand;
|
||||
@@ -800,6 +813,11 @@ fn dataMatches(tag: Zir.Inst.Tag, ref: Zir.Inst.Data, got: c.ZirInstData) bool {
|
||||
.array_init,
|
||||
.array_init_ref,
|
||||
.error_set_decl,
|
||||
.struct_init_field_type,
|
||||
.struct_init,
|
||||
.struct_init_ref,
|
||||
.validate_array_init_ref_ty,
|
||||
.validate_array_init_ty,
|
||||
=> {
|
||||
return @intFromEnum(ref.pl_node.src_node) == got.pl_node.src_node and
|
||||
ref.pl_node.payload_index == got.pl_node.payload_index;
|
||||
|
||||
Reference in New Issue
Block a user