[Pkg-gnupg-commit] [gnupg2] 27/132: gpgscm: Merge 'opexe_1'.

Daniel Kahn Gillmor dkg at fifthhorseman.net
Wed May 17 03:07:39 UTC 2017


This is an automated email from the git hooks/post-receive script.

dkg pushed a commit to branch experimental
in repository gnupg2.

commit 154af876f05b773bf3a860fcb4cc41066da27beb
Author: Justus Winter <justus at g10code.com>
Date:   Wed Mar 29 13:32:38 2017 +0200

    gpgscm: Merge 'opexe_1'.
    
    * tests/gpgscm/scheme.c (opexe_1): Merge into 'opexe_0'.
    * tests/gpgscm/opdefines.h: Adapt.
    --
    
    Having separate functions to execute opcodes reduces our ability to
    thread the code and prevents the dispatch_table from being moved to
    rodata.
    
    Signed-off-by: Justus Winter <justus at g10code.com>
---
 tests/gpgscm/opdefines.h | 40 ++++++++++++++++++++--------------------
 tests/gpgscm/scheme.c    | 11 -----------
 2 files changed, 20 insertions(+), 31 deletions(-)

diff --git a/tests/gpgscm/opdefines.h b/tests/gpgscm/opdefines.h
index 2d17720..affc788 100644
--- a/tests/gpgscm/opdefines.h
+++ b/tests/gpgscm/opdefines.h
@@ -38,26 +38,26 @@
     _OP_DEF(opexe_0, 0,                                0,  0,       0,                               OP_LET0AST          )
     _OP_DEF(opexe_0, 0,                                0,  0,       0,                               OP_LET1AST          )
     _OP_DEF(opexe_0, 0,                                0,  0,       0,                               OP_LET2AST          )
