[Pkg-gnupg-commit] [gnupg2] 31/132: gpgscm: Merge 'opexe_5'.
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 1379df44537b67b7c2fbc0fb5bc6f7945a5d7ebb
Author: Justus Winter <justus at g10code.com>
Date: Wed Mar 29 13:57:54 2017 +0200
gpgscm: Merge 'opexe_5'.
* tests/gpgscm/scheme.c (opexe_5): 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 | 36 ++++++++++++++++++------------------
tests/gpgscm/scheme.c | 18 ------------------
2 files changed, 18 insertions(+), 36 deletions(-)
diff --git a/tests/gpgscm/opdefines.h b/tests/gpgscm/opdefines.h
index 7bdaefb..9cb723a 100644
--- a/tests/gpgscm/opdefines.h
+++ b/tests/gpgscm/opdefines.h
@@ -178,24 +178,24 @@
_OP_DEF(opexe_0, "close-output-port", 1, 1, TST_OUTPORT, OP_CLOSE_OUTPORT )
_OP_DEF(opexe_0, "interaction-environment", 0, 0, 0, OP_INT_ENV )
_OP_DEF(opexe_0, "current-environment", 0, 0, 0, OP_CURR_ENV )
- _OP_DEF(opexe_5, "read", 0, 1, TST_INPORT, OP_READ )
- _OP_DEF(opexe_5, "read-char", 0, 1, TST_INPORT, OP_READ_CHAR )
- _OP_DEF(opexe_5, "peek-char", 0, 1, TST_INPORT, OP_PEEK_CHAR )
- _OP_DEF(opexe_5, "char-ready?", 0, 1, TST_INPORT, OP_CHAR_READY )
- _OP_DEF(opexe_5, "set-input-port", 1, 1, TST_INPORT, OP_SET_INPORT )
- _OP_DEF(opexe_5, "set-output-port", 1, 1, TST_OUTPORT, OP_SET_OUTPORT )
- _OP_DEF(opexe_5, 0, 0, 0, 0, OP_RDSEXPR )
- _OP_DEF(opexe_5, 0, 0, 0, 0, OP_RDLIST )
- _OP_DEF(opexe_5, 0, 0, 0, 0, OP_RDDOT )
- _OP_DEF(opexe_5, 0, 0, 0, 0, OP_RDQUOTE )
- _OP_DEF(opexe_5, 0, 0, 0, 0, OP_RDQQUOTE )
- _OP_DEF(opexe_5, 0, 0, 0, 0, OP_RDQQUOTEVEC )
- _OP_DEF(opexe_5, 0, 0, 0, 0, OP_RDUNQUOTE )
- _OP_DEF(opexe_5, 0, 0, 0, 0, OP_RDUQTSP )
- _OP_DEF(opexe_5, 0, 0, 0, 0, OP_RDVEC )
- _OP_DEF(opexe_5, 0, 0, 0, 0, OP_P0LIST )
- _OP_DEF(opexe_5, 0, 0, 0, 0, OP_P1LIST )
- _OP_DEF(opexe_5, 0, 0, 0, 0, OP_PVECFROM )
+ _OP_DEF(opexe_0, "read", 0, 1, TST_INPORT, OP_READ )
+ _OP_DEF(opexe_0, "read-char", 0, 1, TST_INPORT, OP_READ_CHAR )
+ _OP_DEF(opexe_0, "peek-char", 0, 1, TST_INPORT, OP_PEEK_CHAR )
+ _OP_DEF(opexe_0, "char-ready?", 0, 1, TST_INPORT, OP_CHAR_READY )
+ _OP_DEF(opexe_0, "set-input-port", 1, 1, TST_INPORT, OP_SET_INPORT )
+ _OP_DEF(opexe_0, "set-output-port", 1, 1, TST_OUTPORT, OP_SET_OUTPORT )
+ _OP_DEF(opexe_0, 0, 0, 0, 0, OP_RDSEXPR )
+ _OP_DEF(opexe_0, 0, 0, 0, 0, OP_RDLIST )
+ _OP_DEF(opexe_0, 0, 0, 0, 0, OP_RDDOT )
+ _OP_DEF(opexe_0, 0, 0, 0, 0, OP_RDQUOTE )
+ _OP_DEF(opexe_0, 0, 0, 0, 0, OP_RDQQUOTE )
+ _OP_DEF(opexe_0, 0, 0, 0, 0, OP_RDQQUOTEVEC )
+ _OP_DEF(opexe_0, 0, 0, 0, 0, OP_RDUNQUOTE )
+ _OP_DEF(opexe_0, 0, 0, 0, 0, OP_RDUQTSP )
+ _OP_DEF(opexe_0, 0, 0, 0, 0, OP_RDVEC )
+ _OP_DEF(opexe_0, 0, 0, 0, 0, OP_P0LIST )
+ _OP_DEF(opexe_0, 0, 0, 0, 0, OP_P1LIST )
+ _OP_DEF(opexe_0, 0, 0, 0, 0, OP_PVECFROM )
_OP_DEF(opexe_6, "length", 1, 1, TST_LIST, OP_LIST_LENGTH )
_OP_DEF(opexe_6, "assq", 2, 2, TST_NONE, OP_ASSQ )
_OP_DEF(opexe_6, "get-closure-code", 1, 1, TST_NONE, OP_GET_CLOSURE )
diff --git a/tests/gpgscm/scheme.c b/tests/gpgscm/scheme.c
index 48e0f3f..917f46b 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_5(scheme *sc, enum scheme_opcodes op);
static pointer opexe_6(scheme *sc, enum scheme_opcodes op);
static void Eval_Cycle(scheme *sc, enum scheme_opcodes op);
static void assign_syntax(scheme *sc, char *name);
@@ -4877,24 +4876,7 @@ static pointer opexe_0(scheme *sc, enum scheme_opcodes op) {
CASE(OP_CURR_ENV): /* current-environment */
s_return(sc,sc->envir);
- default:
- snprintf(sc->strbuff,STRBUFFSIZE,"%d: illegal operator", sc->op);
- Error_0(sc,sc->strbuff);
- }
- return sc->T;
-}
-static pointer opexe_5(scheme *sc, enum scheme_opcodes op) {
- pointer x;
-
- if(sc->nesting!=0) {
- int n=sc->nesting;
- sc->nesting=0;
- sc->retcode=-1;
- Error_1(sc,"unmatched parentheses:",mk_integer(sc,n));
- }
-
- switch (op) {
/* ========== reading part ========== */
CASE(OP_READ):
if(!is_pair(sc->args)) {
--
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