[svn:parrot] r47125 - in trunk: . docs include/parrot src

plobsing at svn.parrot.org plobsing at svn.parrot.org
Sun May 30 02:28:49 UTC 2010


Author: plobsing
Date: Sun May 30 02:28:48 2010
New Revision: 47125
URL: https://trac.parrot.org/parrot/changeset/47125

Log:
eliminate unused fixup type 'label'

Modified:
   trunk/PBC_COMPAT
   trunk/docs/parrotbyte.pod
   trunk/include/parrot/packfile.h
   trunk/src/packdump.c
   trunk/src/packfile.c
   trunk/src/pbc_merge.c

Modified: trunk/PBC_COMPAT
==============================================================================
--- trunk/PBC_COMPAT	Sun May 30 01:56:17 2010	(r47124)
+++ trunk/PBC_COMPAT	Sun May 30 02:28:48 2010	(r47125)
@@ -28,6 +28,7 @@
 
 # please insert tab separated entries at the top of the list
 
+6.20	2010.05.29	plobsing	eliminate unused fixup type 'label'
 6.19	2010.05.27	plobsing	removed numerous core ops (TT #449)
 6.18	2010.05.25	cotto	removed ops.num
 6.17	2010.05.20	NotFound	store encoding of string constants

Modified: trunk/docs/parrotbyte.pod
==============================================================================
--- trunk/docs/parrotbyte.pod	Sun May 30 01:56:17 2010	(r47124)
+++ trunk/docs/parrotbyte.pod	Sun May 30 02:28:48 2010	(r47125)
@@ -166,10 +166,7 @@
   | label offset                              |
   +----------+----------+----------+----------+
 
-Fixup type B<0>, known as enum_fixup_label, has a label symbol and an offset
-into the bytecode.
-
-Fixup type B<1>, known as enum_fixup_sub, has a label symbol that is the name
+Fixup type B<enum_fixup_sub>, has a label symbol that is the name
 of the "sub" and an offset into the constant table, referencing a Sub, Closure
 or Coroutine PMC.
 

Modified: trunk/include/parrot/packfile.h
==============================================================================
--- trunk/include/parrot/packfile.h	Sun May 30 01:56:17 2010	(r47124)
+++ trunk/include/parrot/packfile.h	Sun May 30 02:28:48 2010	(r47125)
@@ -222,7 +222,6 @@
 
 typedef enum {
     enum_fixup_none,
-    enum_fixup_label,
     enum_fixup_sub
 } enum_fixup_t;
 

Modified: trunk/src/packdump.c
==============================================================================
--- trunk/src/packdump.c	Sun May 30 01:56:17 2010	(r47124)
+++ trunk/src/packdump.c	Sun May 30 02:28:48 2010	(r47125)
@@ -379,7 +379,6 @@
     for (i = 0; i < ft->fixup_count; ++i) {
         Parrot_io_printf(interp, "\t#%d\n", (int) i);
         switch (ft->fixups[i].type) {
-          case enum_fixup_label:
           case enum_fixup_sub:
             Parrot_io_printf(interp,
                         "\ttype => %d offs => %8d name => '%s',\n",

Modified: trunk/src/packfile.c
==============================================================================
--- trunk/src/packfile.c	Sun May 30 01:56:17 2010	(r47124)
+++ trunk/src/packfile.c	Sun May 30 02:28:48 2010	(r47125)
@@ -3331,7 +3331,6 @@
         /* fixup_entry type */
         ++size;
         switch (ft->fixups[i].type) {
-          case enum_fixup_label:
           case enum_fixup_sub:
             size += PF_size_cstring(ft->fixups[i].name);
             ++size; /* offset */
@@ -3373,7 +3372,6 @@
     for (i = 0; i < ft->fixup_count; ++i) {
         *cursor++ = (opcode_t) ft->fixups[i].type;
         switch (ft->fixups[i].type) {
-          case enum_fixup_label:
           case enum_fixup_sub:
             cursor    = PF_store_cstring(cursor, ft->fixups[i].name);
             *cursor++ = ft->fixups[i].offset;
@@ -3470,7 +3468,6 @@
         entry->type = PF_fetch_opcode(pf, &cursor);
 
         switch (entry->type) {
-          case enum_fixup_label:
           case enum_fixup_sub:
             entry->name   = PF_fetch_cstring(interp, pf, &cursor);
             entry->offset = PF_fetch_opcode(pf, &cursor);

Modified: trunk/src/pbc_merge.c
==============================================================================
--- trunk/src/pbc_merge.c	Sun May 30 01:56:17 2010	(r47124)
+++ trunk/src/pbc_merge.c	Sun May 30 02:28:48 2010	(r47125)
@@ -523,9 +523,6 @@
 
             /* Set new offset and bytecode pointer. */
             switch (copy->type) {
-                case enum_fixup_label:
-                    copy->offset = cur_entry->offset + inputs[i]->code_start;
-                    break;
                 case enum_fixup_sub:
                     copy->offset = cur_entry->offset + inputs[i]->const_start;
                     break;


More information about the parrot-commits mailing list