-    _OP_DEF(opexe_1, 0,                                0,  0,       0,                               OP_LET0REC          )
-    _OP_DEF(opexe_1, 0,                                0,  0,       0,                               OP_LET1REC          )
-    _OP_DEF(opexe_1, 0,                                0,  0,       0,                               OP_LET2REC          )
-    _OP_DEF(opexe_1, 0,                                0,  0,       0,                               OP_COND0            )
-    _OP_DEF(opexe_1, 0,                                0,  0,       0,                               OP_COND1            )
-    _OP_DEF(opexe_1, 0,                                0,  0,       0,                               OP_DELAY            )
-    _OP_DEF(opexe_1, 0,                                0,  0,       0,                               OP_AND0             )
-    _OP_DEF(opexe_1, 0,                                0,  0,       0,                               OP_AND1             )
-    _OP_DEF(opexe_1, 0,                                0,  0,       0,                               OP_OR0              )
-    _OP_DEF(opexe_1, 0,                                0,  0,       0,                               OP_OR1              )
-    _OP_DEF(opexe_1, 0,                                0,  0,       0,                               OP_C0STREAM         )
-    _OP_DEF(opexe_1, 0,                                0,  0,       0,                               OP_C1STREAM         )
-    _OP_DEF(opexe_1, 0,                                0,  0,       0,                               OP_MACRO0           )
-    _OP_DEF(opexe_1, 0,                                0,  0,       0,                               OP_MACRO1           )
-    _OP_DEF(opexe_1, 0,                                0,  0,       0,                               OP_CASE0            )
-    _OP_DEF(opexe_1, 0,                                0,  0,       0,                               OP_CASE1            )
-    _OP_DEF(opexe_1, 0,                                0,  0,       0,                               OP_CASE2            )
-    _OP_DEF(opexe_1, "eval",                           1,  2,       TST_ANY TST_ENVIRONMENT,         OP_PEVAL            )
-    _OP_DEF(opexe_1, "apply",                          1,  INF_ARG, TST_NONE,                        OP_PAPPLY           )
-    _OP_DEF(opexe_1, "call-with-current-continuation", 1,  1,       TST_NONE,                        OP_CONTINUATION     )
+    _OP_DEF(opexe_0, 0,                                0,  0,       0,                               OP_LET0REC          )
+    _OP_DEF(opexe_0, 0,                                0,  0,       0,                               OP_LET1REC          )
+    _OP_DEF(opexe_0, 0,                                0,  0,       0,                               OP_LET2REC          )
+    _OP_DEF(opexe_0, 0,                                0,  0,       0,                               OP_COND0            )
+    _OP_DEF(opexe_0, 0,                                0,  0,       0,                               OP_COND1            )
+    _OP_DEF(opexe_0, 0,                                0,  0,       0,                               OP_DELAY            )
+    _OP_DEF(opexe_0, 0,                                0,  0,       0,                               OP_AND0             )
+    _OP_DEF(opexe_0, 0,                                0,  0,       0,                               OP_AND1             )
+    _OP_DEF(opexe_0, 0,                                0,  0,       0,                               OP_OR0              )
+    _OP_DEF(opexe_0, 0,                                0,  0,       0,                               OP_OR1              )
+    _OP_DEF(opexe_0, 0,                                0,  0,       0,                               OP_C0STREAM         )
+    _OP_DEF(opexe_0, 0,                                0,  0,       0,                               OP_C1STREAM         )
+    _OP_DEF(opexe_0, 0,                                0,  0,       0,                               OP_MACRO0           )
+    _OP_DEF(opexe_0, 0,                                0,  0,       0,                               OP_MACRO1           )
+    _OP_DEF(opexe_0, 0,                                0,  0,       0,                               OP_CASE0            )
+    _OP_DEF(opexe_0, 0,                                0,  0,       0,                               OP_CASE1            )
+    _OP_DEF(opexe_0, 0,                                0,  0,       0,                               OP_CASE2            )
+    _OP_DEF(opexe_0, "eval",                           1,  2,       TST_ANY TST_ENVIRONMENT,         OP_PEVAL            )
+    _OP_DEF(opexe_0, "apply",                          1,  INF_ARG, TST_NONE,                        OP_PAPPLY           )
+    _OP_DEF(opexe_0, "call-with-current-continuation", 1,  1,       TST_NONE,                        OP_CONTINUATION     )
 #if USE_MATH
     _OP_DEF(opexe_2, "inexact->exact",                 1,  1,       TST_NUMBER,                      OP_INEX2EX          )
     _OP_DEF(opexe_2, "exp",                            1,  1,       TST_NUMBER,                      OP_EXP              )
diff --git a/tests/gpgscm/scheme.c b/tests/gpgscm/scheme.c
index e04394d..c3c88d0 100644
--- a/tests/gpgscm/scheme.c
+++ b/tests/gpgscm/scheme.c
@@ -438,7 +438,6 @@ static pointer reverse_in_place(scheme *sc, pointer term, pointer list);
 static pointer revappend(scheme *sc, pointer a, pointer b);
 static void dump_stack_mark(scheme *);
 static pointer opexe_0(scheme *sc, enum scheme_opcodes op);
-static pointer opexe_1(scheme *sc, enum scheme_opcodes op);
 static pointer opexe_2(scheme *sc, enum scheme_opcodes op);
 static pointer opexe_3(scheme *sc, enum scheme_opcodes op);
 static pointer opexe_4(scheme *sc, enum scheme_opcodes op);
@@ -3744,17 +3743,7 @@ static pointer opexe_0(scheme *sc, enum scheme_opcodes op) {
                sc->args = sc->NIL;
                s_thread_to(sc,OP_BEGIN);
           }
-     default:
-          snprintf(sc->strbuff,STRBUFFSIZE,"%d: illegal operator", sc->op);
-          Error_0(sc,sc->strbuff);
-     }
-     return sc->T;
-}
-
-static pointer opexe_1(scheme *sc, enum scheme_opcodes op) {
-     pointer x, y;
 
-     switch (op) {
      CASE(OP_LET0REC):    /* letrec */
           new_frame_in_env(sc, sc->envir);
           sc->args = sc->NIL;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git



More information about the Pkg-gnupg-commit mailing list