develooper Front page | perl.cvs.parrot | Postings from December 2008

[svn:parrot] r33888 - trunk/compilers/pirc/new

From:
kjs
Date:
December 14, 2008 08:37
Subject:
[svn:parrot] r33888 - trunk/compilers/pirc/new
Message ID:
20081214163707.1FA47CBA12@x12.develooper.com
Author: kjs
Date: Sun Dec 14 08:37:06 2008
New Revision: 33888

Modified:
   trunk/compilers/pirc/new/pircompunit.c
   trunk/compilers/pirc/new/pircompunit.h
   trunk/compilers/pirc/new/piremit.c

Log:
[pirc] remove unused codesize field from subroutine struct; endoffset - startoffset yields same value, if necessary.

Modified: trunk/compilers/pirc/new/pircompunit.c
==============================================================================
--- trunk/compilers/pirc/new/pircompunit.c	(original)
+++ trunk/compilers/pirc/new/pircompunit.c	Sun Dec 14 08:37:06 2008
@@ -297,7 +297,6 @@
     newsub->parameters  = NULL;
     newsub->statements  = NULL;
     newsub->flags       = 0;
-    newsub->codesize    = 0;
     newsub->startoffset = lexer->codesize; /* start offset in bytecode */
 
     init_hashtable(lexer, &newsub->symbols, HASHTABLE_SIZE_INIT);

Modified: trunk/compilers/pirc/new/pircompunit.h
==============================================================================
--- trunk/compilers/pirc/new/pircompunit.h	(original)
+++ trunk/compilers/pirc/new/pircompunit.h	Sun Dec 14 08:37:06 2008
@@ -308,9 +308,6 @@
     char const         *nsentry;       /* name by which the sub is stored in the namespace */
     char const         *methodname;    /* name of this sub by which it's stored as a method */
     int                 flags;         /* this sub's flags */
-    unsigned            codesize;      /* total number of integers to store for this sub:
-                                          1 for each op and 1 for each operand.
-                                        */
     int                 startoffset;   /* start offset in bytecode where this sub starts */
     int                 endoffset;     /* end offset in bytecode where this sub ends */
 

Modified: trunk/compilers/pirc/new/piremit.c
==============================================================================
--- trunk/compilers/pirc/new/piremit.c	(original)
+++ trunk/compilers/pirc/new/piremit.c	Sun Dec 14 08:37:06 2008
@@ -560,7 +560,6 @@
 
     /* iterate over all instructions and emit them */
     do {
-        fprintf(stderr, "%d integers needed for storing this sub\n", subiter->codesize);
         fprintf(stderr, "start offset of sub '%s' is: %d\tend offest: %d\n",
                     subiter->sub_name, subiter->startoffset, subiter->endoffset);
 



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About