[svn:parrot] r44781 - in branches/pcc_hackathon_6Mar10: include/parrot src/call
allison at svn.parrot.org
allison at svn.parrot.org
Mon Mar 8 23:53:56 UTC 2010
Author: allison
Date: Mon Mar 8 23:53:51 2010
New Revision: 44781
URL: https://trac.parrot.org/parrot/changeset/44781
Log:
[pcc] Removed two deprecated and unused functions for setting return arguments
in the old-style PCC.
Modified:
branches/pcc_hackathon_6Mar10/include/parrot/call.h
branches/pcc_hackathon_6Mar10/src/call/args.c
Modified: branches/pcc_hackathon_6Mar10/include/parrot/call.h
==============================================================================
--- branches/pcc_hackathon_6Mar10/include/parrot/call.h Mon Mar 8 23:11:26 2010 (r44780)
+++ branches/pcc_hackathon_6Mar10/include/parrot/call.h Mon Mar 8 23:53:51 2010 (r44781)
@@ -230,15 +230,6 @@
FUNC_MODIFIES(*call_object)
FUNC_MODIFIES(*args);
-PARROT_EXPORT
-void Parrot_pcc_fill_returns_from_c_args(PARROT_INTERP,
- ARGMOD_NULLOK(PMC *call_object),
- ARGIN(const char *signature),
- ...)
- __attribute__nonnull__(1)
- __attribute__nonnull__(3)
- FUNC_MODIFIES(*call_object);
-
void Parrot_pcc_merge_signature_for_tailcall(PARROT_INTERP,
ARGMOD_NULLOK(PMC * parent),
ARGMOD_NULLOK(PMC * tailcall))
@@ -304,10 +295,6 @@
, PARROT_ASSERT_ARG(call_object) \
, PARROT_ASSERT_ARG(signature) \
, PARROT_ASSERT_ARG(args))
-#define ASSERT_ARGS_Parrot_pcc_fill_returns_from_c_args \
- __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(signature))
#define ASSERT_ARGS_Parrot_pcc_merge_signature_for_tailcall \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
Modified: branches/pcc_hackathon_6Mar10/src/call/args.c
==============================================================================
--- branches/pcc_hackathon_6Mar10/src/call/args.c Mon Mar 8 23:11:26 2010 (r44780)
+++ branches/pcc_hackathon_6Mar10/src/call/args.c Mon Mar 8 23:53:51 2010 (r44781)
@@ -182,17 +182,6 @@
__attribute__nonnull__(5)
FUNC_MODIFIES(*call_object);
-static void fill_results(PARROT_INTERP,
- ARGMOD_NULLOK(PMC *call_object),
- ARGIN(PMC *raw_sig),
- ARGIN(void *return_info),
- ARGIN(struct pcc_get_funcs *accessor))
- __attribute__nonnull__(1)
- __attribute__nonnull__(3)
- __attribute__nonnull__(4)
- __attribute__nonnull__(5)
- FUNC_MODIFIES(*call_object);
-
PARROT_CANNOT_RETURN_NULL
static INTVAL intval_arg_from_c_args(PARROT_INTERP,
ARGIN(va_list *args),
@@ -418,11 +407,6 @@
, PARROT_ASSERT_ARG(raw_sig) \
, PARROT_ASSERT_ARG(arg_info) \
, PARROT_ASSERT_ARG(accessor))
-#define ASSERT_ARGS_fill_results __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(raw_sig) \
- , PARROT_ASSERT_ARG(return_info) \
- , PARROT_ASSERT_ARG(accessor))
#define ASSERT_ARGS_intval_arg_from_c_args __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(args))
@@ -1576,593 +1560,6 @@
/*
-=item C<static void fill_results(PARROT_INTERP, PMC *call_object, PMC *raw_sig,
-void *return_info, struct pcc_get_funcs *accessor)>
-
-Gets return values for the current return and puts them into position.
-First it gets the positional non-slurpy returns, then the positional
-slurpy returns, then the named returns, and finally the named
-slurpy returns.
-
-=cut
-
-*/
-
-static void
-fill_results(PARROT_INTERP, ARGMOD_NULLOK(PMC *call_object),
- ARGIN(PMC *raw_sig), ARGIN(void *return_info), ARGIN(struct pcc_get_funcs *accessor))
-{
- ASSERT_ARGS(fill_results)
- INTVAL *return_array = NULL;
- INTVAL *result_array = NULL;
- PMC *result_sig = NULL;
- PMC * const ctx = CURRENT_CONTEXT(interp);
- PMC *named_used_list = PMCNULL;
- PMC *named_return_list = PMCNULL;
- INTVAL return_index = 0;
- INTVAL return_subindex = 0;
- INTVAL result_index = 0;
- INTVAL positional_index = 0;
- INTVAL named_count = 0;
- INTVAL err_check = 0;
- INTVAL positional_returns = 0; /* initialized by a loop later */
- INTVAL i = 0; /* used by the initialization loop */
- INTVAL return_count;
- INTVAL result_count;
-
- /* Check if we should be throwing errors. This is configured separately
- * for parameters and return values. */
- if (PARROT_ERRORS_test(interp, PARROT_ERRORS_RESULT_COUNT_FLAG))
- err_check = 1;
-
- GETATTR_FixedIntegerArray_size(interp, raw_sig, return_count);
-
- /* A null call object is fine if there are no returns and no results. */
- if (PMC_IS_NULL(call_object)) {
- /* If the return_count is 0, then there are no return values waiting to
- * fill the results, so no error. */
- if (return_count > 0 && err_check)
- Parrot_ex_throw_from_c_args(interp, NULL,
- EXCEPTION_INVALID_OPERATION,
- "too few returns: 0 passed, %d expected", return_count);
-
- return;
- }
-
- GETATTR_CallContext_return_flags(interp, call_object, result_sig);
-
- result_count = csr_returns_count(interp, call_object);
- PARROT_ASSERT((result_count == 0) || !PMC_IS_NULL(result_sig));
-
- GETATTR_FixedIntegerArray_int_array(interp, raw_sig, return_array);
- if (!PMC_IS_NULL(result_sig))
- GETATTR_FixedIntegerArray_int_array(interp, result_sig, result_array);
-
- /* the call obj doesn't have the returns as positionals.
- * instead count number of returns before first named return */
- for (i = 0; i < return_count; i++) {
- const INTVAL flags = return_array[i];
- if (flags & PARROT_ARG_NAME)
- break;
-
- positional_returns++;
- }
-
- /*
- Parrot_io_eprintf(interp,
- "return_count: %d\nresult_count: %d\npositional_returns: %d\nraw_sig: %S\nresult_sig: %S\n",
- return_count, result_count, positional_returns, VTABLE_get_repr(interp, raw_sig),
- VTABLE_get_repr(interp, result_sig));
- */
-
- while (1) {
- INTVAL result_flags;
-
- /* Check if we've used up all the results. */
- if (result_index >= result_count) {
- if (return_index >= return_count) {
- /* We've used up all returns and results, we're
- * done with the whole process. */
- return;
- }
- else if (err_check) {
- /* We've used up all the results, but have extra positional
- * returns left over. */
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,
- "too many positional returns: %d passed, %d expected",
- return_index, result_count);
- }
- return;
- }
-
- result_flags = result_array[result_index];
-
- /* If the result is slurpy, collect all remaining positional
- * returns into an array.*/
- if (result_flags & PARROT_ARG_SLURPY_ARRAY) {
- PMC *collect_positional;
-
- /* Can't handle named slurpy here, go on to named return handling. */
- if (result_flags & PARROT_ARG_NAME)
- break;
-
- if (named_count > 0)
- Parrot_ex_throw_from_c_args(interp, NULL,
- EXCEPTION_INVALID_OPERATION,
- "named results must follow all positional results");
-
- collect_positional = Parrot_pmc_new(interp,
- Parrot_get_ctx_HLL_type(interp, enum_class_ResizablePMCArray));
-
- /* Iterate over all positional returns in the list. */
- while (1) {
- INTVAL constant;
- INTVAL return_flags;
- if (return_index >= return_count)
- break; /* no more returns */
-
- return_flags = return_array[return_index];
-
- if (return_flags & PARROT_ARG_NAME)
- break; /* stop at named returns */
-
- constant = PARROT_ARG_CONSTANT_ISSET(return_flags);
- switch (PARROT_ARG_TYPE_MASK_MASK(return_flags)) {
- case PARROT_ARG_INTVAL:
- VTABLE_push_integer(interp, collect_positional, constant?
- accessor->intval_constant(interp, return_info, return_index)
- :accessor->intval(interp, return_info, return_index));
- break;
- case PARROT_ARG_FLOATVAL:
- VTABLE_push_float(interp, collect_positional, constant?
- accessor->numval_constant(interp, return_info, return_index)
- :accessor->numval(interp, return_info, return_index));
- break;
- case PARROT_ARG_STRING:
- VTABLE_push_string(interp, collect_positional, constant?
- accessor->string_constant(interp, return_info, return_index)
- :accessor->string(interp, return_info, return_index));
- break;
- case PARROT_ARG_PMC:
- {
- PMC *return_item = (constant)
- ? accessor->pmc_constant(interp, return_info, return_index)
- : accessor->pmc(interp, return_info, return_index);
- if (return_flags & PARROT_ARG_FLATTEN) {
- INTVAL flat_pos;
- INTVAL flat_elems;
- if (!VTABLE_does(interp, return_item, CONST_STRING(interp, "array"))) {
- Parrot_ex_throw_from_c_args(interp, NULL,
- EXCEPTION_INVALID_OPERATION,
- "flattened return on a non-array");
- }
- flat_elems = VTABLE_elements(interp, return_item);
- for (flat_pos = 0; flat_pos < flat_elems; flat_pos++) {
- /* fetch an item out of the aggregate */
- VTABLE_push_pmc(interp, collect_positional,
- VTABLE_get_pmc_keyed_int(interp, return_item, flat_pos));
- }
- }
- else
- VTABLE_push_pmc(interp, collect_positional, return_item);
- break;
- }
- default:
- Parrot_ex_throw_from_c_args(interp, NULL,
- EXCEPTION_INVALID_OPERATION, "invalid return type");
- break;
- }
- return_index++;
- }
- csr_fill_pmc(interp, call_object, result_index, collect_positional);
- result_index++;
- break; /* Terminate the positional return loop. */
- }
-
- /* We have a positional return, fill the result with it. */
- if (return_index < positional_returns) {
- INTVAL return_flags = return_array[return_index];
- INTVAL constant = PARROT_ARG_CONSTANT_ISSET(return_flags);
-
- /* Fill a named result with a positional return. */
- if (result_flags & PARROT_ARG_NAME) {
- STRING *result_name;
- if (!(result_flags & PARROT_ARG_STRING))
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,
- "named results must have a name specified 1683");
- result_name = csr_get_string_keyed_int(interp, call_object, result_index);
- named_count++;
- result_index++;
- if (result_index >= result_count)
- continue;
- result_flags = result_array[result_index];
-
- /* Mark the name as used, cannot be filled again. */
- if (PMC_IS_NULL(named_used_list)) /* Only created if needed. */
- named_used_list = Parrot_pmc_new(interp,
- Parrot_get_ctx_HLL_type(interp, enum_class_Hash));
- VTABLE_set_integer_keyed_str(interp, named_used_list, result_name, 1);
- }
- else if (named_count > 0) {
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,
- "named results must follow all positional results");
- }
-
- /* Check for :lookahead result goes here. */
-
- /* Go ahead and fill the result with a positional return. */
- switch (PARROT_ARG_TYPE_MASK_MASK(return_flags)) {
- case PARROT_ARG_INTVAL:
- if (constant)
- csr_fill_integer(interp, call_object, result_index,
- accessor->intval_constant(interp, return_info, return_index));
- else
- csr_fill_integer(interp, call_object, result_index,
- accessor->intval(interp, return_info, return_index));
- break;
- case PARROT_ARG_FLOATVAL:
- if (constant)
- csr_fill_number(interp, call_object, result_index,
- accessor->numval_constant(interp, return_info, return_index));
- else
- csr_fill_number(interp, call_object, result_index,
- accessor->numval(interp, return_info, return_index));
- break;
- case PARROT_ARG_STRING:
- if (constant)
- csr_fill_string(interp, call_object, result_index,
- accessor->string_constant(interp, return_info, return_index));
- else
- csr_fill_string(interp, call_object, result_index,
- accessor->string(interp, return_info, return_index));
- break;
- case PARROT_ARG_PMC:
- {
- PMC *return_item = (constant)
- ? accessor->pmc_constant(interp, return_info, return_index)
- : accessor->pmc(interp, return_info, return_index);
- if (return_flags & PARROT_ARG_FLATTEN) {
- INTVAL flat_elems;
- if (!VTABLE_does(interp, return_item, CONST_STRING(interp, "array"))) {
- Parrot_ex_throw_from_c_args(interp, NULL,
- EXCEPTION_INVALID_OPERATION,
- "flattened return on a non-array");
- }
- flat_elems = VTABLE_elements(interp, return_item);
- if (flat_elems == 0) {
- /* Skip empty aggregate */
- break;
- }
- if (return_subindex < flat_elems) {
- /* fetch an item out of the aggregate */
- return_item = VTABLE_get_pmc_keyed_int(interp, return_item,
- return_subindex);
- return_subindex++;
- }
- if (return_subindex >= flat_elems) {
- return_subindex = 0; /* reset */
- }
- else {
- return_index--; /* we want to stay on the same item */
- }
- }
- csr_fill_pmc(interp, call_object, result_index, return_item);
- break;
- }
- default:
- Parrot_ex_throw_from_c_args(interp, NULL,
- EXCEPTION_INVALID_OPERATION, "invalid return type");
- break;
- }
-
- /* Mark the option flag for the filled result. */
- if (result_flags & PARROT_ARG_OPTIONAL) {
- if (result_index + 1 < result_count) {
- const INTVAL next_result_flags = result_array[result_index + 1];
- if (next_result_flags & PARROT_ARG_OPT_FLAG) {
- result_index++;
- csr_fill_integer(interp, call_object, result_index, 1);
- }
- }
- }
- }
- /* We have no more positional returns, fill the optional result
- * with a default value. */
- else if (result_flags & PARROT_ARG_OPTIONAL) {
- /* We don't handle optional named results here, handle them in the
- * next loop. */
- if (result_flags & PARROT_ARG_NAME)
- break;
-
- assign_default_result_value(interp, call_object, result_index, result_flags);
-
- /* Mark the option flag for the result to FALSE, it was filled
- * with a default value. */
- if (result_index + 1 < result_count) {
- const INTVAL next_result_flags = result_array[result_index + 1];
- if (next_result_flags & PARROT_ARG_OPT_FLAG) {
- result_index++;
- csr_fill_integer(interp, call_object, result_index, 0);
- }
- }
- }
- /* We don't have an return for the result, and it's not optional,
- * so it's an error. */
- else {
- /* We don't handle named results here, go to the next loop. */
- if (result_flags & PARROT_ARG_NAME)
- break;
-
- if (err_check)
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,
- "too few positional returns: %d passed, %d (or more) expected",
- positional_returns, result_index + 1);
- }
-
- /* Go on to next return and result. */
- return_index++;
- result_index++;
- }
-
- for (; return_index < return_count; return_index++) {
- STRING *return_name;
- INTVAL return_flags;
- INTVAL constant;
-
- return_flags = return_array[return_index];
-
- /* All remaining returns must be named. */
- if (!(return_flags & PARROT_ARG_NAME))
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,
- "named returns must follow all positional returns");
-
- if (!(return_flags & PARROT_ARG_STRING))
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,
- "named results must have a name specified 1836");
-
- return_name = PARROT_ARG_CONSTANT_ISSET(return_flags)
- ? accessor->string_constant(interp, return_info, return_index)
- : accessor->string(interp, return_info, return_index);
- named_count++;
- return_index++;
- if (result_index >= result_count)
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,
- "named returns must have a value");
-
- return_flags = return_array[return_index];
-
- if (PMC_IS_NULL(named_return_list)) /* Only created if needed. */
- named_return_list = Parrot_pmc_new(interp,
- Parrot_get_ctx_HLL_type(interp, enum_class_Hash));
-
- if (VTABLE_exists_keyed_str(interp, named_return_list, return_name))
- continue;
-
- constant = PARROT_ARG_CONSTANT_ISSET(return_flags);
- switch (PARROT_ARG_TYPE_MASK_MASK(return_flags)) {
- case PARROT_ARG_INTVAL:
- VTABLE_set_integer_keyed_str(interp, named_return_list, return_name,
- constant
- ? accessor->intval_constant(interp, return_info, return_index)
- : accessor->intval(interp, return_info, return_index));
- break;
- case PARROT_ARG_FLOATVAL:
- VTABLE_set_number_keyed_str(interp, named_return_list, return_name,
- constant
- ? accessor->numval_constant(interp, return_info, return_index)
- : accessor->numval(interp, return_info, return_index));
- break;
- case PARROT_ARG_STRING:
- VTABLE_set_string_keyed_str(interp, named_return_list, return_name,
- constant
- ? accessor->string_constant(interp, return_info, return_index)
- : accessor->string(interp, return_info, return_index));
- break;
- case PARROT_ARG_PMC:
- if (0) {
- PMC * const return_item = (constant)
- ? accessor->pmc_constant(interp, return_info, return_index)
- : accessor->pmc(interp, return_info, return_index);
- if (return_flags & PARROT_ARG_FLATTEN) {
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,
- "named flattened returns not yet implemented");
- }
- VTABLE_set_pmc_keyed_str(interp, named_return_list, return_name, return_item);
- break;
- }
- default:
- Parrot_ex_throw_from_c_args(interp, NULL,
- EXCEPTION_INVALID_OPERATION, "invalid return type");
- break;
- }
- }
-
- /* Now iterate over the named results, filling them from the
- * temporary hash of named returns. */
- while (1) {
- STRING *result_name = NULL;
- INTVAL result_flags;
-
- /* Check if we've used up all the results. We'll check for leftover
- * named returns after the loop. */
- if (result_index >= result_count)
- break;
-
- result_flags = result_array[result_index];
-
- /* All remaining results must be named. */
- if (!(result_flags & PARROT_ARG_NAME))
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,
- "named results must follow all positional results");
-
- /* Collected ("slurpy") named result */
- if (result_flags & PARROT_ARG_SLURPY_ARRAY) {
- if (PMC_IS_NULL(named_return_list))
- named_return_list = Parrot_pmc_new(interp,
- Parrot_get_ctx_HLL_type(interp, enum_class_Hash));
-
- csr_fill_pmc(interp, call_object, result_index, named_return_list);
- break; /* End of named results. */
- }
-
- /* Store the name. */
- if (!(result_flags & PARROT_ARG_STRING))
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,
- "named results must have a name specified 1926");
- result_name = csr_get_string_keyed_int(interp, call_object, result_index);
-
- if (!STRING_IS_NULL(result_name)) {
- /* The next result is the actual value. */
- result_index++;
- if (result_index >= result_count)
- continue;
- result_flags = result_array[result_index];
-
- if (VTABLE_exists_keyed_str(interp, named_return_list, result_name)) {
-
- named_count++;
-
- /* Fill the named result. */
- switch (PARROT_ARG_TYPE_MASK_MASK(result_flags)) {
- case PARROT_ARG_INTVAL:
- csr_fill_integer(interp, call_object, result_index,
- VTABLE_get_integer_keyed_str(interp, named_return_list, result_name));
- break;
- case PARROT_ARG_FLOATVAL:
- csr_fill_number(interp, call_object, result_index,
- VTABLE_get_number_keyed_str(interp, named_return_list, result_name));
- break;
- case PARROT_ARG_STRING:
- csr_fill_string(interp, call_object, result_index,
- VTABLE_get_string_keyed_str(interp, named_return_list, result_name));
- break;
- case PARROT_ARG_PMC:
- csr_fill_pmc(interp, call_object, result_index,
- VTABLE_get_pmc_keyed_str(interp, named_return_list, result_name));
- break;
- default:
- Parrot_ex_throw_from_c_args(interp, NULL,
- EXCEPTION_INVALID_OPERATION, "invalid result type");
- break;
- }
- VTABLE_delete_keyed_str(interp, named_return_list, result_name);
-
- /* Mark the option flag for the filled result. */
- if (result_flags & PARROT_ARG_OPTIONAL) {
- if (result_index + 1 < result_count) {
- const INTVAL next_result_flags = return_array[result_index + 1];
- if (next_result_flags & PARROT_ARG_OPT_FLAG) {
- result_index++;
- csr_fill_integer(interp, call_object, result_index, 1);
- }
- }
- }
- }
- else if (result_flags & PARROT_ARG_OPTIONAL) {
- assign_default_result_value(interp, call_object, result_index, result_flags);
-
- /* Mark the option flag for the result to FALSE, it was filled
- * with a default value. */
- if (result_index + 1 < result_count) {
- const INTVAL next_result_flags = result_array[result_index + 1];
- if (next_result_flags & PARROT_ARG_OPT_FLAG) {
- result_index++;
- csr_fill_integer(interp, call_object, result_index, 1);
- }
- }
- }
- /* We don't have a return for the result, and it's not optional,
- * so it's an error. */
- else {
- if (err_check)
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,
- "too few named returns: no return for required result '%S'",
- result_name);
- }
- }
-
- result_index++;
- }
-
- /* Double check that all named returns were assigned to results. */
- if (err_check) {
- if (!PMC_IS_NULL(named_return_list)) {
- const INTVAL named_return_count = VTABLE_elements(interp, named_return_list);
- if (named_return_count > 0)
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,
- "too many named returns: %d passed, %d used",
- named_return_count + named_count, named_count);
- }
- }
-
-}
-
-
-/*
-
-=item C<void Parrot_pcc_fill_returns_from_c_args(PARROT_INTERP, PMC
-*call_object, const char *signature, ...)>
-
-Sets return values for the current function call. First it sets the
-positional returns, then the named returns.
-
-The signature is a string in the format used for
-C<Parrot_pcc_invoke_from_sig_object>, but with only return arguments.
-The parameters are passed in as a list of INTVAL, FLOATVAL, STRING *, or
-PMC * variables.
-
-
-=cut
-
-*/
-
-PARROT_EXPORT
-void
-Parrot_pcc_fill_returns_from_c_args(PARROT_INTERP, ARGMOD_NULLOK(PMC *call_object),
- ARGIN(const char *signature), ...)
-{
- ASSERT_ARGS(Parrot_pcc_fill_returns_from_c_args)
- va_list args;
- INTVAL raw_return_count = 0;
- PMC *raw_sig = PMCNULL;
-
- static pcc_get_funcs function_pointers = {
- (intval_func_t)intval_arg_from_c_args,
- (numval_func_t)numval_arg_from_c_args,
- (string_func_t)string_arg_from_c_args,
- (pmc_func_t)pmc_arg_from_c_args,
-
- (intval_func_t)intval_constant_from_varargs,
- (numval_func_t)numval_constant_from_varargs,
- (string_func_t)string_constant_from_varargs,
- (pmc_func_t)pmc_constant_from_varargs,
- };
-
- parse_signature_string(interp, signature, &raw_sig);
-
- raw_return_count = VTABLE_elements(interp, raw_sig);
-
- /* A null call object is fine if there are no arguments and no returns. */
- if (PMC_IS_NULL(call_object)) {
-
- /* Check if we should be throwing errors. This is configured separately
- * for parameters and return values. */
- if (raw_return_count > 0
- && PARROT_ERRORS_test(interp, PARROT_ERRORS_RESULT_COUNT_FLAG))
- Parrot_ex_throw_from_c_args(interp, NULL,
- EXCEPTION_INVALID_OPERATION,
- "too many return values: %d passed, 0 expected",
- raw_return_count);
- return;
- }
-
- va_start(args, signature);
- fill_results(interp, call_object, raw_sig, &args, &function_pointers);
- va_end(args);
-}
-
-/*
-
=item C<void Parrot_pcc_split_signature_string(PARROT_INTERP, const char
*signature, char **arg_sig, char **return_sig)>
More information about the parrot-commits
mailing list