Skip to content

Commit

Permalink
Temporarily add fallback weights for instructions enabled with refere…
Browse files Browse the repository at this point in the history
…nce-types
  • Loading branch information
lrubasze committed Jan 24, 2025
1 parent db73ae3 commit 69a5893
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions radix-engine/src/vm/wasm/wasm_validator_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,20 @@ impl Rules for WasmValidatorConfigV1 {
I64Extend16S => Some(self.weights.i64extendsi32),
I64Extend32S => Some(self.weights.i64extendsi32),

// Reference types proposal
// TODO WASM Adjust weights accordingly
TypedSelect { .. }
| RefNull { .. }
| RefIsNull { .. }
| RefFunc { .. }
| TableFill { .. }
| TableGet { .. }
| TableSet { .. }
| TableGrow { .. }
| TableSize { .. } => Some(self.weights.fallback),

// Bulk memory proposal
| MemoryInit { .. }
MemoryInit { .. }
| DataDrop { .. }
| MemoryCopy { .. }
| MemoryFill { .. }
Expand Down Expand Up @@ -246,17 +258,6 @@ impl Rules for WasmValidatorConfigV1 {
// Memory control proposal
| MemoryDiscard { .. }

// Reference types proposal
| TypedSelect { .. }
| RefNull { .. }
| RefIsNull { .. }
| RefFunc { .. }
| TableFill { .. }
| TableGet { .. }
| TableSet { .. }
| TableGrow { .. }
| TableSize { .. }

// Relaxed SIMD proposal
| I8x16RelaxedSwizzle { .. }
| I32x4RelaxedTruncF32x4S { .. }
Expand Down

0 comments on commit 69a5893

Please sign in to comment.