|
9 | 9 | use RubyVM\VM\Core\Runtime\Executor\ExecutedResult;
|
10 | 10 | use RubyVM\VM\Core\Runtime\Executor\Insn\InsnInterface;
|
11 | 11 | use RubyVM\VM\Core\Runtime\Executor\Operation\Operand;
|
12 |
| -use RubyVM\VM\Core\Runtime\Kernel\Ruby3_2\InstructionSequence\Insn as Ruby3_2_Insn; |
13 |
| -use RubyVM\VM\Core\Runtime\Kernel\Ruby3_3\InstructionSequence\Insn as Ruby3_3_Insn; |
14 | 12 | use RubyVM\VM\Core\YARV\Criterion\InstructionSequence\CallInfoInterface;
|
15 | 13 | use RubyVM\VM\Exception\RubyVMException;
|
16 | 14 | use Symfony\Component\Console\Helper\Table;
|
@@ -112,24 +110,15 @@ private function makeDetails(InsnInterface $insn, ContextInterface $context): ?s
|
112 | 110 | {
|
113 | 111 | $context = $context->createSnapshot();
|
114 | 112 |
|
115 |
| - // TODO: Rewrite here to depending on running kernel, but here is hard coded. |
116 | 113 | return match ($insn) {
|
117 |
| - Ruby3_2_Insn::SEND, |
118 |
| - Ruby3_2_Insn::OPT_SEND_WITHOUT_BLOCK, |
119 |
| - Ruby3_3_Insn::SEND, |
120 |
| - Ruby3_3_Insn::OPT_SEND_WITHOUT_BLOCK => $this->debugCallMethod($context), |
121 |
| - Ruby3_2_Insn::GETLOCAL, |
122 |
| - Ruby3_2_Insn::GETLOCAL_WC_0, |
123 |
| - Ruby3_2_Insn::GETLOCAL_WC_1, |
124 |
| - Ruby3_2_Insn::SETLOCAL, |
125 |
| - Ruby3_2_Insn::SETLOCAL_WC_0, |
126 |
| - Ruby3_2_Insn::SETLOCAL_WC_1, |
127 |
| - Ruby3_3_Insn::GETLOCAL, |
128 |
| - Ruby3_3_Insn::GETLOCAL_WC_0, |
129 |
| - Ruby3_3_Insn::GETLOCAL_WC_1, |
130 |
| - Ruby3_3_Insn::SETLOCAL, |
131 |
| - Ruby3_3_Insn::SETLOCAL_WC_0, |
132 |
| - Ruby3_3_Insn::SETLOCAL_WC_1 => $this->debugLocalVariable($context), |
| 114 | + $insn::find('SEND'), |
| 115 | + $insn::find('OPT_SEND_WITHOUT_BLOCK') => $this->debugCallMethod($context), |
| 116 | + $insn::find('GETLOCAL'), |
| 117 | + $insn::find('GETLOCAL_WC_0'), |
| 118 | + $insn::find('GETLOCAL_WC_1'), |
| 119 | + $insn::find('SETLOCAL'), |
| 120 | + $insn::find('SETLOCAL_WC_0'), |
| 121 | + $insn::find('SETLOCAL_WC_1') => $this->debugLocalVariable($context), |
133 | 122 | default => null,
|
134 | 123 | };
|
135 | 124 | }
|
|
0 commit comments