-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy pathFullFrame.php
More file actions
57 lines (49 loc) · 1.35 KB
/
FullFrame.php
File metadata and controls
57 lines (49 loc) · 1.35 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<?php
declare(strict_types=1);
namespace PHPJava\Kernel\Frames;
class FullFrame implements FrameInterface
{
use \PHPJava\Kernel\Core\BinaryReader;
use \PHPJava\Kernel\Core\ConstantPool;
/**
* @var int
*/
private $frameType;
/**
* @var int
*/
private $offsetDelta;
/**
* @var int
*/
private $numberOfLocals;
/**
* @var int
*/
private $numberOfStackItems;
/**
* @var \PHPJava\Kernel\Structures\VerificationTypeInfo
*/
private $locals = [];
/**
* @var \PHPJava\Kernel\Structures\VerificationTypeInfo
*/
private $stack = [];
public function execute(): void
{
$this->frameType = $this->readUnsignedByte();
$this->offsetDelta = $this->readUnsignedShort();
$this->numberOfLocals = $this->readUnsignedShort();
for ($i = 0; $i < $this->numberOfLocals; $i++) {
$local = new \PHPJava\Kernel\Structures\VerificationTypeInfo($this->reader);
$local->execute();
$this->locals = $local;
}
$this->numberOfStackItems = $this->readUnsignedShort();
for ($i = 0; $i < $this->numberOfStackItems; $i++) {
$stack = new \PHPJava\Kernel\Structures\VerificationTypeInfo($this->reader);
$stack->execute();
$this->stack[] = $stack;
}
}
}