Skip to content

Instantly share code, notes, and snippets.

@ZYROz
Created August 5, 2014 19:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ZYROz/0b31f2c775bd152d1263 to your computer and use it in GitHub Desktop.
Save ZYROz/0b31f2c775bd152d1263 to your computer and use it in GitHub Desktop.
args
diff --git a/src/call/args.c b/src/call/args.c
index 7ba54e2..0b7e01a 100644
--- a/src/call/args.c
+++ b/src/call/args.c
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2001-2011, Parrot Foundation.
+Copyright (C) 2001-2014, Parrot Foundation.
=head1 NAME
@@ -343,7 +343,7 @@ Parrot_pcc_build_sig_object_from_op(PARROT_INTERP, ARGIN_NULLOK(PMC *signature),
call_object = Parrot_pmc_new(interp, enum_class_CallContext);
else {
call_object = signature;
- VTABLE_morph(interp, call_object, PMCNULL);
+ Parrot_CallContext_morph(interp, call_object, PMCNULL);
}
/* this macro is much, much faster than the VTABLE STRING comparisons */
@@ -364,12 +364,12 @@ Parrot_pcc_build_sig_object_from_op(PARROT_INTERP, ARGIN_NULLOK(PMC *signature),
switch (PARROT_ARG_TYPE_MASK_MASK(arg_flags)) {
case PARROT_ARG_INTVAL:
- VTABLE_push_integer(interp, call_object, constant
+ Parrot_CallContext_push_integer(interp, call_object, constant
? raw_index
: CTX_REG_INT(interp, ctx, raw_index));
break;
case PARROT_ARG_FLOATVAL:
- VTABLE_push_float(interp, call_object, constant
+ Parrot_CallContext_push_float(interp, call_object, constant
? Parrot_pcc_get_num_constant(interp, ctx, raw_index)
: CTX_REG_NUM(interp, ctx, raw_index));
break;
@@ -392,7 +392,7 @@ Parrot_pcc_build_sig_object_from_op(PARROT_INTERP, ARGIN_NULLOK(PMC *signature),
raw_sig, raw_args, arg_index);
}
else
- VTABLE_push_string(interp, call_object, string_value);
+ Parrot_CallContext_push_string(interp, call_object, string_value);
break;
}
@@ -406,7 +406,7 @@ Parrot_pcc_build_sig_object_from_op(PARROT_INTERP, ARGIN_NULLOK(PMC *signature),
dissect_aggregate_arg(interp, call_object, pmc_value);
}
else {
- VTABLE_push_pmc(interp, call_object, pmc_value);
+ Parrot_CallContext_push_pmc(interp, call_object, pmc_value);
}
break;
@@ -490,7 +490,7 @@ dissect_aggregate_arg(PARROT_INTERP, ARGMOD(PMC *call_object), ARGIN(PMC *aggreg
const INTVAL elements = VTABLE_elements(interp, aggregate);
INTVAL index;
for (index = 0; index < elements; ++index) {
- VTABLE_push_pmc(interp, call_object,
+ Parrot_CallContext_push_pmc(interp, call_object,
VTABLE_get_pmc_keyed_int(interp, aggregate, index));
}
}
@@ -607,22 +607,22 @@ set_call_from_varargs(PARROT_INTERP,
EXCEPTION_INVALID_OPERATION,
"Dispatch: only the first argument can be an invocant");
else {
- VTABLE_push_pmc(interp, signature, pmc_arg);
+ Parrot_CallContext_push_pmc(interp, signature, pmc_arg);
++i; /* skip 'i' */
}
}
else
- VTABLE_push_pmc(interp, signature, pmc_arg);
+ Parrot_CallContext_push_pmc(interp, signature, pmc_arg);
break;
}
case 'S':
- VTABLE_push_string(interp, signature, va_arg(*args, STRING *));
+ Parrot_CallContext_push_string(interp, signature, va_arg(*args, STRING *));
break;
case 'I':
- VTABLE_push_integer(interp, signature, va_arg(*args, INTVAL));
+ Parrot_CallContext_push_integer(interp, signature, va_arg(*args, INTVAL));
break;
case 'N':
- VTABLE_push_float(interp, signature, va_arg(*args, FLOATVAL));
+ Parrot_CallContext_push_float(interp, signature, va_arg(*args, FLOATVAL));
break;
case '-':
return;
@@ -656,7 +656,7 @@ Parrot_pcc_set_call_from_varargs(PARROT_INTERP,
{
ASSERT_ARGS(Parrot_pcc_set_call_from_varargs)
PARROT_ASSERT(PMCNULL != signature);
- VTABLE_morph(interp, signature, PMCNULL);
+ Parrot_CallContext_morph(interp, signature, PMCNULL);
set_call_from_varargs(interp, signature, sig, args);
}
@@ -688,7 +688,7 @@ Parrot_pcc_build_call_from_varargs(PARROT_INTERP,
call_object = Parrot_pmc_new(interp, enum_class_CallContext);
else {
call_object = signature;
- VTABLE_morph(interp, call_object, PMCNULL);
+ Parrot_CallContext_morph(interp, call_object, PMCNULL);
}
set_call_from_varargs(interp, call_object, sig, args);
@@ -741,13 +741,13 @@ Parrot_pcc_build_sig_object_from_varargs(PARROT_INTERP, ARGIN_NULLOK(PMC *obj),
/* Regular arguments just set the value */
switch (type) {
case 'I':
- VTABLE_push_integer(interp, call_object, va_arg(args, INTVAL));
+ Parrot_CallContext_push_integer(interp, call_object, va_arg(args, INTVAL));
break;
case 'N':
- VTABLE_push_float(interp, call_object, va_arg(args, FLOATVAL));
+ Parrot_CallContext_push_float(interp, call_object, va_arg(args, FLOATVAL));
break;
case 'S':
- VTABLE_push_string(interp, call_object, va_arg(args, STRING *));
+ Parrot_CallContext_push_string(interp, call_object, va_arg(args, STRING *));
break;
case 'P':
{
@@ -758,7 +758,7 @@ Parrot_pcc_build_sig_object_from_varargs(PARROT_INTERP, ARGIN_NULLOK(PMC *obj),
++i; /* skip 'f' */
}
else {
- VTABLE_push_pmc(interp, call_object, pmc_arg);
+ Parrot_CallContext_push_pmc(interp, call_object, pmc_arg);
if (type_lookahead == 'i') {
if (i != 0)
Parrot_ex_throw_from_c_args(interp, NULL,
@@ -783,7 +783,7 @@ Parrot_pcc_build_sig_object_from_varargs(PARROT_INTERP, ARGIN_NULLOK(PMC *obj),
/* Add invocant to the front of the arguments iff needed */
if (!PMC_IS_NULL(obj) && append_pi)
- VTABLE_unshift_pmc(interp, call_object, obj);
+ Parrot_CallContext_unshift_pmc(interp, call_object, obj);
return call_object;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment