[svn:parrot] r44924 - in branches/pcc_hackathon_6Mar10: include/parrot src/call src/ops
bacek at svn.parrot.org
bacek at svn.parrot.org
Sun Mar 14 11:03:09 UTC 2010
Author: bacek
Date: Sun Mar 14 11:03:08 2010
New Revision: 44924
URL: https://trac.parrot.org/parrot/changeset/44924
Log:
Pass error flag to check into fill_params. We are usually don't check RESULTS_COUNT
Modified:
branches/pcc_hackathon_6Mar10/include/parrot/call.h
branches/pcc_hackathon_6Mar10/src/call/args.c
branches/pcc_hackathon_6Mar10/src/ops/core.ops
Modified: branches/pcc_hackathon_6Mar10/include/parrot/call.h
==============================================================================
--- branches/pcc_hackathon_6Mar10/include/parrot/call.h Sun Mar 14 11:02:37 2010 (r44923)
+++ branches/pcc_hackathon_6Mar10/include/parrot/call.h Sun Mar 14 11:03:08 2010 (r44924)
@@ -212,7 +212,8 @@
void Parrot_pcc_fill_params_from_op(PARROT_INTERP,
ARGMOD_NULLOK(PMC *call_object),
ARGIN(PMC *raw_sig),
- ARGIN(opcode_t *raw_params))
+ ARGIN(opcode_t *raw_params),
+ Errors_classes direction)
__attribute__nonnull__(1)
__attribute__nonnull__(3)
__attribute__nonnull__(4)
Modified: branches/pcc_hackathon_6Mar10/src/call/args.c
==============================================================================
--- branches/pcc_hackathon_6Mar10/src/call/args.c Sun Mar 14 11:02:37 2010 (r44923)
+++ branches/pcc_hackathon_6Mar10/src/call/args.c Sun Mar 14 11:03:08 2010 (r44924)
@@ -167,7 +167,8 @@
ARGMOD_NULLOK(PMC *call_object),
ARGIN(PMC *raw_sig),
ARGIN(void *arg_info),
- ARGIN(struct pcc_set_funcs *accessor))
+ ARGIN(struct pcc_set_funcs *accessor),
+ Errors_classes direction)
__attribute__nonnull__(1)
__attribute__nonnull__(3)
__attribute__nonnull__(4)
@@ -943,7 +944,7 @@
/*
=item C<static void fill_params(PARROT_INTERP, PMC *call_object, PMC *raw_sig,
-void *arg_info, struct pcc_set_funcs *accessor)>
+void *arg_info, struct pcc_set_funcs *accessor, Errors_classes direction)>
Gets args for the current function call and puts them into position.
First it gets the positional non-slurpy parameters, then the positional
@@ -956,7 +957,9 @@
static void
fill_params(PARROT_INTERP, ARGMOD_NULLOK(PMC *call_object),
- ARGIN(PMC *raw_sig), ARGIN(void *arg_info), ARGIN(struct pcc_set_funcs *accessor))
+ ARGIN(PMC *raw_sig), ARGIN(void *arg_info),
+ ARGIN(struct pcc_set_funcs *accessor),
+ Errors_classes direction)
{
ASSERT_ARGS(fill_params)
INTVAL *raw_params;
@@ -972,7 +975,7 @@
/* Check if we should be throwing errors. This is configured separately
* for parameters and return values. */
- if (PARROT_ERRORS_test(interp, PARROT_ERRORS_PARAM_COUNT_FLAG))
+ if (PARROT_ERRORS_test(interp, direction))
err_check = 1;
/* A null call object is fine if there are no arguments and no returns. */
@@ -1406,13 +1409,16 @@
/*
=item C<void Parrot_pcc_fill_params_from_op(PARROT_INTERP, PMC *call_object, PMC
-*raw_sig, opcode_t *raw_params)>
+*raw_sig, opcode_t *raw_params, Errors_classes direction)>
Gets args for the current function call and puts them into position.
First it gets the positional non-slurpy parameters, then the positional
slurpy parameters, then the named parameters, and finally the named
slurpy parameters.
+C<direction> used to distinguish set_returns vs set_params for checking
+different flags.
+
=cut
*/
@@ -1420,7 +1426,7 @@
PARROT_EXPORT
void
Parrot_pcc_fill_params_from_op(PARROT_INTERP, ARGMOD_NULLOK(PMC *call_object),
- ARGIN(PMC *raw_sig), ARGIN(opcode_t *raw_params))
+ ARGIN(PMC *raw_sig), ARGIN(opcode_t *raw_params), Errors_classes direction)
{
ASSERT_ARGS(Parrot_pcc_fill_params_from_op)
@@ -1436,7 +1442,7 @@
(pmc_func_t)pmc_constant_from_op,
};
- fill_params(interp, call_object, raw_sig, raw_params, &function_pointers);
+ fill_params(interp, call_object, raw_sig, raw_params, &function_pointers, direction);
}
/*
@@ -1514,7 +1520,8 @@
parse_signature_string(interp, signature, &raw_sig);
- fill_params(interp, call_object, raw_sig, args, &function_pointers);
+ fill_params(interp, call_object, raw_sig, args, &function_pointers,
+ PARROT_ERRORS_PARAM_COUNT_FLAG);
}
/*
Modified: branches/pcc_hackathon_6Mar10/src/ops/core.ops
==============================================================================
--- branches/pcc_hackathon_6Mar10/src/ops/core.ops Sun Mar 14 11:02:37 2010 (r44923)
+++ branches/pcc_hackathon_6Mar10/src/ops/core.ops Sun Mar 14 11:03:08 2010 (r44924)
@@ -522,7 +522,8 @@
caller_ctx = Parrot_pcc_get_caller_ctx(interp, ctx);
call_object = Parrot_pcc_get_signature(interp, caller_ctx);
- Parrot_pcc_fill_params_from_op(interp, call_object, signature, raw_params);
+ Parrot_pcc_fill_params_from_op(interp, call_object, signature, raw_params,
+ PARROT_ERRORS_PARAM_COUNT_FLAG);
/* TODO Factor out with Sub.invoke */
if (PObj_get_FLAGS(ccont) & SUB_FLAG_TAILCALL) {
@@ -561,7 +562,8 @@
call_object = Parrot_pcc_get_signature(interp, ctx);
- Parrot_pcc_fill_params_from_op(interp, call_object, signature, raw_params);
+ Parrot_pcc_fill_params_from_op(interp, call_object, signature, raw_params,
+ PARROT_ERRORS_RESULT_COUNT_FLAG);
argc = VTABLE_elements(interp, signature);
goto OFFSET(argc + 2);
More information about the parrot-commits
mailing list