blob: 4260830b8959a3de953299f687cff9eb1b80c25c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
<?php
declare(strict_types=1);
namespace Nsfisis\Waddiwasi\Execution;
abstract class StackEntry
{
final public static function Value(int|float|Ref $inner): StackEntries\Value
{
return new StackEntries\Value($inner);
}
/**
* @param int<0, max> $arity
*/
final public static function Label(
int $arity,
): StackEntries\Label {
return new StackEntries\Label($arity);
}
/**
* @param int<0, max> $arity
* @param list<int|float|Ref> $locals
*/
final public static function Frame(
int $arity,
array $locals,
ModuleInst $module,
string $debugName,
): StackEntries\Frame {
return new StackEntries\Frame($arity, $locals, $module, $debugName);
}
}
|