@@ -1359,15 +1359,15 @@ QAST::OperationsJAST.add_core_op('call', sub ($qastcomp, $node) {
1359
1359
# Emit the call. Note, name passed as extra arg as some valid names in
1360
1360
# Perl 6 are not valid method names on the JVM. We use the fact that
1361
1361
# the stack was spilled to sneak the ThreadContext arg in.
1362
+ nqp :: unshift (@ argstuff [2 ], ' I' );
1363
+ nqp :: unshift (@ argstuff [2 ], $ TYPE_STR );
1364
+ $ il . append (JAST::PushSVal. new ( : value($ node . name ) ));
1365
+ $ il . append (JAST::PushIndex. new ( : value($ cs_idx ) ));
1362
1366
$ il . append ($ ALOAD_1 );
1363
1367
$ * STACK . obtain($ il , | @ argstuff [1 ]) if @ argstuff [1 ];
1364
1368
$ il . append (JAST::InvokeDynamic. new (
1365
- ' subcall' , ' V' , @ argstuff [2 ],
1366
- ' org/perl6/nqp/runtime/IndyBootstrap' , ' subcall' ,
1367
- [
1368
- JAST::PushSVal. new ( : value($ node . name ) ),
1369
- JAST::PushIndex. new ( : value($ cs_idx ) )
1370
- ]
1369
+ ' subcall_noa' , ' V' , @ argstuff [2 ],
1370
+ ' org/perl6/nqp/runtime/IndyBootstrap' , ' subcall_noa'
1371
1371
));
1372
1372
}
1373
1373
@@ -1384,14 +1384,13 @@ QAST::OperationsJAST.add_core_op('call', sub ($qastcomp, $node) {
1384
1384
1385
1385
# Emit the call, using the same thread context trick. The first thing
1386
1386
# will be invoked.
1387
+ nqp :: unshift (@ argstuff [2 ], ' I' );
1388
+ $ il . append (JAST::PushIndex. new ( : value($ cs_idx ) ));
1387
1389
$ il . append ($ ALOAD_1 );
1388
1390
$ * STACK . obtain($ il , | @ argstuff [1 ]) if @ argstuff [1 ];
1389
1391
$ il . append (JAST::InvokeDynamic. new (
1390
- ' indcall' , ' V' , @ argstuff [2 ],
1391
- ' org/perl6/nqp/runtime/IndyBootstrap' , ' indcall' ,
1392
- [
1393
- JAST::PushIndex. new ( : value($ cs_idx ) )
1394
- ]
1392
+ ' indcall_noa' , ' V' , @ argstuff [2 ],
1393
+ ' org/perl6/nqp/runtime/IndyBootstrap' , ' indcall_noa'
1395
1394
));
1396
1395
}
1397
1396
@@ -1427,15 +1426,15 @@ QAST::OperationsJAST.add_core_op('callmethod', -> $qastcomp, $node {
1427
1426
# Emit the call. Note, name passed as extra arg as some valid names in
1428
1427
# Perl 6 are not valid method names on the JVM. We use the fact that
1429
1428
# the stack was spilled to sneak the ThreadContext arg in.
1429
+ nqp :: unshift (@ argstuff [2 ], ' I' );
1430
+ nqp :: unshift (@ argstuff [2 ], $ TYPE_STR );
1431
+ $ il . append (JAST::PushSVal. new ( : value($ node . name ) ));
1432
+ $ il . append (JAST::PushIndex. new ( : value($ cs_idx ) ));
1430
1433
$ il . append ($ ALOAD_1 );
1431
1434
$ * STACK . obtain($ il , | @ argstuff [1 ]) if @ argstuff [1 ];
1432
1435
$ il . append (JAST::InvokeDynamic. new (
1433
- ' methcall' , ' V' , @ argstuff [2 ],
1434
- ' org/perl6/nqp/runtime/IndyBootstrap' , ' methcall' ,
1435
- [
1436
- JAST::PushSVal. new ( : value($ node . name ) ),
1437
- JAST::PushIndex. new ( : value($ cs_idx ) )
1438
- ]
1436
+ ' methcall_noa' , ' V' , @ argstuff [2 ],
1437
+ ' org/perl6/nqp/runtime/IndyBootstrap' , ' methcall_noa' ,
1439
1438
));
1440
1439
}
1441
1440
@@ -1458,14 +1457,13 @@ QAST::OperationsJAST.add_core_op('callmethod', -> $qastcomp, $node {
1458
1457
$ * STACK . spill_to_locals($ il );
1459
1458
1460
1459
# Emit the call.
1460
+ nqp :: unshift (@ argstuff [2 ], ' I' );
1461
+ $ il . append (JAST::PushIndex. new ( : value($ cs_idx ) ));
1461
1462
$ il . append ($ ALOAD_1 );
1462
1463
$ * STACK . obtain($ il , | @ argstuff [1 ]) if @ argstuff [1 ];
1463
1464
$ il . append (JAST::InvokeDynamic. new (
1464
- ' indmethcall' , ' V' , @ argstuff [2 ],
1465
- ' org/perl6/nqp/runtime/IndyBootstrap' , ' indmethcall' ,
1466
- [
1467
- JAST::PushIndex. new ( : value($ cs_idx ) )
1468
- ]
1465
+ ' indmethcall_noa' , ' V' , @ argstuff [2 ],
1466
+ ' org/perl6/nqp/runtime/IndyBootstrap' , ' indmethcall_noa'
1469
1467
));
1470
1468
}
1471
1469
@@ -3885,14 +3883,12 @@ class QAST::CompilerJAST {
3885
3883
my $ handle := nqp ::scgethandle($ sc );
3886
3884
my $ idx := nqp ::scgetobjidx($ sc , $ val );
3887
3885
my $ il := JAST::InstructionList. new ();
3886
+ $ il . append (JAST::PushSVal. new ( : value($ handle ) ));
3887
+ $ il . append (JAST::PushIndex. new ( : value($ idx ) ));
3888
3888
$ il . append ($ ALOAD_1 );
3889
3889
$ il . append (JAST::InvokeDynamic. new (
3890
- ' wval' , $ TYPE_SMO , [$ TYPE_TC ],
3891
- ' org/perl6/nqp/runtime/IndyBootstrap' , ' wval' ,
3892
- [
3893
- JAST::PushSVal. new ( : value($ handle ) ),
3894
- JAST::PushIVal. new ( : value($ idx ) )
3895
- ]
3890
+ ' wval_noa' , $ TYPE_SMO , [$ TYPE_STR , ' I' , $ TYPE_TC ],
3891
+ ' org/perl6/nqp/runtime/IndyBootstrap' , ' wval_noa'
3896
3892
));
3897
3893
result($ il , $ RT_OBJ );
3898
3894
}
0 commit comments