[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gawk-diffs] [SCM] gawk branch, gawk-4.1-stable, updated. gawk-4.1.0-834
From: |
Arnold Robbins |
Subject: |
[gawk-diffs] [SCM] gawk branch, gawk-4.1-stable, updated. gawk-4.1.0-834-g13927d9 |
Date: |
Mon, 07 Mar 2016 21:09:49 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".
The branch, gawk-4.1-stable has been updated
via 13927d9dec274f6c188005a9d87e097e225a1799 (commit)
via 5f4505729ff5677d62495dcc78acf7eedfc1c90d (commit)
via e8c440a6136db3a1b7503e5224474b3b7f03363e (commit)
from 309b2057256e2148b444ba556ca6639f73da188f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=13927d9dec274f6c188005a9d87e097e225a1799
commit 13927d9dec274f6c188005a9d87e097e225a1799
Author: Arnold D. Robbins <address@hidden>
Date: Mon Mar 7 23:09:21 2016 +0200
helpers/fixdump.awk: Convert to Unix line endings.
diff --git a/helpers/ChangeLog b/helpers/ChangeLog
index ed6b7ad..7ffbe62 100644
--- a/helpers/ChangeLog
+++ b/helpers/ChangeLog
@@ -2,6 +2,7 @@
* fixdump.awk (translate): Remove extraneous spaces in
prints of code targets.
+ * fixdump.awk: Convert to normal Unix line endings.
2015-08-28 Daniel Richard G. <address@hidden>
diff --git a/helpers/fixdump.awk b/helpers/fixdump.awk
index d019096..3ec502d 100644
--- a/helpers/fixdump.awk
+++ b/helpers/fixdump.awk
@@ -1,71 +1,71 @@
-#! /usr/bin/gawk -f
-
-BEGIN {
- address_re = "0x[[:xdigit:]]+"
- bracketed_address = "\\[(([[:space:]]*[[:digit:]]*:)?|[[:alpha:]_]+ =
)0x[[:xdigit:]]+\\]"
-}
-
-{
- line[NR] = $0
- extract_addresses($0, NR)
-}
-
-END {
- for (i = 1; i <= NR; i++) {
- if (line[i] !~ address_re) {
- print line[i]
- continue
- }
-
- translate(line[i])
- }
-}
-
-# Global arrays
-#
-# Address[line] --- Address of instruction - first hex number
-# Target[address] = 1 --- Address is target of a jump
-# Newaddr[address] --- Replacement address, counting from 1
-
-function extract_addresses(line, num, data, i, n, seps, addr)
-{
- if (line !~ address_re)
- return
-
- split(line, data, bracketed_address, seps)
- n = length(seps)
-
- for (i = 1; i <= n; i++) {
- addr = gensub(".*(" address_re ").*", "\\1", 1, seps[i])
- if (i == 1)
- Address[num] = addr
- else {
- Target[addr]++
- if (! (addr in Newaddr))
- Newaddr[addr] = new_address()
- }
- }
-}
-
-function new_address()
-{
- return sprintf("%8d", ++Address_seed)
-}
-
-function translate(line, n, data, seps, i, newline)
-{
- split(line, data, address_re, seps)
- n = length(seps)
- newline = line
- for (i = 1; i <= n; i++) {
- if (! (seps[i] in Target)) {
- gsub(seps[i], " ", newline)
- continue
- }
- gsub(seps[i], Newaddr[seps[i]], newline)
- }
-
- gsub(/ = +/, " = ", newline)
-
- print newline
-}
+#! /usr/bin/gawk -f
+
+BEGIN {
+ address_re = "0x[[:xdigit:]]+"
+ bracketed_address = "\\[(([[:space:]]*[[:digit:]]*:)?|[[:alpha:]_]+ =
)0x[[:xdigit:]]+\\]"
+}
+
+{
+ line[NR] = $0
+ extract_addresses($0, NR)
+}
+
+END {
+ for (i = 1; i <= NR; i++) {
+ if (line[i] !~ address_re) {
+ print line[i]
+ continue
+ }
+
+ translate(line[i])
+ }
+}
+
+# Global arrays
+#
+# Address[line] --- Address of instruction - first hex number
+# Target[address] = 1 --- Address is target of a jump
+# Newaddr[address] --- Replacement address, counting from 1
+
+function extract_addresses(line, num, data, i, n, seps, addr)
+{
+ if (line !~ address_re)
+ return
+
+ split(line, data, bracketed_address, seps)
+ n = length(seps)
+
+ for (i = 1; i <= n; i++) {
+ addr = gensub(".*(" address_re ").*", "\\1", 1, seps[i])
+ if (i == 1)
+ Address[num] = addr
+ else {
+ Target[addr]++
+ if (! (addr in Newaddr))
+ Newaddr[addr] = new_address()
+ }
+ }
+}
+
+function new_address()
+{
+ return sprintf("%8d", ++Address_seed)
+}
+
+function translate(line, n, data, seps, i, newline)
+{
+ split(line, data, address_re, seps)
+ n = length(seps)
+ newline = line
+ for (i = 1; i <= n; i++) {
+ if (! (seps[i] in Target)) {
+ gsub(seps[i], " ", newline)
+ continue
+ }
+ gsub(seps[i], Newaddr[seps[i]], newline)
+ }
+
+ gsub(/ = +/, " = ", newline)
+
+ print newline
+}
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=5f4505729ff5677d62495dcc78acf7eedfc1c90d
commit 5f4505729ff5677d62495dcc78acf7eedfc1c90d
Author: Arnold D. Robbins <address@hidden>
Date: Mon Mar 7 23:08:09 2016 +0200
helpers/fixdump.awk: Remove extraneous spaces in converted output.
diff --git a/helpers/ChangeLog b/helpers/ChangeLog
index 3215d15..ed6b7ad 100644
--- a/helpers/ChangeLog
+++ b/helpers/ChangeLog
@@ -1,3 +1,8 @@
+2016-03-07 Arnold D. Robbins <address@hidden>
+
+ * fixdump.awk (translate): Remove extraneous spaces in
+ prints of code targets.
+
2015-08-28 Daniel Richard G. <address@hidden>
* testdfa.c: Define and use the USE_EBCDIC cpp symbol
diff --git a/helpers/fixdump.awk b/helpers/fixdump.awk
index b03f03f..d019096 100644
--- a/helpers/fixdump.awk
+++ b/helpers/fixdump.awk
@@ -65,5 +65,7 @@ function translate(line, n, data, seps, i, newline)
gsub(seps[i], Newaddr[seps[i]], newline)
}
+ gsub(/ = +/, " = ", newline)
+
print newline
}
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=e8c440a6136db3a1b7503e5224474b3b7f03363e
commit e8c440a6136db3a1b7503e5224474b3b7f03363e
Author: Arnold D. Robbins <address@hidden>
Date: Mon Mar 7 23:07:51 2016 +0200
Improve instruction dump.
diff --git a/ChangeLog b/ChangeLog
index 86cb8e7..76ff755 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2016-03-07 Arnold D. Robbins <address@hidden>
+
+ * profile.c (print_instruction): Further improvements in
+ instruction dump, especially for when pretty-printing.
+
2016-03-03 Arnold D. Robbins <address@hidden>
* profile.c (pp_list): Unconditionally compute delimlen. Avoids
diff --git a/debug.c b/debug.c
index a32b015..50bcd89 100644
--- a/debug.c
+++ b/debug.c
@@ -3797,6 +3797,31 @@ print_instruction(INSTRUCTION *pc, Func_print
print_func, FILE *fp, int in_dump)
print_func(fp, "[branch_end = %p]\n", pc->branch_end);
break;
+ case Op_K_while:
+ print_func(fp, "[while_body = %p] [target_break = %p]\n",
(pc+1)->while_body, pc->target_break);
+ break;
+
+ case Op_K_do:
+ print_func(fp, "[doloop_cond = %p] [target_break = %p]\n",
(pc+1)->doloop_cond, pc->target_break);
+ break;
+
+ case Op_K_for:
+ print_func(fp, "[forloop_cond = %p] ", (pc+1)->forloop_cond);
+ /* fall through */
+ case Op_K_arrayfor:
+ print_func(fp, "[forloop_body = %p] ", (pc+1)->forloop_body);
+ print_func(fp, "[target_break = %p] [target_continue = %p]\n",
pc->target_break, pc->target_continue);
+ break;
+
+ case Op_K_switch:
+ print_func(fp, "[switch_start = %p] [switch_end = %p]\n",
(pc+1)->switch_start, (pc+1)->switch_end);
+ break;
+
+ case Op_K_case:
+ case Op_K_default:
+ print_func(fp, "[stmt_start = %p] [stmt_end = %p]\n",
pc->stmt_start, pc->stmt_end);
+ break;
+
case Op_var_update:
print_func(fp, "[update_%s()]\n",
get_spec_varname(pc->update_var));
break;
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 5 ++
debug.c | 25 +++++++++
helpers/ChangeLog | 6 ++
helpers/fixdump.awk | 140 ++++++++++++++++++++++++++-------------------------
4 files changed, 107 insertions(+), 69 deletions(-)
hooks/post-receive
--
gawk
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gawk-diffs] [SCM] gawk branch, gawk-4.1-stable, updated. gawk-4.1.0-834-g13927d9,
Arnold Robbins <=