[svn:parrot] r41845 - in branches/pcc_optimize_sig: include/parrot src/pmc
chromatic at svn.parrot.org
chromatic at svn.parrot.org
Wed Oct 14 01:06:15 UTC 2009
Author: chromatic
Date: Wed Oct 14 01:06:12 2009
New Revision: 41845
URL: https://trac.parrot.org/parrot/changeset/41845
Log:
[PMC] Added Pcc_cell array and counter to CallSignature PMC.
z
Modified:
branches/pcc_optimize_sig/include/parrot/call.h
branches/pcc_optimize_sig/src/pmc/callsignature.pmc
Modified: branches/pcc_optimize_sig/include/parrot/call.h
==============================================================================
--- branches/pcc_optimize_sig/include/parrot/call.h Tue Oct 13 19:58:49 2009 (r41844)
+++ branches/pcc_optimize_sig/include/parrot/call.h Wed Oct 14 01:06:12 2009 (r41845)
@@ -1,5 +1,5 @@
/* call.h
- * Copyright (C) 2001-2008, Parrot Foundation.
+ * Copyright (C) 2001-2009, Parrot Foundation.
* SVN Info
* $Id$
* Overview:
Modified: branches/pcc_optimize_sig/src/pmc/callsignature.pmc
==============================================================================
--- branches/pcc_optimize_sig/src/pmc/callsignature.pmc Tue Oct 13 19:58:49 2009 (r41844)
+++ branches/pcc_optimize_sig/src/pmc/callsignature.pmc Wed Oct 14 01:06:12 2009 (r41845)
@@ -19,6 +19,17 @@
*/
+typedef struct Pcc_cell
+{
+ union u {
+ PMC *p;
+ STRING *s;
+ INTVAL i;
+ FLOATVAL n;
+ };
+ struct Pcc_cell *next;
+} Pcc_cell;
+
#define CAPTURE_DATA_SIZE 2
#define CAPTURE_array_CREATE(i, obj) \
if (!PARROT_CAPTURE(obj)->array) \
@@ -28,6 +39,8 @@
PARROT_CAPTURE(obj)->hash = pmc_new((i), enum_class_Hash);
pmclass CallSignature extends Capture auto_attrs provides array provides hash {
+ ATTR struct Pcc_cell **positionals;
+ ATTR INTVAL num_positionals;
ATTR PMC *results; /* Storage for return arguments */
ATTR PMC *type_tuple; /* Cached argument types for multiple dispatch */
ATTR STRING *short_sig; /* Simple string signature args & returns */
@@ -45,11 +58,13 @@
*/
VTABLE void init() {
- Parrot_CallSignature_attributes * const sig_struct =
- (Parrot_CallSignature_attributes *) PMC_data(SELF);
+ Parrot_CallSignature_attributes * const attrs =
+ PMC_data_typed(SELF, Parrot_CallSignature_attributes *);
SUPER();
- sig_struct->type_tuple = PMCNULL;
- sig_struct->results = PMCNULL;
+ attrs->type_tuple = PMCNULL;
+ attrs->results = PMCNULL;
+ attrs->positionals = NULL;
+ attrs->num_positionals = 0;
}
/*
More information about the parrot-commits
mailing list