@@ -229,7 +229,7 @@ function ($item) {
229229 ]
230230 )
231231 );
232- $ operationCache = new OperationCache ();
232+
233233 while ($ reader ->getOffset () < $ codeAttribute ->getOpCodeLength ()) {
234234 if (++$ executedCounter > ($ this ->options ['max_stack_exceeded ' ] ?? GlobalOptions::get ('max_stack_exceeded ' ) ?? Runtime::MAX_STACK_EXCEEDED )) {
235235 throw new RuntimeException (
@@ -296,23 +296,23 @@ function ($item) {
296296 /**
297297 * @var OperationInterface|Accumulator|ConstantPool $executor
298298 */
299- $ executor = $ operationCache -> fetchOrPush (
299+ $ executor = OperationCache:: fetchOrPush (
300300 $ fullName ,
301- function () use ($ fullName ) {
302- return new $ fullName ();
301+ function () use ($ fullName , &$ currentConstantPool ) {
302+ return (new $ fullName ())
303+ ->setConstantPool ($ currentConstantPool );
303304 }
304305 );
305- $ executor = new $ fullName ();
306- $ executor ->setConstantPool ($ currentConstantPool );
307- $ executor ->setParameters (
308- $ method ->getAttributes (),
309- $ this ->javaClassInvoker ,
310- $ reader ,
311- $ localStorage ,
312- $ stacks ,
313- $ pointer
314- );
315- $ returnValue = $ executor ->execute ();
306+ $ returnValue = $ executor
307+ ->setParameters (
308+ $ method ->getAttributes (),
309+ $ this ->javaClassInvoker ,
310+ $ reader ,
311+ $ localStorage ,
312+ $ stacks ,
313+ $ pointer
314+ )
315+ ->execute ();
316316
317317 $ afterTrigger = $ this ->options ['operations ' ]['injections ' ]['after ' ] ?? GlobalOptions::get ('operations.injections.after ' );
318318 if (is_callable ($ afterTrigger )) {
0 commit comments