diff options
Diffstat (limited to 'src/WebAssembly/Execution/Ref.php')
| -rw-r--r-- | src/WebAssembly/Execution/Ref.php | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/WebAssembly/Execution/Ref.php b/src/WebAssembly/Execution/Ref.php new file mode 100644 index 0000000..f7b6760 --- /dev/null +++ b/src/WebAssembly/Execution/Ref.php @@ -0,0 +1,25 @@ +<?php + +declare(strict_types=1); + +namespace Nsfisis\Waddiwasi\WebAssembly\Execution; + +use Nsfisis\Waddiwasi\WebAssembly\Structure\Types\RefType; + +abstract readonly class Ref +{ + final public static function RefNull(RefType $type): Refs\RefNull + { + return new Refs\RefNull($type); + } + + final public static function RefFunc(int $addr): Refs\RefFunc + { + return new Refs\RefFunc($addr); + } + + final public static function RefExtern(int $addr): Refs\RefExtern + { + return new Refs\RefExtern($addr); + } +} |
