-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy path_dload.php
More file actions
37 lines (32 loc) · 882 Bytes
/
_dload.php
File metadata and controls
37 lines (32 loc) · 882 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
32
33
34
35
36
37
<?php
declare(strict_types=1);
namespace PHPJava\Kernel\Mnemonics;
use PHPJava\Kernel\Types\Double_;
final class _dload extends AbstractOperationCode implements OperationCodeInterface
{
protected $isStackingOperation = true;
public function getOperands(): ?Operands
{
parent::getOperands();
if ($this->operands !== null) {
return $this->operands;
}
$index = $this->readUnsignedByte();
return $this->operands = new Operands(
['index', $index, ['index']]
);
}
/**
* load a double value from a local variable #index.
*/
public function execute(): void
{
parent::execute();
$index = $this->getOperands()['index'];
$this->pushToOperandStack(
Double_::get(
$this->getLocalStorage($index)
)
);
}
}