From 69a5893dae20f04cd91f04cde83f577db6f14c29 Mon Sep 17 00:00:00 2001 From: Lukasz Rubaszewski <117115317+lrubasze@users.noreply.github.com> Date: Fri, 24 Jan 2025 18:32:30 +0100 Subject: [PATCH] Temporarily add fallback weights for instructions enabled with reference-types --- .../src/vm/wasm/wasm_validator_config.rs | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/radix-engine/src/vm/wasm/wasm_validator_config.rs b/radix-engine/src/vm/wasm/wasm_validator_config.rs index f291c4f760d..f9a272082a6 100644 --- a/radix-engine/src/vm/wasm/wasm_validator_config.rs +++ b/radix-engine/src/vm/wasm/wasm_validator_config.rs @@ -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 { .. } @@ -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 { .. }