--- parser3/src/main/execute.C 2001/02/20 18:45:52 1.1 +++ parser3/src/main/execute.C 2001/02/21 07:35:40 1.4 @@ -1,8 +1,8 @@ /* - $Id: execute.C,v 1.1 2001/02/20 18:45:52 paf Exp $ + $Id: execute.C,v 1.4 2001/02/21 07:35:40 paf Exp $ */ -#include "pa_array.h" +#include "pa_array.h" #include "code.h" #include @@ -14,7 +14,6 @@ char *opcode_name[]={ "CONSTRUCT", "EXPRESSION_EVAL", "MODIFY_EVAL", "WRITE", - "REPLACE_RESULT", "GET_ELEMENT", "GET_ELEMENT__WRITE", "CREATE_EWPOOL", "REDUCE_EWPOOL", "CREATE_RWPOOL", "REDUCE_RWPOOL", @@ -25,6 +24,9 @@ char *opcode_name[]={ }; void dump(int level, const Array *ops) { + if(!ops) + return; + int size=ops->size(); for(int i=0; i(ops->raw_get(i)); @@ -37,7 +39,7 @@ void dump(int level, const Array *ops) { if(code==OP_CODE_ARRAY) { const Array *local_ops=reinterpret_cast(ops->raw_get(++i)); - dump(level=1, local_ops); + dump(level+1, local_ops); } } } @@ -46,5 +48,7 @@ void execute(Pool *pool, const Array *op if(!ops) return; + puts("---------------------------"); dump(0, ops); + puts("---------------------------"); }