| 1 | <?php |
||
| 18 | class OpcodeHeap implements \IteratorAggregate |
||
| 19 | { |
||
| 20 | /** |
||
| 21 | * @var \SplDoublyLinkedList |
||
| 22 | */ |
||
| 23 | private $opcodes; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @var Context |
||
| 27 | */ |
||
| 28 | private $ctx; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Heap constructor. |
||
| 32 | * @param Context $ctx |
||
| 33 | */ |
||
| 34 | public function __construct(Context $ctx) |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @param Opcode $opcode |
||
| 43 | * @param Readable $readable |
||
| 44 | * @param int $offset |
||
| 45 | * @return JoinableOpcode |
||
| 46 | */ |
||
| 47 | public function add(Opcode $opcode, Readable $readable, int $offset = 0): JoinableOpcode |
||
| 59 | |||
| 60 | /** |
||
| 61 | * @return \SplDoublyLinkedList|JoinableOpcode[]|OpcodeInterface[] |
||
| 62 | */ |
||
| 63 | public function getIterator(): \SplDoublyLinkedList |
||
| 67 | } |
||
| 68 |