From 07b375c2c5ae968735f2390b523dbcc088b03ee5 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 19 May 2024 11:36:04 +0900 Subject: test: UnreachableTest passed --- src/Execution/Runtime.php | 2 +- src/Execution/TrapKind.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Execution/Runtime.php b/src/Execution/Runtime.php index bf010c9..9987118 100644 --- a/src/Execution/Runtime.php +++ b/src/Execution/Runtime.php @@ -2449,7 +2449,7 @@ final class Runtime private function execInstrControlUnreachable(Instrs\Control\Unreachable $instr): void { - throw new TrapException("unreachable"); + throw new TrapException("unreachable", trapKind: TrapKind::Unreachable); } private function doLoadF32(int $offset, string $instrOpName): void diff --git a/src/Execution/TrapKind.php b/src/Execution/TrapKind.php index b33e4df..c44747d 100644 --- a/src/Execution/TrapKind.php +++ b/src/Execution/TrapKind.php @@ -7,6 +7,7 @@ namespace Nsfisis\Waddiwasi\Execution; enum TrapKind { case Unknown; + case Unreachable; case OutOfBoundsMemoryAccess; case OutOfBoundsTableAccess; case UninitializedElement; -- cgit v1.2.3-70-g09d2