Skip to content

Commit 5a5500a

Browse files
committed
Update dependecies
1 parent b38fe96 commit 5a5500a

24 files changed

Lines changed: 300 additions & 23 deletions

src/Imitation/java/io/PrintStream.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22
namespace PHPJava\Imitation\java\io;
33

4+
use PHPJava\Imitation\java\util\IllegalFormatException;
45
use PHPJava\Kernel\Structures\_Utf8;
56
use PHPJava\Kernel\Types\Type;
67

@@ -22,7 +23,7 @@ public function println($arg)
2223
return;
2324
}
2425

25-
echo "\n";
26+
throw new IllegalFormatException('Cannot pass "' . gettype($arg) . '" in ' . __METHOD__);
2627
}
2728

2829
public function print($arg)
@@ -39,6 +40,8 @@ public function print($arg)
3940
echo $arg;
4041
return;
4142
}
43+
44+
throw new IllegalFormatException('Cannot pass "' . gettype($arg) . '" in ' . __METHOD__);
4245
}
4346

4447
public function append($string)
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?php
2+
namespace PHPJava\Imitation\java\lang;
3+
4+
class IllegalArgumentException extends RuntimeException
5+
{
6+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?php
2+
namespace PHPJava\Imitation\java\util;
3+
4+
use PHPJava\Imitation\java\lang\RuntimeException;
5+
6+
class IllegalFormatException extends RuntimeException
7+
{
8+
}

src/Kernel/Mnemonics/_dload.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
namespace PHPJava\Kernel\Mnemonics;
33

44
use PHPJava\Exceptions\NotImplementedException;
5+
use PHPJava\Kernel\Types\_Double;
56
use PHPJava\Utilities\BinaryTool;
67

78
final class _dload implements OperationInterface
@@ -15,6 +16,10 @@ final class _dload implements OperationInterface
1516
public function execute(): void
1617
{
1718
$index = $this->readUnsignedByte();
18-
$this->pushStack($this->getLocalStorage($index));
19+
$this->pushStack(
20+
new _Double(
21+
$this->getLocalStorage($index)
22+
)
23+
);
1924
}
2025
}

src/Kernel/Mnemonics/_dload_0.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
namespace PHPJava\Kernel\Mnemonics;
33

44
use PHPJava\Exceptions\NotImplementedException;
5+
use PHPJava\Kernel\Types\_Double;
56
use PHPJava\Utilities\BinaryTool;
67

78
final class _dload_0 implements OperationInterface
@@ -11,6 +12,10 @@ final class _dload_0 implements OperationInterface
1112

1213
public function execute(): void
1314
{
14-
throw new NotImplementedException(__CLASS__);
15+
$this->pushStack(
16+
new _Double(
17+
$this->getLocalStorage(0)
18+
)
19+
);
1520
}
1621
}

src/Kernel/Mnemonics/_dload_1.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
namespace PHPJava\Kernel\Mnemonics;
33

44
use PHPJava\Exceptions\NotImplementedException;
5+
use PHPJava\Kernel\Types\_Double;
56
use PHPJava\Utilities\BinaryTool;
67

78
final class _dload_1 implements OperationInterface
@@ -11,6 +12,10 @@ final class _dload_1 implements OperationInterface
1112

1213
public function execute(): void
1314
{
14-
throw new NotImplementedException(__CLASS__);
15+
$this->pushStack(
16+
new _Double(
17+
$this->getLocalStorage(1)
18+
)
19+
);
1520
}
1621
}

src/Kernel/Mnemonics/_dload_2.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
namespace PHPJava\Kernel\Mnemonics;
33

44
use PHPJava\Exceptions\NotImplementedException;
5+
use PHPJava\Kernel\Types\_Double;
56
use PHPJava\Utilities\BinaryTool;
67

78
final class _dload_2 implements OperationInterface
@@ -11,6 +12,10 @@ final class _dload_2 implements OperationInterface
1112

1213
public function execute(): void
1314
{
14-
throw new NotImplementedException(__CLASS__);
15+
$this->pushStack(
16+
new _Double(
17+
$this->getLocalStorage(2)
18+
)
19+
);
1520
}
1621
}

src/Kernel/Mnemonics/_dload_3.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
namespace PHPJava\Kernel\Mnemonics;
33

44
use PHPJava\Exceptions\NotImplementedException;
5+
use PHPJava\Kernel\Types\_Double;
56
use PHPJava\Utilities\BinaryTool;
67

78
final class _dload_3 implements OperationInterface
@@ -11,6 +12,10 @@ final class _dload_3 implements OperationInterface
1112

1213
public function execute(): void
1314
{
14-
throw new NotImplementedException(__CLASS__);
15+
$this->pushStack(
16+
new _Double(
17+
$this->getLocalStorage(3)
18+
)
19+
);
1520
}
1621
}

src/Kernel/Mnemonics/_iload.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
namespace PHPJava\Kernel\Mnemonics;
33

44
use PHPJava\Exceptions\NotImplementedException;
5+
use PHPJava\Kernel\Types\_Int;
56
use PHPJava\Utilities\BinaryTool;
67

78
final class _iload implements OperationInterface
@@ -13,6 +14,10 @@ public function execute(): void
1314
{
1415
$index = $this->readUnsignedByte();
1516

16-
$this->pushStack($this->getLocalStorage($index));
17+
$this->pushStack(
18+
new _Int(
19+
$this->getLocalStorage($index)
20+
)
21+
);
1722
}
1823
}

src/Kernel/Mnemonics/_iload_0.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
namespace PHPJava\Kernel\Mnemonics;
33

44
use PHPJava\Exceptions\NotImplementedException;
5+
use PHPJava\Kernel\Types\_Int;
56
use PHPJava\Utilities\BinaryTool;
67

78
final class _iload_0 implements OperationInterface
@@ -11,6 +12,10 @@ final class _iload_0 implements OperationInterface
1112

1213
public function execute(): void
1314
{
14-
$this->pushStack($this->getLocalStorage(0));
15+
$this->pushStack(
16+
new _Int(
17+
$this->getLocalStorage(0)
18+
)
19+
);
1520
}
1621
}

0 commit comments

Comments
 (0)