File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22namespace PHPJava \Kernel \Mnemonics ;
33
44use PHPJava \Exceptions \NotImplementedException ;
5+ use PHPJava \Utilities \Extractor ;
56
67final class _baload implements OperationInterface
78{
@@ -10,6 +11,11 @@ final class _baload implements OperationInterface
1011
1112 public function execute (): void
1213 {
13- throw new NotImplementedException (__CLASS__ );
14+ $ index = Extractor::getRealValue ($ this ->popFromOperandStack ());
15+ $ arrayref = $ this ->popFromOperandStack ();
16+
17+ $ this ->pushToOperandStack (
18+ $ arrayref [$ index ]
19+ );
1420 }
1521}
Original file line number Diff line number Diff line change 22namespace PHPJava \Kernel \Mnemonics ;
33
44use PHPJava \Exceptions \NotImplementedException ;
5+ use PHPJava \Kernel \Types \Type ;
6+ use PHPJava \Utilities \Extractor ;
57
68final class _bastore implements OperationInterface
79{
@@ -10,6 +12,19 @@ final class _bastore implements OperationInterface
1012
1113 public function execute (): void
1214 {
13- throw new NotImplementedException (__CLASS__ );
15+ $ value = $ this ->popFromOperandStack ();
16+ $ index = Extractor::getRealValue ($ this ->popFromOperandStack ());
17+
18+ /**
19+ * @var Type $arrayref
20+ */
21+ $ arrayref = $ this ->popFromOperandStack ();
22+
23+ // The value is a ref.
24+ $ arrayref [$ index ] = $ value ;
25+
26+ $ this ->pushToOperandStack (
27+ $ arrayref
28+ );
1429 }
1530}
Original file line number Diff line number Diff line change 22namespace PHPJava \Kernel \Mnemonics ;
33
44use PHPJava \Exceptions \NotImplementedException ;
5+ use PHPJava \Utilities \Extractor ;
56
67final class _caload implements OperationInterface
78{
@@ -10,6 +11,11 @@ final class _caload implements OperationInterface
1011
1112 public function execute (): void
1213 {
13- throw new NotImplementedException (__CLASS__ );
14+ $ index = Extractor::getRealValue ($ this ->popFromOperandStack ());
15+ $ arrayref = $ this ->popFromOperandStack ();
16+
17+ $ this ->pushToOperandStack (
18+ $ arrayref [$ index ]
19+ );
1420 }
1521}
Original file line number Diff line number Diff line change @@ -16,6 +16,8 @@ public function execute(): void
1616 $ index = Extractor::getRealValue ($ this ->popFromOperandStack ());
1717 $ arrayref = $ this ->popFromOperandStack ();
1818
19- $ this ->pushToOperandStack ($ arrayref [$ index ]);
19+ $ this ->pushToOperandStack (
20+ $ arrayref [$ index ]
21+ );
2022 }
2123}
Original file line number Diff line number Diff line change 11<?php
22namespace PHPJava \Kernel \Mnemonics ;
33
4+ use PHPJava \Kernel \Types \Type ;
45use PHPJava \Utilities \Extractor ;
56
67final class _dastore implements OperationInterface
@@ -15,8 +16,17 @@ public function execute(): void
1516 {
1617 $ value = $ this ->popFromOperandStack ();
1718 $ index = Extractor::getRealValue ($ this ->popFromOperandStack ());
19+
20+ /**
21+ * @var Type $arrayref
22+ */
1823 $ arrayref = $ this ->popFromOperandStack ();
1924
25+ // The value is a ref.
2026 $ arrayref [$ index ] = $ value ;
27+
28+ $ this ->pushToOperandStack (
29+ $ arrayref
30+ );
2131 }
2232}
Original file line number Diff line number Diff line change 11<?php
22namespace PHPJava \Kernel \Mnemonics ;
33
4+ use PHPJava \Kernel \Types \_Double ;
45use PHPJava \Utilities \BinaryTool ;
6+ use PHPJava \Utilities \Extractor ;
57
68final class _dstore implements OperationInterface
79{
@@ -14,8 +16,11 @@ final class _dstore implements OperationInterface
1416 public function execute (): void
1517 {
1618 $ index = $ this ->readUnsignedByte ();
17- $ value = $ this ->popFromOperandStack ();
19+ $ value = Extractor:: getRealValue ( $ this ->popFromOperandStack () );
1820
19- $ this ->setLocalStorage ($ index , BinaryTool::convertDoubleToIEEE754 ($ value ));
21+ $ this ->setLocalStorage (
22+ $ index ,
23+ $ value
24+ );
2025 }
2126}
Original file line number Diff line number Diff line change 22namespace PHPJava \Kernel \Mnemonics ;
33
44use PHPJava \Exceptions \NotImplementedException ;
5+ use PHPJava \Kernel \Types \Type ;
6+ use PHPJava \Utilities \Extractor ;
57
68final class _faload implements OperationInterface
79{
@@ -10,6 +12,11 @@ final class _faload implements OperationInterface
1012
1113 public function execute (): void
1214 {
13- throw new NotImplementedException (__CLASS__ );
15+ $ index = Extractor::getRealValue ($ this ->popFromOperandStack ());
16+ $ arrayref = $ this ->popFromOperandStack ();
17+
18+ $ this ->pushToOperandStack (
19+ $ arrayref [$ index ]
20+ );
1421 }
1522}
Original file line number Diff line number Diff line change 22namespace PHPJava \Kernel \Mnemonics ;
33
44use PHPJava \Exceptions \NotImplementedException ;
5+ use PHPJava \Kernel \Types \Type ;
6+ use PHPJava \Utilities \Extractor ;
57
68final class _fastore implements OperationInterface
79{
@@ -10,6 +12,19 @@ final class _fastore implements OperationInterface
1012
1113 public function execute (): void
1214 {
13- throw new NotImplementedException (__CLASS__ );
15+ $ value = $ this ->popFromOperandStack ();
16+ $ index = Extractor::getRealValue ($ this ->popFromOperandStack ());
17+
18+ /**
19+ * @var Type $arrayref
20+ */
21+ $ arrayref = $ this ->popFromOperandStack ();
22+
23+ // The value is a ref.
24+ $ arrayref [$ index ] = $ value ;
25+
26+ $ this ->pushToOperandStack (
27+ $ arrayref
28+ );
1429 }
1530}
Original file line number Diff line number Diff line change 22namespace PHPJava \Kernel \Mnemonics ;
33
44use PHPJava \Exceptions \NotImplementedException ;
5+ use PHPJava \Utilities \Extractor ;
56
67final class _saload implements OperationInterface
78{
@@ -10,6 +11,11 @@ final class _saload implements OperationInterface
1011
1112 public function execute (): void
1213 {
13- throw new NotImplementedException (__CLASS__ );
14+ $ index = Extractor::getRealValue ($ this ->popFromOperandStack ());
15+ $ arrayref = $ this ->popFromOperandStack ();
16+
17+ $ this ->pushToOperandStack (
18+ $ arrayref [$ index ]
19+ );
1420 }
1521}
Original file line number Diff line number Diff line change 22namespace PHPJava \Kernel \Mnemonics ;
33
44use PHPJava \Exceptions \NotImplementedException ;
5+ use PHPJava \Kernel \Types \Type ;
6+ use PHPJava \Utilities \Extractor ;
57
68final class _sastore implements OperationInterface
79{
@@ -10,6 +12,19 @@ final class _sastore implements OperationInterface
1012
1113 public function execute (): void
1214 {
13- throw new NotImplementedException (__CLASS__ );
15+ $ value = $ this ->popFromOperandStack ();
16+ $ index = Extractor::getRealValue ($ this ->popFromOperandStack ());
17+
18+ /**
19+ * @var Type $arrayref
20+ */
21+ $ arrayref = $ this ->popFromOperandStack ();
22+
23+ // The value is a ref.
24+ $ arrayref [$ index ] = $ value ;
25+
26+ $ this ->pushToOperandStack (
27+ $ arrayref
28+ );
1429 }
1530}
You can’t perform that action at this time.
0 commit comments