-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy path_daload.php
More file actions
33 lines (28 loc) · 796 Bytes
/
_daload.php
File metadata and controls
33 lines (28 loc) · 796 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
<?php
declare(strict_types=1);
namespace PHPJava\Kernel\Mnemonics;
use PHPJava\Kernel\Filters\Normalizer;
final class _daload extends AbstractOperationCode implements OperationCodeInterface
{
protected $isStackingOperation = true;
public function getOperands(): ?Operands
{
parent::getOperands();
if ($this->operands !== null) {
return $this->operands;
}
return $this->operands = new Operands();
}
/**
* load a double from an array.
*/
public function execute(): void
{
parent::execute();
$index = Normalizer::getPrimitiveValue($this->popFromOperandStack());
$arrayref = $this->popFromOperandStack();
$this->pushToOperandStack(
$arrayref[$index]
);
}
}