1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-06-09 23:39:51 +02:00
gnupg/tests
Justus Winter 8a168a6d40
gpgscm: Create and re-use frame objects.
* tests/gpgscm/scheme-private.h (struct scheme): New field
'frame_freelist'.
* tests/gpgscm/scheme.c (enum scheme_types): New type 'T_FRAME'.
(type_to_string): Handle new type.
(settype): New macro.
(gc_disable): Make sure there is at least one frame in the free list.
(mark): Handle frame objects.
(finalize_cell): Likewise.
(dump_stack_initialize): Initialize free list.
(dump_stack_free): Simplify.
(frame_length): New variable.
(dump_stack_make_frame): New function.
(frame_slots): Likewise.
(frame_payload): New macro.
(dump_stack_allocate_frame): New function.
(dump_stack_deallocate_frame): Likewise.
(dump_stack_preallocate_frame): Likewise.
(_s_return): Unpack frame object and deallocate it.
(s_save): Wrap state in an frame object.
(dump_stack_mark): Mark the free list.
--

TinySCHEME being a SECD-machine needs to push frames onto the dump
stack.  Previously, the dump stack was a list.  This required four
cells for the spine, as well as up to one additional cell to encode
the current opcode.  This was quite inefficient despite the fact that
we recovered the spine as well as the integer cell.

We introduce frame objects, which are a special variant of vectors of
length four.  Since the length is fixed, this frees up the length
field of the vector object to store the unboxed opcode.  A frame
object now fits in two cells.

Saving two or three cells is a mere byproduct, the performance gain
comes from increased locality, unboxed opcode representation, and the
ability to easily put the objects in a free list, keeping the garbage
collector out of the continuous motion of the virtual machine.

Signed-off-by: Justus Winter <justus@g10code.com>
2017-05-03 15:36:16 +02:00
..
extrasamples Added sample certificates. 2006-05-16 09:54:41 +00:00
fake-pinentries doc: Update license information. 2016-09-19 10:03:26 +02:00
gpgme tests: Fix Python detection. 2017-04-24 17:32:41 +02:00
gpgscm gpgscm: Create and re-use frame objects. 2017-05-03 15:36:16 +02:00
gpgsm tests: Deduplicate and simplify code. 2017-04-24 15:59:49 +02:00
migrations gpgscm: Emit JUnit-style XML reports. 2017-04-24 14:28:57 +02:00
openpgp Spelling fixes in docs and comments. 2017-04-28 10:06:33 +09:00
pkits Spelling fixes in docs and comments. 2017-04-28 10:06:33 +09:00
samplekeys Add the STEED Self-Signing Nonthority certificate. 2011-12-20 15:35:42 +01:00
samplemsgs More samples 2004-02-17 15:07:27 +00:00
567064FE6D14A17B2D811ABB407728BC558AA455 added test certificate and secret key 2001-12-06 20:19:52 +00:00
asschk.c Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
cert_cci_sphinx_ca.pem A few test certificates 2002-01-29 15:46:55 +00:00
cert_cci_test_wzs.pem A few test certificates 2002-01-29 15:46:55 +00:00
cert_cci_test_zs.pem A few test certificates 2002-01-29 15:46:55 +00:00
cert_cci_user02.pem A few test certificates 2002-01-29 15:46:55 +00:00
cert_cci_user03.pem A few test certificates 2002-01-29 15:46:55 +00:00
cert_cci_user04.pem A few test certificates 2002-01-29 15:46:55 +00:00
cert_cci_user06.pem A few test certificates 2002-01-29 15:46:55 +00:00
cert_cci_user07.pem A few test certificates 2002-01-29 15:46:55 +00:00
cert_testpki_testpca.pem A few test certificates 2002-01-29 15:46:55 +00:00
ChangeLog-2011 Generate the ChangeLog from commit logs. 2011-12-01 11:09:02 +01:00
crl_testpki_testpca.pem A few test certificates 2002-01-29 15:46:55 +00:00
inittests Spelling fixes in docs and comments. 2017-04-28 10:06:33 +09:00
key_g10code_pete1.pem released 0.3.5 2002-04-15 17:15:21 +00:00
key_g10code_theo1.pem yet another test certificate 2002-03-28 17:25:28 +00:00
Makefile.am tests: Fix distcheck. 2017-04-06 15:20:43 +02:00
runtest Nuked almost all trailing white space. 2011-02-04 12:57:53 +01:00
skey_g10code_test1.pem added test certificate and secret key 2001-12-06 20:19:52 +00:00
sm-sign+verify Tweaked the build system so that make distcheck finanly said Well 2002-08-09 18:16:02 +00:00
sm-verify Tweaked the build system so that make distcheck finanly said Well 2002-08-09 18:16:02 +00:00
text-1.dsig.pem * asschk.c: Added some new features. 2002-08-08 16:32:01 +00:00
text-1.osig-bad.pem * asschk.c: Added some new features. 2002-08-08 16:32:01 +00:00
text-1.osig-badusage.pem new test certs and messages 2002-09-03 14:54:18 +00:00
text-1.osig.pem * asschk.c: Added some new features. 2002-08-08 16:32:01 +00:00
text-1.txt * asschk.c: Added some new features. 2002-08-08 16:32:01 +00:00
text-2.osig-bad.pem * asschk.c: Added some new features. 2002-08-08 16:32:01 +00:00
text-2.osig.pem * asschk.c: Added some new features. 2002-08-08 16:32:01 +00:00
text-2.txt * asschk.c: Added some new features. 2002-08-08 16:32:01 +00:00
text-3.txt * asschk.c: Added some new features. 2002-08-08 16:32:01 +00:00