|
9 | 9 | use PHPJava\Compiler\Builder\Attributes\Architects\Frames\SameFrameExtended; |
10 | 10 | use PHPJava\Compiler\Builder\Attributes\Architects\Frames\SameLocals1StackItemFrame; |
11 | 11 | use PHPJava\Compiler\Builder\Finder\Result\ConstantPoolFinderResult; |
12 | | -use PHPJava\Compiler\Builder\Structures\Info\StringInfo; |
13 | 12 | use PHPJava\Compiler\Emulator\Accumulator; |
14 | 13 | use PHPJava\Compiler\Emulator\Mnemonics\AbstractOperationCode; |
15 | 14 | use PHPJava\Compiler\Lang\Assembler\Traits\Calculatable; |
|
18 | 17 | use PHPJava\Core\JVM\Stream\BinaryWriter; |
19 | 18 | use PHPJava\Core\PHPJava; |
20 | 19 | use PHPJava\Exceptions\AssembleStructureException; |
21 | | -use PHPJava\Kernel\Maps\OpCode; |
22 | 20 | use PHPJava\Kernel\Maps\VerificationTypeTag; |
23 | | -use PHPJava\Kernel\Mnemonics\OperationCodeInterface; |
24 | 21 | use PHPJava\Kernel\Types\_Byte; |
25 | 22 | use PHPJava\Kernel\Types\_Char; |
26 | 23 | use PHPJava\Kernel\Types\_Float; |
@@ -77,38 +74,6 @@ public function beginPrepare(): Attribute |
77 | 74 | break; |
78 | 75 | } |
79 | 76 | } |
80 | | - |
81 | | - foreach ($this->operations as $operation) { |
82 | | - $mnemonic = Runtime::MNEMONIC_NAMESPACE . '\\' . $operation->getMnemonic(); |
83 | | - /** |
84 | | - * @var OperationCodeInterface $opcodeInstance |
85 | | - */ |
86 | | - $opcodeInstance = new $mnemonic(); |
87 | | - |
88 | | - if (!$opcodeInstance->isStackingOperation()) { |
89 | | - continue; |
90 | | - } |
91 | | - switch ($operation->getOpCode()) { |
92 | | - case OpCode::_ldc: |
93 | | - case OpCode::_ldc_w: |
94 | | - case OpCode::_ldc2_w: |
95 | | - /** |
96 | | - * @var ConstantPoolFinderResult $finderResult |
97 | | - */ |
98 | | - $finderResult = $operation->getOperand(0)->getValue(); |
99 | | - switch (get_class($finderResult->getResult(false)->getEntry())) { |
100 | | - case StringInfo::class: |
101 | | - $this->getEnhancedConstantPool() |
102 | | - ->addClass(\PHPJava\Packages\java\lang\_String::class); |
103 | | - break; |
104 | | - default: |
105 | | - throw new AssembleStructureException( |
106 | | - 'Unsupported entry type: ' . get_class($finderResult->getResult()->getEntry()) |
107 | | - ); |
108 | | - } |
109 | | - break; |
110 | | - } |
111 | | - } |
112 | 77 | return parent::beginPrepare(); |
113 | 78 | } |
114 | 79 |
|
|
0 commit comments