[svn:parrot] r43980 - trunk/compilers/pirc/src
mikehh at svn.parrot.org
mikehh at svn.parrot.org
Tue Feb 16 01:16:31 UTC 2010
Author: mikehh
Date: Tue Feb 16 01:16:30 2010
New Revision: 43980
URL: https://trac.parrot.org/parrot/changeset/43980
Log:
add ASSERT_ARGS
Modified:
trunk/compilers/pirc/src/piremit.c
Modified: trunk/compilers/pirc/src/piremit.c
==============================================================================
--- trunk/compilers/pirc/src/piremit.c Tue Feb 16 00:50:11 2010 (r43979)
+++ trunk/compilers/pirc/src/piremit.c Tue Feb 16 01:16:30 2010 (r43980)
@@ -336,6 +336,8 @@
*/
static void
print_sub_flags(lexer_state * const lexer, subroutine * const subiter) {
+ ASSERT_ARGS(print_sub_flags)
+
if (TEST_FLAG(subiter->flags, PIRC_SUB_FLAG_INIT))
fprintf(out, ":init ");
if (TEST_FLAG(subiter->flags, PIRC_SUB_FLAG_LOAD))
@@ -427,6 +429,7 @@
*/
static void
emit_pir_instruction(lexer_state * const lexer, instruction * const instr) {
+ ASSERT_ARGS(emit_pir_instruction)
if (instr->label)
fprintf(out, " %s:\n", instr->label);
@@ -452,6 +455,8 @@
*/
static void
emit_pir_statement(lexer_state * const lexer, subroutine * const sub) {
+ ASSERT_ARGS(emit_pir_statement)
+
instruction *statiter;
if (sub->statements == NULL)
@@ -531,6 +536,7 @@
*/
static void
emit_pbc_const_arg(lexer_state * const lexer, constant * const c) {
+ ASSERT_ARGS(emit_pbc_const_arg)
switch (c->type) {
case INT_VAL:
@@ -593,6 +599,8 @@
*/
static void
emit_pbc_label_arg(lexer_state * const lexer, label * const l) {
+ ASSERT_ARGS(emit_pbc_label_arg)
+
emit_int_arg(lexer->bc, l->offset);
}
@@ -616,6 +624,8 @@
*/
static void
emit_pbc_target_arg(lexer_state * const lexer, target * const t) {
+ ASSERT_ARGS(emit_pbc_target_arg)
+
emit_int_arg(lexer->bc, t->info->color);
/* if t has a key, emit that as well */
@@ -638,6 +648,8 @@
*/
static void
emit_pbc_expr(lexer_state * const lexer, expression * const operand) {
+ ASSERT_ARGS(emit_pbc_expr)
+
switch (operand->type) {
case EXPR_CONSTANT:
emit_pbc_const_arg(lexer, operand->expr.c);
@@ -679,6 +691,7 @@
*/
static void
optimize_instr(lexer_state * const lexer, instruction * const instr) {
+ ASSERT_ARGS(optimize_instr)
switch (instr->opcode) {
case PARROT_OP_box_p_ic: {
@@ -756,6 +769,8 @@
*/
static void
emit_pbc_instr(lexer_state * const lexer, instruction * const instr) {
+ ASSERT_ARGS(emit_pbc_instr)
+
int i;
expression *operand;
opcode_t offset;
@@ -821,6 +836,8 @@
*/
static void
emit_pbc_sub(lexer_state * const lexer, subroutine * const sub) {
+ ASSERT_ARGS(emit_pbc_sub)
+
instruction *iter;
if (sub->statements == NULL)
@@ -859,6 +876,8 @@
*/
static void
emit_pbc_annotations(lexer_state * const lexer) {
+ ASSERT_ARGS(emit_pbc_annotations)
+
annotation *iter;
if (lexer->annotations == NULL)
More information about the parrot-commits
mailing list