]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Break out the interpreters (simple and forth) w/o ifdefs. This is
authorimp <imp@FreeBSD.org>
Wed, 31 Jan 2018 22:46:05 +0000 (22:46 +0000)
committerimp <imp@FreeBSD.org>
Wed, 31 Jan 2018 22:46:05 +0000 (22:46 +0000)
commit450f8da6d518a8b9f577ae5ff5616143d1bdc908
tree11a78e675c6a0b0dc8742ad730bc7035004f0eb9
parent6ced8cb459b85c122a364d36376f882a87584144
Break out the interpreters (simple and forth) w/o ifdefs.  This is
akin to what Pedro Souza and Wojciech Koszek did in the lua GSoC with
interp.h, interp_simple.c and changes to interp.c and interp_forth.c,
but completely redone from scratch.

This effectively restores the spirit of r326712 (my first attempt to
bring in Pedro's and Wojciech's work) updated for new requirements
that had silently broke their original work.  This change also differs
by using fixed function names instead of function pointers to simply
things. Only one interpreter at a time may be compiled in.

Also of note: we take a mutable string, pass it in via a const char *
pointer into intrp_forth's interp_run(). We then cast away the const
to pass into ficlExec since ficl would require extensive changes to
properly const-poison. See Sections 6.5.2.5 and 6.7.3 of C11 standard
noting it's only UB if you modify a const object through a non-const
pointer, but not char [] -> const char * -> char * as here.
stand/common/bootstrap.h
stand/common/install.c
stand/common/interp.c
stand/common/interp_forth.c
stand/common/interp_simple.c [new file with mode: 0644]
stand/loader.mk