[svn:parrot] r49319 - trunk/src
plobsing at svn.parrot.org
plobsing at svn.parrot.org
Sat Sep 25 04:16:03 UTC 2010
Author: plobsing
Date: Sat Sep 25 04:16:03 2010
New Revision: 49319
URL: https://trac.parrot.org/parrot/changeset/49319
Log:
eliminate some dead code
Modified:
trunk/src/packout.c
Modified: trunk/src/packout.c
==============================================================================
--- trunk/src/packout.c Sat Sep 25 04:12:26 2010 (r49318)
+++ trunk/src/packout.c Sat Sep 25 04:16:03 2010 (r49319)
@@ -305,96 +305,6 @@
/*
-=item C<static opcode_t * PackFile_Constant_pack_key(PARROT_INTERP, PMC *self,
-const PackFile_ConstTable *const_table, opcode_t *cursor)>
-
-Pack a Key constant into a contiguous region of memory.
-
-The data is zero-padded to an opcode_t-boundary, so pad bytes may be added.
-(Note this padding is not yet implemented for FLOATVALs.)
-
-=cut
-
-*/
-
-PARROT_CANNOT_RETURN_NULL
-PARROT_WARN_UNUSED_RESULT
-static opcode_t *
-PackFile_Constant_pack_key(PARROT_INTERP,
- ARGIN(PMC *self),
- ARGIN(const PackFile_ConstTable *const_table),
- ARGOUT(opcode_t *cursor))
-{
- ASSERT_ARGS(PackFile_Constant_pack_key)
- size_t i;
- PMC *key;
-
- for (i = 0, key = self; key; ++i){
- GETATTR_Key_next_key(interp, key, key);
- }
-
- /* number of key components */
- *cursor++ = i;
- /* and now type / value per component */
- for (key = self; key;) {
- const opcode_t type = PObj_get_FLAGS(key);
-
- switch (type & KEY_type_FLAGS) {
- case KEY_integer_FLAG:
- *cursor++ = PARROT_ARG_IC;
- GETATTR_Key_int_key(interp, key, *cursor++);
- break;
- case KEY_number_FLAG:
- {
- FLOATVAL n;
- GETATTR_Key_num_key(interp, key, n);
- *cursor++ = PARROT_ARG_NC;
- /* Argh */
- *cursor++ = PackFile_ConstTable_rlookup_num(interp, const_table, n);
- PARROT_ASSERT(cursor[-1] >= 0);
- }
- break;
-
- case KEY_string_FLAG:
- {
- STRING *s;
- GETATTR_Key_str_key(interp, key, s);
- *cursor++ = PARROT_ARG_SC;
- /* Argh */
- *cursor++ = PackFile_ConstTable_rlookup_str(interp, const_table, s);
- PARROT_ASSERT(cursor[-1] >= 0);
- }
- break;
-
- case KEY_integer_FLAG | KEY_register_FLAG:
- *cursor++ = PARROT_ARG_I;
- GETATTR_Key_int_key(interp, key, *cursor++);
- break;
- case KEY_number_FLAG | KEY_register_FLAG:
- *cursor++ = PARROT_ARG_N;
- GETATTR_Key_int_key(interp, key, *cursor++);
- break;
- case KEY_string_FLAG | KEY_register_FLAG:
- *cursor++ = PARROT_ARG_S;
- GETATTR_Key_int_key(interp, key, *cursor++);
- break;
- case KEY_pmc_FLAG | KEY_register_FLAG:
- *cursor++ = PARROT_ARG_P;
- GETATTR_Key_int_key(interp, key, *cursor++);
- break;
- default:
- Parrot_io_eprintf(NULL, "PackFile_Constant_pack: "
- "unsupported constant type\n");
- Parrot_exit(interp, 1);
- }
- GETATTR_Key_next_key(interp, key, key);
- }
-
- return cursor;
-}
-
-/*
-
=back
=head1 HISTORY
More information about the parrot-commits
mailing list