[svn:parrot] r41947 - in branches/pcc_reapply: include/parrot src
bacek at svn.parrot.org
bacek at svn.parrot.org
Tue Oct 20 04:23:30 UTC 2009
Author: bacek
Date: Tue Oct 20 04:23:29 2009
New Revision: 41947
URL: https://trac.parrot.org/parrot/changeset/41947
Log:
[cage] Get rid of old call_state structs and enums
Modified:
branches/pcc_reapply/include/parrot/call.h
branches/pcc_reapply/src/frame_builder.h
Modified: branches/pcc_reapply/include/parrot/call.h
==============================================================================
--- branches/pcc_reapply/include/parrot/call.h Tue Oct 20 03:35:45 2009 (r41946)
+++ branches/pcc_reapply/include/parrot/call.h Tue Oct 20 04:23:29 2009 (r41947)
@@ -49,98 +49,6 @@
#define CALLSIGNATURE_is_exception_SET(o) CALLSIGNATURE_flag_SET(is_exception, (o))
#define CALLSIGNATURE_is_exception_CLEAR(o) CALLSIGNATURE_flag_CLEAR(is_exception, (o))
-typedef enum call_state_mode {
- /* argument fetching/putting modes */
- CALL_STATE_SIG = 0x100, /* runops, nci. In case we're interfacing with
- C and va_lists. */
- CALL_STATE_OP = 0x200, /* get_, set_ ops. In case we're interfacing
- with Parrot code and get the signature from
- call_state_item.u.op. */
- CALL_S_D_MASK = 0x300, /* src/dest mask */
-
- CALL_STATE_FLATTEN = 0x400 /* whether we are busy in a :flat argument */
-} call_state_mode;
-
-typedef struct call_state_item {
- /* We have one call_state_item for both the caller (source,
- arguments/returns) and the callee (destination, parameters/results). */
- int mode; /* this specifies:
- - where we get our arguments from / where we put
- our parameters (from C code or from set_*,get_*)
- - if we're in the middle of a :flat */
-
- union {
- struct { /* In case the caller (or callee? FIXME) is C */
- void *ap; /* a ptr to va_list */
- const char *sig; /* C string describing the type of each argument */
- } sig;
-
- struct { /* In case the caller/callee was Parrot code: */
- opcode_t *pc; /* array of 'indexes' for each argument:
- - if it's a constant, the constant number
- - if it's a register, the register number */
- PMC *signature; /* a PMC array holding a Call_bits_enum_t
- signature for each argument */
- } op;
- } u;
-
- PMC *ctx; /* the source or destination context */
- INTVAL used; /* src: whether this argument has been consumed
- * (or: whether the previous arg has?) */
- INTVAL i; /* number of args/params already processed */
- INTVAL n; /* number of args/params to match.
- * may include :slurpys and :flats */
- INTVAL sig; /* type of current arg/param
- * (counting from 1, the i'th) */
-
- /* We might encounter a :flat. */
- /* FIXME bgeron: is this used for :slurpys?
- * I can't find a reference in slurpy-filling code. */
-
- PMC *slurp; /* PMC in which to put the args we slurp up
- * or source from where to flatten */
- INTVAL slurp_i; /* index of :flat/:slurpy arg/param to match */
- INTVAL slurp_n; /* number of :flat/:slurpy args/params to match */
-} call_state_item;
-
-typedef union UnionCallStateVal {
- struct _ptrs { /* or two pointers, both are defines */
- DPOINTER * _struct_val;
- PMC * _pmc_val;
- } _ptrs;
- struct _i {
- INTVAL _int_val; /* or 2 intvals */
- INTVAL _int_val2;
- } _i;
- FLOATVAL _num_val; /* or one float */
- struct parrot_string_t * _string_val; /* or a pointer to a string */
-} UnionCallStateVal;
-
-#define UVal_ptr(u) (u)._ptrs._struct_val
-#define UVal_pmc(u) (u)._ptrs._pmc_val
-#define UVal_int(u) (u)._i._int_val
-#define UVal_int2(u) (u)._i._int_val2
-#define UVal_num(u) (u)._num_val
-#define UVal_str(u) (u)._string_val
-
-typedef struct call_state {
- call_state_item src;
- call_state_item dest;
- UnionCallStateVal val;
- int n_actual_args; /* arguments incl. flatten */
- int optionals; /* sum of optionals */
- int params; /* sum of params */
- int first_named; /* param idx of 1st named */
- UINTVAL named_done; /* bit mask, 1 if named was assigned */
- STRING *name; /* name of argument if any */
- PMC *key; /* to iterate a flattening hash */
-} call_state;
-
-typedef enum arg_pass_t {
- PARROT_PASS_PARAMS = 0x00,
- PARROT_PASS_RESULTS = 0x01
-} arg_pass_t;
-
/* HEADERIZER BEGIN: src/call/pcc.c */
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
Modified: branches/pcc_reapply/src/frame_builder.h
==============================================================================
--- branches/pcc_reapply/src/frame_builder.h Tue Oct 20 03:35:45 2009 (r41946)
+++ branches/pcc_reapply/src/frame_builder.h Tue Oct 20 04:23:29 2009 (r41947)
@@ -56,30 +56,6 @@
/*
* helper funcs - get argument n
*/
-INTVAL get_nci_I(PARROT_INTERP, ARGMOD(call_state *st), int n);
-
-FLOATVAL get_nci_N(PARROT_INTERP, ARGMOD(call_state *st), int n);
-
-PARROT_WARN_UNUSED_RESULT
-PARROT_CANNOT_RETURN_NULL
-STRING*
-get_nci_S(PARROT_INTERP, ARGMOD(call_state *st), int n);
-
-PARROT_WARN_UNUSED_RESULT
-PARROT_CAN_RETURN_NULL
-PMC*
-get_nci_P(PARROT_INTERP, ARGMOD(call_state *st), int n);
-
-PARROT_WARN_UNUSED_RESULT
-PARROT_CAN_RETURN_NULL
-void*
-get_nci_p(PARROT_INTERP, ARGMOD(call_state *st), int n);
-
-#define GET_NCI_I(n) get_nci_I(interp, &st, (n))
-#define GET_NCI_S(n) get_nci_S(interp, &st, (n))
-#define GET_NCI_N(n) get_nci_N(interp, &st, (n))
-#define GET_NCI_P(n) get_nci_P(interp, &st, (n))
-#define GET_NCI_p(n) get_nci_p(interp, &st, (n))
/*
* if we have a delegated method like typeof_i_p, that returns an INTVAL
More information about the parrot-commits
mailing list