Author: kjs
Date: Tue Dec 30 05:03:45 2008
New Revision: 34643
Modified:
trunk/compilers/pirc/new/pircompunit.c
trunk/compilers/pirc/new/pirpcc.c
Log:
[pirc] disallow users to write full signatured ops; it's not practical, not
necessary, and would add a lot of complexity to PIRC. Just don't do it. Stick
to 'set' as opposed to e.g. 'set_i_ic'
+ whitespace
Modified: trunk/compilers/pirc/new/pircompunit.c
==============================================================================
--- trunk/compilers/pirc/new/pircompunit.c (original)
+++ trunk/compilers/pirc/new/pircompunit.c Tue Dec 30 05:03:45 2008
@@ -1989,28 +1989,15 @@
is_parrot_op(lexer_state * const lexer, char const * const name) {
int opcode = lexer->interp->op_lib->op_code(name, 0); /* check short name,
e.g. "set" */
- /* if not found, try long name, e.g. "set_i_ic" */
- if (opcode < 0)
- opcode = lexer->interp->op_lib->op_code(name, 1); /* check long name */
-
- if (opcode >= 0)
- return TRUE;
- else
- return FALSE;
-
+ /* do *NOT* check for the "long" name variant, such as "set_i_ic";
+ * signatures (such as the _i_ic part) will be calculated by PIRC,
+ * adding it already will generate e.g. "set_i_ic_i_ic", which is
+ * incorrect, obviously.
+ */
+ return (opcode >= 0);
}
-
-
-
-
-
-
-
-
-
-
/*
=item C<void
@@ -2053,7 +2040,7 @@
/*
-=item C<static void
+=item C<void
update_op(lexer_state * const lexer, instruction * const instr, int newop)>
Update the instruction C<instr>; it is replaced by the op with opcode C<newop>.
Modified: trunk/compilers/pirc/new/pirpcc.c
==============================================================================
--- trunk/compilers/pirc/new/pirpcc.c (original)
+++ trunk/compilers/pirc/new/pirpcc.c Tue Dec 30 05:03:45 2008
@@ -240,7 +240,7 @@
/*
-=item C<static void
+=item C<void
emit_sub_epilogue(lexer_state * const lexer)>
Emit final instructions for the current subroutine. In case