Skip to content

Commit c1197a5

Browse files
committed
[dyncall ops] mark in PMCs as invar
this reduces the size of the generated C code by a factor > 4, and the PMCs cannot reasonably be constants anyway
1 parent cbc33cd commit c1197a5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ops/nqp_dyncall.ops

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ inline op nqp_native_call_setup() :base_core {
440440
* There's no need to manually release the handle; when it is no longer
441441
* referenced, it will be automatically garbage collected.
442442
*/
443-
inline op nqp_native_call_build(in PMC, in STR, in STR, in STR, in PMC, in PMC) :base_core {
443+
inline op nqp_native_call_build(invar PMC, in STR, in STR, in STR, invar PMC, invar PMC) :base_core {
444444
char *lib_name = Parrot_str_to_cstring(interp, $2);
445445
char *sym_name = Parrot_str_to_cstring(interp, $3);
446446
PMC *arg_info = $5;
@@ -497,7 +497,7 @@ inline op nqp_native_call_build(in PMC, in STR, in STR, in STR, in PMC, in PMC)
497497
* result comes back as NULL, then $1 will simply be $2 (which is
498498
* presumably a type object).
499499
*/
500-
inline op nqp_native_call(out PMC, in PMC, in PMC, in PMC) :base_core {
500+
inline op nqp_native_call(out PMC, invar PMC, invar PMC, invar PMC) :base_core {
501501
PMC *args = $4;
502502
PMC *result = PMCNULL;
503503
char **free_strs = NULL;

0 commit comments

Comments
 (0)