blob: ec2fe7a29259fe555d5a878acd44268d5b64ce46 (
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
|
<?php
declare(strict_types=1);
namespace Nsfisis\Waddiwasi\Execution;
abstract class StackEntry
{
final public static function Value(Val $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<Val> $locals
*/
final public static function Frame(
int $arity,
array $locals,
ModuleInst $module,
): StackEntries\Frame {
return new StackEntries\Frame($arity, $locals, $module);
}
}
|