[svn:parrot] r42100 - in branches/context_unify: include/parrot src/pmc

bacek at svn.parrot.org bacek at svn.parrot.org
Mon Oct 26 10:05:45 UTC 2009


Author: bacek
Date: Mon Oct 26 10:05:44 2009
New Revision: 42100
URL: https://trac.parrot.org/parrot/changeset/42100

Log:
Copy ATTRs from CallSignature into Parrot_Context structure.

Modified:
   branches/context_unify/include/parrot/context.h
   branches/context_unify/src/pmc/callcontext.pmc
   branches/context_unify/src/pmc/callsignature.pmc

Modified: branches/context_unify/include/parrot/context.h
==============================================================================
--- branches/context_unify/include/parrot/context.h	Mon Oct 26 10:05:14 2009	(r42099)
+++ branches/context_unify/include/parrot/context.h	Mon Oct 26 10:05:44 2009	(r42100)
@@ -24,6 +24,21 @@
     INTVAL       *regs_i;
 } Regs_ni;
 
+/*
+Storage for arguments. Linkind list of typed pointers.
+We use lower 2 bits for setting type.
+*/
+typedef struct Pcc_cell
+{
+    union u {
+        PMC     *p;
+        STRING  *s;
+        INTVAL   i;
+        FLOATVAL n;
+    } u;
+    struct Pcc_cell *next;
+} Pcc_cell;
+
 struct Parrot_Context {
     PMC     *caller_ctx;      /* caller context */
     Regs_ni  bp;              /* pointers to FLOATVAL & INTVAL */
@@ -61,6 +76,16 @@
     /* code->prederefed.code - code->base.data in opcodes
      * to simplify conversion between code ptrs in e.g. invoke */
     size_t pred_offset;
+
+    struct Pcc_cell *positionals;          /* linked list of positionals */
+    PMC             *results;              /* Storage for return arguments */
+    PMC             *type_tuple;           /* Cached argument types for MDD */
+    STRING          *short_sig;            /* Simple string sig args & returns */
+    PMC             *arg_flags;            /* Integer array of argument flags */
+    PMC             *return_flags;         /* Integer array of return flags */
+    Hash            *hash;                 /* Hash of named arguments */
+    INTVAL           num_positionals;      /* count of positionals */
+
 };
 
 typedef struct Parrot_Context Parrot_Context;

Modified: branches/context_unify/src/pmc/callcontext.pmc
==============================================================================
--- branches/context_unify/src/pmc/callcontext.pmc	Mon Oct 26 10:05:14 2009	(r42099)
+++ branches/context_unify/src/pmc/callcontext.pmc	Mon Oct 26 10:05:44 2009	(r42100)
@@ -4,7 +4,7 @@
 
 =head1 NAME
 
-src/pmc/context.pmc - Interpreter Context.
+src/pmc/callcontext.pmc - Interpreter Context.
 
 =head1 DESCRIPTION
 
@@ -23,7 +23,7 @@
 #include "parrot/packfile.h"
 #include "pmc_sub.h"
 
-pmclass Context {
+pmclass CallContext {
 
 /*
 

Modified: branches/context_unify/src/pmc/callsignature.pmc
==============================================================================
--- branches/context_unify/src/pmc/callsignature.pmc	Mon Oct 26 10:05:14 2009	(r42099)
+++ branches/context_unify/src/pmc/callsignature.pmc	Mon Oct 26 10:05:44 2009	(r42100)
@@ -19,17 +19,6 @@
 
 */
 
-typedef struct Pcc_cell
-{
-    union u {
-        PMC     *p;
-        STRING  *s;
-        INTVAL   i;
-        FLOATVAL n;
-    } u;
-    struct Pcc_cell *next;
-} Pcc_cell;
-
 /* mask off lower two bits (1 + 2 = 3) for pointer tags */
 #define TAG_BITS 3
 #define UNTAG_CELL(c) INTVAL2PTR(Pcc_cell *, (PTR2INTVAL(c)) & ~TAG_BITS)


More information about the parrot-commits mailing list