gawk-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] gawk branch, gawk-5.1-stable, updated. gawk-4.1.0-3988-ga53ba84


From: Andrew J. Schorr
Subject: [SCM] gawk branch, gawk-5.1-stable, updated. gawk-4.1.0-3988-ga53ba84
Date: Wed, 10 Jun 2020 09:53:16 -0400 (EDT)

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-5.1-stable has been updated
       via  a53ba84a4c0c8cfcc944d08aa30d062afc6df9a3 (commit)
      from  dff45aba93a56a50d5ad26c5ef1597abc1e2fe79 (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=a53ba84a4c0c8cfcc944d08aa30d062afc6df9a3

commit a53ba84a4c0c8cfcc944d08aa30d062afc6df9a3
Author: Andrew J. Schorr <aschorr@telemetry-investments.com>
Date:   Wed Jun 10 09:52:45 2020 -0400

    Convert exec_count to unsigned long long.

diff --git a/ChangeLog b/ChangeLog
index 8e1930d..3b82e35 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2020-06-10         Andrew J. Schorr      <aschorr@telemetry-investments.com>
+
+       Convert exec_count from long long to unsigned long long.
+       * awk.h (INSTRUCTION): Change ldl type from long long to unsigned
+       long long.
+       * debug.c (print_instruction): Fix printf format for exec_count.
+       * profile.c (indent): The argument is now an unsigned long long,
+       and fix the printf format to match.
+
 2020-06-10         Arnold D. Robbins     <arnold@skeeve.com>
 
        Thanks to Andrew Schorr for suggestion of better way to
diff --git a/awk.h b/awk.h
index 5ba6bb9..283817a 100644
--- a/awk.h
+++ b/awk.h
@@ -759,7 +759,7 @@ typedef struct exp_instruction {
                                        awk_value_t *result,
                                        struct awk_ext_func *finfo);
                long dl;
-               long long ldl;  // for exec_count
+               unsigned long long ldl; // for exec_count
                char *name;
        } d;
 
diff --git a/debug.c b/debug.c
index e082260..d53b9b8 100644
--- a/debug.c
+++ b/debug.c
@@ -4074,7 +4074,7 @@ print_instruction(INSTRUCTION *pc, Func_print print_func, 
FILE *fp, int in_dump)
                break;
 
        case Op_exec_count:
-               print_func(fp, "[exec_count = %ld]\n", pc->exec_count);
+               print_func(fp, "[exec_count = %llu]\n", pc->exec_count);
                break;
 
        case Op_store_var:
diff --git a/doc/ChangeLog b/doc/ChangeLog
index b7d145e..94f3e3d 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,8 @@
+2020-06-10         Andrew J. Schorr      <aschorr@telemetry-investments.com>
+
+       * bc_notes: Add new field `unsigned long long ldl' to INSTRUCTION,
+       and update the definition of exec_count.
+
 2020-06-09         Arnold D. Robbins     <arnold@skeeve.com>
 
        * gawktexi.in (Implementation Limits): Update the table to be more
diff --git a/doc/bc_notes b/doc/bc_notes
index b548cec..bca13a7 100644
--- a/doc/bc_notes
+++ b/doc/bc_notes
@@ -154,6 +154,7 @@ typedef struct exp_instruction {
                 struct exp_instruction *di;
                 NODE *(*fptr) P((int));
                 long dl;
+                unsigned long long ldl;
                 char *name;
         } d;
 
@@ -251,7 +252,7 @@ typedef struct exp_instruction {
 /*------------------ pretty printing/profiling --------*/
 
 /* Op_exec_count */
-#define exec_count      d.dl
+#define exec_count      d.ldl
 
 /* Op_K_while */
 #define while_body      d.di
diff --git a/profile.c b/profile.c
index e9c9053..f959c22 100644
--- a/profile.c
+++ b/profile.c
@@ -135,7 +135,7 @@ init_profiling_signals()
 /* indent --- print out enough tabs */
 
 static void
-indent(long long count)
+indent(unsigned long long count)
 {
        int i;
 
@@ -143,7 +143,7 @@ indent(long long count)
                if (count == 0)
                        fprintf(prof_fp, "\t");
                else
-                       fprintf(prof_fp, "%6lld  ", count);
+                       fprintf(prof_fp, "%6llu  ", count);
        }
 
        assert(indent_level >= 0);
@@ -297,7 +297,7 @@ pprint(INSTRUCTION *startp, INSTRUCTION *endp, int flags)
                                        ip2 = (pc + 1)->lasti;
 
                                        if (do_profile && ip1->exec_count > 0)
-                                               fprintf(prof_fp, " # %lld", 
ip1->exec_count);
+                                               fprintf(prof_fp, " # %llu", 
ip1->exec_count);
 
                                        end_line(ip1);
                                        skip_comment = true;
@@ -1043,7 +1043,7 @@ cleanup:
 
                        ip1 = pc->branch_if;
                        if (ip1->exec_count > 0)
-                               fprintf(prof_fp, " # %lld", ip1->exec_count);
+                               fprintf(prof_fp, " # %llu", ip1->exec_count);
                        ip1 = end_line(ip1);
                        indent_in();
                        if (pc->comment != NULL)

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog     | 9 +++++++++
 awk.h         | 2 +-
 debug.c       | 2 +-
 doc/ChangeLog | 5 +++++
 doc/bc_notes  | 3 ++-
 profile.c     | 8 ++++----
 6 files changed, 22 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
gawk



reply via email to

[Prev in Thread] Current Thread [Next in Thread]