Skip to content

Commit 753f154

Browse files
committed
Add fstore
1 parent e91092f commit 753f154

5 files changed

Lines changed: 6 additions & 5 deletions

File tree

src/Kernel/Mnemonics/_fstore.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ final class _fstore implements OperationInterface
1111

1212
public function execute(): void
1313
{
14-
throw new NotImplementedException(__CLASS__);
14+
$index = $this->readUnsignedByte();
15+
$this->setLocalStorage($index, $this->popFromOperandStack());
1516
}
1617
}

src/Kernel/Mnemonics/_fstore_0.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ final class _fstore_0 implements OperationInterface
1111

1212
public function execute(): void
1313
{
14-
throw new NotImplementedException(__CLASS__);
14+
$this->setLocalStorage(0, $this->popFromOperandStack());
1515
}
1616
}

src/Kernel/Mnemonics/_fstore_1.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ final class _fstore_1 implements OperationInterface
1111

1212
public function execute(): void
1313
{
14-
throw new NotImplementedException(__CLASS__);
14+
$this->setLocalStorage(1, $this->popFromOperandStack());
1515
}
1616
}

src/Kernel/Mnemonics/_fstore_2.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ final class _fstore_2 implements OperationInterface
1111

1212
public function execute(): void
1313
{
14-
throw new NotImplementedException(__CLASS__);
14+
$this->setLocalStorage(2, $this->popFromOperandStack());
1515
}
1616
}

src/Kernel/Mnemonics/_fstore_3.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ final class _fstore_3 implements OperationInterface
1111

1212
public function execute(): void
1313
{
14-
throw new NotImplementedException(__CLASS__);
14+
$this->setLocalStorage(3, $this->popFromOperandStack());
1515
}
1616
}

0 commit comments

Comments
 (0)