Permalink
Browse files

[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
  • Loading branch information...
1 parent cbc33cd commit c1197a5a4e7924955f398796377c59316874cbe7 @moritz moritz committed Jul 18, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/ops/nqp_dyncall.ops
View
4 src/ops/nqp_dyncall.ops
@@ -440,7 +440,7 @@ inline op nqp_native_call_setup() :base_core {
* There's no need to manually release the handle; when it is no longer
* referenced, it will be automatically garbage collected.
*/
-inline op nqp_native_call_build(in PMC, in STR, in STR, in STR, in PMC, in PMC) :base_core {
+inline op nqp_native_call_build(invar PMC, in STR, in STR, in STR, invar PMC, invar PMC) :base_core {
char *lib_name = Parrot_str_to_cstring(interp, $2);
char *sym_name = Parrot_str_to_cstring(interp, $3);
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)
* result comes back as NULL, then $1 will simply be $2 (which is
* presumably a type object).
*/
-inline op nqp_native_call(out PMC, in PMC, in PMC, in PMC) :base_core {
+inline op nqp_native_call(out PMC, invar PMC, invar PMC, invar PMC) :base_core {
PMC *args = $4;
PMC *result = PMCNULL;
char **free_strs = NULL;

0 comments on commit c1197a5

Please sign in to comment.