[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] gawk branch, gawk-5.2-stable, updated. gawk-4.1.0-4936-gc0c9f468
From: |
Arnold Robbins |
Subject: |
[SCM] gawk branch, gawk-5.2-stable, updated. gawk-4.1.0-4936-gc0c9f468 |
Date: |
Tue, 25 Oct 2022 00:25:40 -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.2-stable has been updated
via c0c9f468b12a79ad8277f0e2b9ff7d42f48490bf (commit)
from 7d092bd9842b77b294232e64f4d58dfb51f9021c (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=c0c9f468b12a79ad8277f0e2b9ff7d42f48490bf
commit c0c9f468b12a79ad8277f0e2b9ff7d42f48490bf
Author: Arnold D. Robbins <arnold@skeeve.com>
Date: Tue Oct 25 07:25:20 2022 +0300
Code simplification in interpret.h.
diff --git a/ChangeLog b/ChangeLog
index 17b0c22a..b3104051 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2022-10-25 Arnold D. Robbins <arnold@skeeve.com>
+
+ * interpret.h (r_interpret): For Op_push*, simplify the code for
+ Node_var_new and Node_elem_new.
+
2022-10-23 Arnold D. Robbins <arnold@skeeve.com>
* NEWS: Updated.
diff --git a/interpret.h b/interpret.h
index f703080d..4540d302 100644
--- a/interpret.h
+++ b/interpret.h
@@ -212,38 +212,38 @@ top:
case Node_var_new:
uninitialized_scalar:
- if (op != Op_push_arg_untyped) {
- /* convert very original untyped to
scalar */
- m->type = Node_var;
- m->var_value = dupnode(Nnull_string);
- }
-
if (do_lint)
lintwarn(isparam ?
_("reference to uninitialized
argument `%s'") :
_("reference to uninitialized
variable `%s'"),
save_symbol->vname);
- // set up local param by value
- if (op != Op_push_arg_untyped)
- m = dupnode(Nnull_string);
- UPREF(m);
- PUSH(m);
- break;
- case Node_elem_new:
if (op != Op_push_arg_untyped) {
- /* convert very original untyped to
scalar */
+ // convert very original untyped to
scalar
m->type = Node_var;
m->var_value = dupnode(Nnull_string);
+
+ // set up local param by value
+ m = dupnode(Nnull_string);
}
+ UPREF(m);
+ PUSH(m);
+ break;
+
+ case Node_elem_new:
if (do_lint)
lintwarn(isparam ?
_("reference to uninitialized
argument `%s'") :
_("reference to uninitialized
variable `%s'"),
save_symbol->vname);
- // set up local param by value
+
if (op != Op_push_arg_untyped) {
+ // convert very original untyped to
scalar
+ m->type = Node_var;
+ m->var_value = dupnode(Nnull_string);
+
+ // set up local param by value
DEREF(m);
m = dupnode(Nnull_string);
}
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 5 +++++
interpret.h | 30 +++++++++++++++---------------
2 files changed, 20 insertions(+), 15 deletions(-)
hooks/post-receive
--
gawk
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] gawk branch, gawk-5.2-stable, updated. gawk-4.1.0-4936-gc0c9f468,
Arnold Robbins <=