Author: leo
Date: Wed Aug 10 07:00:30 2005
New Revision: 8902
Modified:
branches/leo-ctx5/build_tools/build_nativecall.pl
branches/leo-ctx5/include/parrot/inter_call.h
branches/leo-ctx5/src/inter_call.c
Log:
switch nci argument passing func signatures for consistency
Modified: branches/leo-ctx5/build_tools/build_nativecall.pl
==============================================================================
--- branches/leo-ctx5/build_tools/build_nativecall.pl (original)
+++ branches/leo-ctx5/build_tools/build_nativecall.pl Wed Aug 10 07:00:30 2005
@@ -306,7 +306,7 @@ get_nci_P(Interp *interpreter, struct ca
static void
set_nci_I(Interp *interpreter, struct call_state *st, INTVAL val)
{
- Parrot_init_ret_nci(interpreter, "I", st);
+ Parrot_init_ret_nci(interpreter, st, "I");
UVal_int(st->val) = val;
Parrot_convert_arg(interpreter, st);
Parrot_store_arg(interpreter, st);
@@ -315,7 +315,7 @@ set_nci_I(Interp *interpreter, struct ca
static void
set_nci_N(Interp *interpreter, struct call_state *st, FLOATVAL val)
{
- Parrot_init_ret_nci(interpreter, "N", st);
+ Parrot_init_ret_nci(interpreter, st, "N");
UVal_num(st->val) = val;
Parrot_convert_arg(interpreter, st);
Parrot_store_arg(interpreter, st);
@@ -324,7 +324,7 @@ set_nci_N(Interp *interpreter, struct ca
static void
set_nci_S(Interp *interpreter, struct call_state *st, STRING *val)
{
- Parrot_init_ret_nci(interpreter, "S", st);
+ Parrot_init_ret_nci(interpreter, st, "S");
UVal_str(st->val) = val;
Parrot_convert_arg(interpreter, st);
Parrot_store_arg(interpreter, st);
@@ -333,7 +333,7 @@ set_nci_S(Interp *interpreter, struct ca
static void
set_nci_P(Interp *interpreter, struct call_state *st, PMC* val)
{
- Parrot_init_ret_nci(interpreter, "P", st);
+ Parrot_init_ret_nci(interpreter, st, "P");
UVal_pmc(st->val) = val;
Parrot_convert_arg(interpreter, st);
Parrot_store_arg(interpreter, st);
@@ -508,7 +508,7 @@ pcf_${return}_$params(Interp *interprete
$return_data
$temp_decl
$other_decl
- Parrot_init_arg_nci(interpreter, \"$sig\", &st);
+ Parrot_init_arg_nci(interpreter, &st, \"$sig\");
$extra_preamble
pointer = (func_t)D2FPTR(PMC_struct_val(self));
Modified: branches/leo-ctx5/include/parrot/inter_call.h
==============================================================================
--- branches/leo-ctx5/include/parrot/inter_call.h (original)
+++ branches/leo-ctx5/include/parrot/inter_call.h Wed Aug 10 07:00:30 2005
@@ -61,8 +61,8 @@ int Parrot_init_arg_op(Interp *, struct
struct parrot_regs_t *regs,
opcode_t *pc, struct call_state_1 *st);
-int Parrot_init_arg_nci(Interp *, const char *sig, struct call_state *st);
-int Parrot_init_ret_nci(Interp *, const char *sig, struct call_state *st);
+int Parrot_init_arg_nci(Interp *, struct call_state *st, const char *sig);
+int Parrot_init_ret_nci(Interp *, struct call_state *st, const char *sig);
int Parrot_fetch_arg(Interp *, struct call_state *st);
int Parrot_fetch_arg_nci(Interp *, struct call_state *st);
Modified: branches/leo-ctx5/src/inter_call.c
==============================================================================
--- branches/leo-ctx5/src/inter_call.c (original)
+++ branches/leo-ctx5/src/inter_call.c Wed Aug 10 07:00:30 2005
@@ -55,8 +55,8 @@ These functions return 0, if no argument
static int next_arg(Interp *, struct call_state_1 *st);
int
-Parrot_init_arg_nci(Interp *interpreter, const char *sig,
- struct call_state *st)
+Parrot_init_arg_nci(Interp *interpreter, struct call_state *st,
+ const char *sig)
{
Parrot_init_arg_op(interpreter, interpreter->code, interpreter->ctx.bp,
interpreter->current_args, &st->src);
@@ -66,8 +66,8 @@ Parrot_init_arg_nci(Interp *interpreter,
}
int
-Parrot_init_ret_nci(Interp *interpreter, const char *sig,
- struct call_state *st)
+Parrot_init_ret_nci(Interp *interpreter, struct call_state *st,
+ const char *sig)
{
/* TODO simplify all */
Parrot_init_arg_sig(interpreter, interpreter->code, interpreter->ctx.bp,