Skip to content

gc_fuzz: Add eqref support#13428

Queued
khagankhan wants to merge 1 commit into
bytecodealliance:mainfrom
khagankhan:i31
Queued

gc_fuzz: Add eqref support#13428
khagankhan wants to merge 1 commit into
bytecodealliance:mainfrom
khagankhan:i31

Conversation

@khagankhan
Copy link
Copy Markdown
Contributor

eqref:

types.rs:

  • Added FieldType::EqRef to for_each_field_type! (storage (ref null eq), default ref.null eq) — picked up automatically by FieldType::ALL, to_storage_type, emit_default_const, is_packed, and random.
  • Added StackType::Eq variant.
  • Added an Eq arm to StackType::fixup that also accepts any Struct(_) on the stack (struct <: eq), emitting NullEq otherwise.

ops.rs:

  • Extended WasmEncodingBases with eq_local_idx, eq_global_idx, eq_table_idx
  • Added function take_eq the take_eq import, an eqref table, an eqref global, and an eqref local.
  • Added take_eqref_idx = 4 and shifted typed-struct func-import base implicitly via imports.len().
  • Added 8 new GcOp variants: NullEq, TakeEqCall, etc.

oracles.rs:

  • Registered a take_eq host function taking (ref null eq) like take_struct.

+cc @fitzgen @eeide

@khagankhan khagankhan requested a review from a team as a code owner May 21, 2026 16:13
@khagankhan khagankhan requested review from fitzgen and removed request for a team May 21, 2026 16:13
Copy link
Copy Markdown
Member

@fitzgen fitzgen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@fitzgen fitzgen added this pull request to the merge queue May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants