-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy path_aload.php
More file actions
31 lines (27 loc) · 785 Bytes
/
_aload.php
File metadata and controls
31 lines (27 loc) · 785 Bytes
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
<?php
declare(strict_types=1);
namespace PHPJava\Kernel\Mnemonics;
final class _aload extends AbstractOperationCode implements OperationCodeInterface
{
protected $isStackingOperation = true;
public function getOperands(): ?Operands
{
parent::getOperands();
if ($this->operands !== null) {
return $this->operands;
}
$index = $this->readByte();
return $this->operands = new Operands(
['index', $index, ['index']]
);
}
/**
* load a reference onto the stack from a local variable #index.
*/
public function execute(): void
{
parent::execute();
$index = $this->getOperands()['index'];
$this->pushToOperandStack($this->getLocalStorage($index));
}
}