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-3985-g23db076


From: Arnold Robbins
Subject: [SCM] gawk branch, gawk-5.1-stable, updated. gawk-4.1.0-3985-g23db076
Date: Tue, 9 Jun 2020 23:15:27 -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  23db0769e868c8389aa377a6f9149a014178cafd (commit)
      from  246542232f1eeab0436ee430385fe2c1e6d98f24 (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=23db0769e868c8389aa377a6f9149a014178cafd

commit 23db0769e868c8389aa377a6f9149a014178cafd
Author: Arnold D. Robbins <arnold@skeeve.com>
Date:   Wed Jun 10 06:15:12 2020 +0300

    Improve long long exec_count.

diff --git a/ChangeLog b/ChangeLog
index 92454f0..b8b5311 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2020-06-10         Arnold D. Robbins     <arnold@skeeve.com>
+
+       Thanks to Andrew Schorr for suggestion of better way to
+       handle exec_count being a long long.
+
+       * awk.h (INSTRUCTION): Make new ldl member be the long long.
+       (exec_count): Is now ldl.
+       * profile.c (pprint): Fix printf of exec_count.
+
 2020-06-08         Arnold D. Robbins     <arnold@skeeve.com>
 
        * awkgram.y: Fix `print $"2"' case. Thanks to Ed Morton
diff --git a/awk.h b/awk.h
index 515b524..5ba6bb9 100644
--- a/awk.h
+++ b/awk.h
@@ -758,7 +758,8 @@ typedef struct exp_instruction {
                awk_value_t *(*efptr)(int num_actual_args,
                                        awk_value_t *result,
                                        struct awk_ext_func *finfo);
-               long long dl;
+               long dl;
+               long long ldl;  // for exec_count
                char *name;
        } d;
 
@@ -899,7 +900,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 d3f6f84..0e00b63 100644
--- a/profile.c
+++ b/profile.c
@@ -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, " # %ld", 
ip1->exec_count);
+                                               fprintf(prof_fp, " # %lld", 
ip1->exec_count);
 
                                        end_line(ip1);
                                        skip_comment = true;

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

Summary of changes:
 ChangeLog | 9 +++++++++
 awk.h     | 5 +++--
 profile.c | 2 +-
 3 files changed, 13 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
gawk



reply via email to

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