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);