aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog15
-rw-r--r--debug.c19
-rw-r--r--profile.c2
3 files changed, 33 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 16de7b94..afff64f4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2016-03-03 Arnold D. Robbins <arnold@skeeve.com>
+
+ * profile.c (pp_list): Unconditionally compute delimlen. Avoids
+ compiler warning.
+
+2016-03-02 Arnold D. Robbins <arnold@skeeve.com>
+
+ * debug.c (print_instruction): Improvements in instruction dump
+ for if and else.
+
+2016-03-01 Arnold D. Robbins <arnold@skeeve.com>
+
+ * debug.c (print_instruction): For Op_comment, add notation as
+ to whether it's a full comment or an end of line comment.
+
2016-02-29 Arnold D. Robbins <arnold@skeeve.com>
* profile.c (pp_list): Handle the case of nargs equal to zero.
diff --git a/debug.c b/debug.c
index 01e30ee3..7bf3450a 100644
--- a/debug.c
+++ b/debug.c
@@ -3796,6 +3796,15 @@ print_instruction(INSTRUCTION *pc, Func_print print_func, FILE *fp, int in_dump)
switch (pc->opcode) {
+ case Op_K_if:
+ print_func(fp, "[branch_if = %p] [branch_else = %p] [branch_else->lasti = %p]\n",
+ pc->branch_if, pc->branch_else, pc->branch_else->lasti);
+ break;
+
+ case Op_K_else:
+ print_func(fp, "[branch_end = %p]\n", pc->branch_end);
+ break;
+
case Op_var_update:
print_func(fp, "[update_%s()]\n", get_spec_varname(pc->update_var));
break;
@@ -3998,7 +4007,14 @@ print_instruction(INSTRUCTION *pc, Func_print print_func, FILE *fp, int in_dump)
print_func(fp, " [do_reference = %s]\n",
pc->do_reference ? "true" : "false");
break;
-
+
+ case Op_comment:
+ print_memory(pc->memory, func, print_func, fp);
+ fprintf(fp, " {%s}\n",
+ pc->memory->comment_type == EOL_COMMENT ?
+ "eol" : "full");
+ break;
+
case Op_push_i:
case Op_push:
case Op_push_arg:
@@ -4016,7 +4032,6 @@ print_instruction(INSTRUCTION *pc, Func_print print_func, FILE *fp, int in_dump)
case Op_quotient_i:
case Op_mod_i:
case Op_assign_concat:
- case Op_comment:
print_memory(pc->memory, func, print_func, fp);
/* fall through */
default:
diff --git a/profile.c b/profile.c
index 9e4a9b02..43875600 100644
--- a/profile.c
+++ b/profile.c
@@ -1538,10 +1538,10 @@ pp_list(int nargs, const char *paren, const char *delim)
erealloc(pp_args, NODE **, (nargs + 2) * sizeof(NODE *), "pp_list");
}
+ delimlen = strlen(delim);
if (nargs == 0)
len = 2;
else {
- delimlen = strlen(delim);
len = -delimlen;
for (i = 1; i <= nargs; i++) {
r = pp_args[i] = pp_pop();