feat: 9.5.9

main
Tom MTT. 2 years ago
parent cb1753732b
commit 35f43a7909

2
.gitattributes vendored

@ -0,0 +1,2 @@
*.h linguist-language=C
*.ms linguist-language=Scheme

@ -0,0 +1,12 @@
#!/bin/bash
set -e -o pipefail
./configure -m="$TARGET_MACHINE"
make -j $(getconf _NPROCESSORS_ONLN)
case "$TARGET_MACHINE" in
*a6nt)
curl -Ls https://github.com/burgerrg/win-iconv/releases/download/v0.0.9/iconv-x64.dll > "$TARGET_MACHINE"/bin/"$TARGET_MACHINE"/iconv.dll
;;
*i3nt)
curl -Ls https://github.com/burgerrg/win-iconv/releases/download/v0.0.9/iconv-x86.dll > "$TARGET_MACHINE"/bin/"$TARGET_MACHINE"/iconv.dll
;;
esac

@ -0,0 +1,4 @@
-------- o=0 --------
-------- o=3 --------
-------- o=3 cp0=t --------
-------- o=3 cp0=t eval=interpret rmg=2 --------

@ -0,0 +1,7 @@
#!/bin/bash
if test -n "$PARALLEL_MATS" ; then
njobs="$PARALLEL_MATS"
else
njobs="$(getconf _NPROCESSORS_ONLN)"
fi
make -C "$TARGET_MACHINE"/mats -j "$njobs" partialx

@ -0,0 +1,74 @@
---
name: test
on: [push, pull_request]
jobs:
test:
strategy:
fail-fast: false
matrix:
config:
- machine: a6osx
os: macos-11
- machine: ta6osx
os: macos-11
- machine: i3le
os: ubuntu-20.04
- machine: ti3le
os: ubuntu-20.04
- machine: a6le
os: ubuntu-20.04
- machine: ta6le
os: ubuntu-20.04
- machine: i3nt
os: windows-2019
- machine: i3nt
os: windows-2022
- machine: ti3nt
os: windows-2019
- machine: ti3nt
os: windows-2022
- machine: a6nt
os: windows-2019
- machine: a6nt
os: windows-2022
- machine: ta6nt
os: windows-2019
- machine: ta6nt
os: windows-2022
runs-on: ${{ matrix.config.os }}
env:
TARGET_MACHINE: ${{ matrix.config.machine }}
defaults:
run:
shell: bash
working-directory: ${{ github.workspace }}
steps:
- name: Configure git on Windows
if: ${{ runner.os == 'Windows' }}
run: git config --global core.autocrlf false
- name: Checkout
uses: actions/checkout@v2
- name: Setup 32-bit Linux
if: ${{ endsWith(matrix.config.machine, 'i3le') }}
run: |
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install gcc-multilib lib32ncurses5-dev uuid-dev:i386
- name: Build Chez Scheme
run: .github/workflows/build.sh
- name: Run tests
timeout-minutes: 30
run: .github/workflows/test.sh
- name: Archive workspace
if: always()
run: tar -c -h -z -f $TARGET_MACHINE.tgz $TARGET_MACHINE
- name: Upload archive
if: always()
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.config.machine }}
path: ${{ matrix.config.machine }}.tgz
- name: Check test results
run: |
cat $TARGET_MACHINE/mats/summary
diff -q .github/workflows/summary $TARGET_MACHINE/mats/summary

51
.gitignore vendored

@ -0,0 +1,51 @@
*~
.*.sw?
.sw?
/Makefile
/TAGS
/a6le/
/a6nt/
/a6osx/
/bin/
/i3le/
/i3nt/
/i3osx/
/ta6le/
/ta6nt/
/ta6osx/
/ti3le/
/ti3nt/
/ti3osx/
/xc-*/
*.*run
/csug/math/csug/
/csug/Makefile
/csug/*.aux
/csug/*.html
/csug/*.tex
/csug/csug.ans
/csug/csug.bbl
/csug/csug.blg
/csug/*.haux
/csug/csug.htoc
/csug/*.idx
/csug/csug.ilg
/csug/csug.ind
/csug/csug.pdf
/csug/*.rfm
/csug/csug.sfm
/csug/csug.toc
/csug/*.hidx
/csug/libslisted*
/csug/libsrecorded*
/csug/*.log
/release_notes/math/release_notes/
/release_notes/Makefile
/release_notes/*.tex
/release_notes/*.aux
/release_notes/*.haux
/release_notes/*.html
/release_notes/*.htoc
/release_notes/*.htoc
/release_notes/*.log
/release_notes/release_notes.pdf

12
.gitmodules vendored

@ -0,0 +1,12 @@
[submodule "zlib"]
path = zlib
url = https://github.com/madler/zlib.git
[submodule "nanopass"]
path = nanopass
url = https://github.com/nanopass/nanopass-framework-scheme.git
[submodule "stex"]
path = stex
url = https://github.com/dybvig/stex
[submodule "lz4"]
path = lz4
url = https://github.com/lz4/lz4.git

@ -0,0 +1,368 @@
Building Chez Scheme Version 9.5.9
Copyright 1984-2022 Cisco Systems, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
----------------------------------------------------------------------------
This directory contains the sources for Chez Scheme, plus boot and header
files for various supported machine types.
BASICS
Building and installing Chez Scheme on a recent version of Linux or OS X
is typically as simple as installing the prerequisites listed below and
running (Windows build instructions appear under the heading WINDOWS
later in this file):
./configure
sudo make install
This should not take more than a minute or so, after which the commands
'scheme' and 'petite' can be used to run Chez Scheme and Petite Chez
Scheme, while 'man scheme' and 'man petite' can be used to view the
manual pages. Chez Scheme and Petite Chez Scheme are terminal-based
programs, not GUIs. They both incorporate sophisticated command-line
editing reminiscent of tcsh but with support for expressions that span
multiple lines.
Prerequisites:
* GNU Make
* gcc
* Header files and libraries for ncurses [unless --disable-curses]
* Header files and libraries for X windows [unless --disable-x11]
* Header files and libraries for uuid
Uninstalling on Unix-like systems is as simple as running:
sudo make uninstall
BUILDING VERSION 9.5 AND EARLIER
If the environment variable CHEZSCHEMELIBDIRS is set, please unset
it before running make. Depending on the variable's value, it can
cause the build process to fail.
DETAILS
The sources for Chez Scheme come in two parts:
* A set of Scheme source files found in the subdirectory s. Compiling
these produces the boot files petite.boot and scheme.boot, along with
two header files, equates.h and scheme.h.
* A set of C source files found in the subdirectory c. Compiling and
linking these files produces the executable scheme (scheme.exe under
Windows). Compiling the C sources requires the two header files
produced by compiling the Scheme sources.
Since the Scheme sources can be compiled only by a working version of
Chez Scheme, it's not actually possible to build Chez Scheme from source.
That's why the boot and header files are packaged with the sources.
'./configure' attempts to determine what type of machine it's on and,
if successful, creates several files and directories:
* The directory nanopass containing the Nanopass Infrastructure,
retrieved from GitHub.
* A make file, Makefile, in the root (top level) directory.
* A "workarea", or subdirectory named for the machine type (e.g.,
a6le for nonthreaded 64-bit linux). The workarea is a mirror of
the root directory, with subdirectories named c, s, and so on.
Compilation takes place in the workarea.
* Within the workarea, the files Makefile, Mf-install, and Mf-boot.
'./configure' recognizes various options for controlling the type
of build and the installation location. For example, '--threads'
requests a build with support for native threads, '--32' requests
a 32-bit build, and '--installprefix <pathname>' specifies the
installation root. './configure --help' prints the supported
options.
The make file supports several targets:
'make' or 'make build'
compiles and links the C sources to produce the executable, then
bootstraps the Scheme sources. Bootstrapping involves using the
freshly built scheme executable along with the distributed boot files
to compile the Scheme sources. If the new boot files are equivalent
to the old boot files, the system is bootstrapped. Otherwise, the new
boot files are used to create a newer set, and those are compared.
If this succeeds, the system is bootstrapped. Otherwise, the make
fails. This should not fail unless the distributed boot files are
out of sync with the sources.
When you make a modification to the system that causes the C side to
get out of sync with the Scheme side so that the build fails, try
the following from $W if you have a recent version of Chez Scheme
installed in your path:
make -C s clean all patchfile=patch Scheme=scheme SCHEMEHEAPDIRS={see below}
make build
Set SCHEMEHEAPDIRS to /usr/lib/csv%v/%m:/usr/local/lib/csv%v/%m on
Unix-like systems and to %x/../../boot/%m on Windows systems.
Alternatively, if you have a build before the changes at full path
<orig>, use
make from-orig ORIG=<orig>
To run Chez Scheme without installing, you need to tell the
executable where to find the boot files. The run target of the
makefile will do that
make run
or this can be done manually via command-line arguments, e.g.:
$W/bin/$M/scheme -b $W/boot/$M/petite.boot -b $W/boot/$M/scheme.boot
or by setting the SCHEMEHEAPDIRS variable to point to the directory
containing the boot files. For example, in bash:
SCHEMEHEAPDIRS=$W/boot/$M $W/bin/$M/scheme
and in tcsh:
setenv SCHEMEHEAPDIRS "$W/boot/$M"
$W/bin/$M/scheme
In all cases, $W should be replaced with the name of the workarea,
and $M should be replaced with the machine type. (Unless the default
is overridden via an argument to ./configure, $W is the same as $M.)
'sudo make install'
runs the build plus installs the resulting executables, boot files,
example files, and manual pages. If the installprefix used with
'./configure' is writable by the current user, then 'sudo' is not
necessary.
'sudo make uninstall'
uninstalls the executables, boot files, example files, and manual pages.
As with 'make install', if the installprefix used with './configure' is
writable by the current user, then 'sudo' is not necessary.
'make test'
runs the build plus runs a set of test programs in various different
ways, e.g., with different compiler options. It can take 20 minutes
to more than an hour, depending on the speed of the machine and number
of parallel targets executed by make (as configured, e.g., by the -j
flag).
NB: A complete run does not imply no errors occurred. To check for
errors, look at the file $W/mats/summary, where $W is the name of the
workarea created by ./configure. $W/mats/summary should contain one
line per test run, something like this:
-------- o=0 --------
-------- o=3 --------
-------- o=0 cp0=t --------
-------- o=3 cp0=t --------
-------- o=0 spi=t p=t --------
-------- o=3 spi=t p=t --------
-------- o=0 eval=interpret --------
-------- o=3 eval=interpret --------
-------- o=0 cp0=t eval=interpret --------
-------- o=3 cp0=t eval=interpret --------
-------- o=0 ehc=t eoc=f --------
-------- o=3 ehc=t eval=interpret --------
If there is anything else in $W/mats/summary, something unexpected
occurred.
'make bootfiles'
runs the build plus uses the locally built system to recreate the
distributed boot and header files for each supported machine type.
It should be run whenever modifications made to the Scheme sources
are to be committed to the source-code repository so that up-to-date
boot and header files can be committed as well. 'make bootfiles'
can take 5 minutes or more.
'make bootfiles' builds boot files for each machine type for which
a subdirectory exists in the top-level boot directory. To build
for a supported machine type that isn't built by default, simply
add the appropriate subdirectory, i.e., 'mkdir boot/$M', where M
is the machine type, before running 'make bootfiles'. You can
also run '(cd $W ; make -f Mf-boot $M.boot)', where W is the name
of a built work area for the host machine type, to build just the
boot files for machine-type M.
'make docs'
runs the build plus generates HTML and PDF versions of the Chez Scheme
Users Guide and the release notes. Unlike the other build targets,
the documentation is not built in the workarea, but rather in the
'csug' and 'release_notes' directories.
Building the documentation requires a few prerequisites not required
to build the rest of Chez Scheme. The following must be available
in your PATH:
* A TeX distribution (including latex, pdflatex, dvips, and gs)
* ppmtogif and pnmcrop (from Netpbm)
An X11 installation is not required, but ppmtogif does require an
'rgb.txt' file, which it will automatically locate in the common
X11 installation locations. If ppmtogif fails because it cannot find
an rgb.txt file, you can use the RGBDEF environment variable to
specify the path to a file. If your system has an emacs installation,
then you can find an rgb.txt file in the 'etc' directory of the emacs
installation. If your system has a vim installation, then it might
contain an rgb.txt in $VIMRUNTIME.
'sudo make install-docs'
builds the documentation as with 'make docs' and installs it. If the installcsug and
installreleasenotes directories used with './configure' are writable by the current
user, then 'sudo' is not necessary.
'make clean'
removes binaries from the workarea.
'make distclean'
removes nanopass, Makefile, built documentation, and all workareas.
OTHER UNIX VARIANTS
To build on Unix variants other than Linux and OS X, you will first
need to build boot files on a Linux or OS X machine. On that machine,
after building Chez Scheme, create boot files for the target machine
<machine> with:
make boot XM=<machine>
Copy the generated boot/<machine> directory to the target machine,
adding to or replacing the boot directory with pre-built boot files
there, and then build as on Linux.
Remember to use gmake if make is not GNU make. If you run into linker
trouble, try running configure with --libkernel so that the build
avoids running ld directly.
On OpenBSD, Chez Scheme must be built and installed on a filesystem
that is mounted with wxallowed.
On NetBSD, note that the makefiles run "paxctl +m" to enable WX pages
(i.e., pages that have both write and execute enabled).
WINDOWS
Building Chez Scheme under 64-bit Windows with Bash/WSL, MinGW/MSYS,
or Cygwin follows the instructions above, except that 'make install'
and 'make uninstall' are not supported. Alternatively, the main Chez
Scheme executable can be built from the Windows command line or
cross-compiled using MinGW as described further below.
On Bash/WSL, the build directory must be in a location with a Windows
path such as /mnt/c, and the 'OS' environment variable must be set to
'Windows_NT' to indicate a build for Windows, as opposed to a build
for Linux on Windows:
env OS=Windows_NT ./configure
env OS=Windows_NT make
Prerequisites:
* Bash/WSL, MinGW/MSYS, or Cygwin with bash, git, grep, make, sed, etc.
* Microsoft Visual Studio 2022, 2019, 2017, or 2015
* WiX Toolset (for making an install)
Be sure that git config core.autocrlf is set to false.
If you're using Visual Studio 2022 or 2019, install "Desktop
development with C++" on the "Workloads" tabs and the "C++ 2022 [or
2019] Redistributable MSMs" on the "Individual components" tab under
the "Compilers, build tools, and runtimes" section.
To run Chez Scheme or Petite Chez Scheme from a Windows command prompt,
set PATH:
set PATH=$W\bin\$M;%PATH%
again with $W and $M replaced with the workarea name and machine
type, and start Chez Scheme with the command "scheme" or Petite
Chez with the command "petite".
The executables are dynamically linked against the Microsoft Visual
C++ run-time library vcruntime140.dll. If you distribute the
executables to a different system, be sure to include the
redistributable run-time library.
Making an Install for Windows
cd wininstall
make workareas
make
This will create workareas and compile binaries for the a6nt, i3nt,
ta6nt, and ti3nt configurations and then include them in a single
Windows installer package Chez Scheme.exe. The package also includes
example files and the redistributable Microsoft Visual C++ run-time
libraries.
Testing under Windows
The iconv tests in mats/io.ms require that a 32-bit or 64-bit (as
appropriate) iconv.dll, libiconv.dll, or libiconv-2.dll implementing
GNU libiconv be located in $W\bin\$M or the path. Windows sources for
libiconv can be found at:
http://gnuwin32.sourceforge.net/packages/libiconv.htm
An alternative that uses the Windows API can be found at:
https://github.com/burgerrg/win-iconv/releases
If the DLL is not present, the iconv tests will fail. No other tests
should be affected.
Unset the TZ environment variable before running the tests, because
the Cygwin values are incompatible with the Microsoft C Runtime
Library.
Use 'make test' described above to run the tests.
WINDOWS EXECUTABLE VIA COMMAND PROMPT
To build the Chez Scheme executable using Microsoft Visual Studio,
first set up command-line tools. The c\vs.bat script can help if you
supply amd64 for a 64-bit build or x86 for a 32-bit build:
c\vs.bat amd64
Then, run c\build/bat with a machine name, either ta6nt (64-bit
threaded), a6nt (64-bit non-threaded), ti3nt (32-bit threaded), or
i3nt (32-bit non-threaded):
c\build.bat ta6nt
The resulting executable in <machine>\bin\<machine> relies on
bootfiles in ..\boot\<machine> relative to the executable.
CROSS-COMPILING THE WINDOWS EXECUTABLE
To cross-compile the main Chez Scheme executable for Windows using
MinGW, specify suitable build tools to configure, perhaps using
--toolprefix= like this:
./configure -m=ta6nt --threads --toolprefix=x86_64-w64-mingw32-
Then, make with c/Mf-<machine> while supplying cross=t and o=o,
possibly like this:
(cd ta6nt/c && make -f Mf-ta6nt cross=t o=o)
The executable is written to <machine>/bin/<machine>, and it should be
installed with bootfiles in ../boot/<machine>/ relative to the
executable.

@ -0,0 +1,55 @@
# Chez Scheme Project Charter (the “Charter”)
This Charter sets forth the responsibilities and procedures for
technical contribution to, and oversight of, the Chez Scheme Project
(the “Project”). Participation in the Project is open to all in a
fair, reasonable, and non-discriminatory manner. Contributors to
the Project must comply with the terms of this Charter.
1. Governance
* The Project will involve Contributors and Committers.
Contributors include anyone in the technical community who
contributes code, documentation, or other technical artifacts
to the Project. Committers are Contributors who have the
ability to commit code directly to the Projects main branch
or repository.
* The Committers shall be responsible for technical oversight
and other decision making of the Project. The Committers will
seek to make decisions by consensus. Except where otherwise
specified below, if a consensus cannot be reached, Project
decisions shall be made by a two-thirds vote of the Committers.
* A unanimous vote of the Committers shall be required for any
change or amendment to this Charter.
2. Technical Policy
* Any Committer may review a pull request and accept, reject,
or solicit modifications to the request, at the Committers
sole discretion. For changes that might be highly impactful
or controversial, Committers are encouraged, but not required,
to seek consensus from the other Committers before proceeding.
Committers are not required to respond to every pull request,
but shall make reasonable efforts to do so.
* Any existing Committer may nominate a Contributor with the
demonstrated experience, knowledge, and commitment to the
Project to become a new Committer. A nominee can become a
Committer only by a unanimous vote of the existing Committers.
* Any Committer may resign at any time by giving notice to the
other Committers. Any Committer may also be removed at any
time by a unanimous vote of the other Committers.
3. Intellectual Property Policy
* All new inbound code contributions to the Project shall be
made under the [Apache 2.0 license]
(http://www.apache.org/licenses/LICENSE-2.0).
* By submitting a contribution, a Contributor certifies that
the Contributor is the sole creator of the contribution and/or
has the right under all applicable intellectual property laws
to provide the contribution to the Project under the terms of
the Apache 2.0 license.
* If a Contributor wishes to contribute existing source code
covered by an open-source license other than Apache 2.0, the
Contributor must seek an exception from the Committers.
Exceptions shall be approved only by a unanimous vote of the
Committers and duly recorded in the file NOTICE.
* All outbound code will be made available under the Apache 2.0
license.

@ -0,0 +1,94 @@
# Contributing to Chez Scheme
Chez Scheme is a work in progress, and we invite contributions from
anyone who is interested in putting forth the necessary effort.
One or more of the committers will review pull requests for
compatibility with the principles and guidance given below. Details
on pull-request processing are given in [the governance
document](CHARTER.md).
Our core principles are pretty simple: we try to make Chez Scheme
reliable and efficient.
Reliability means behaving as designed and documented. We have no
"known bugs" list, preferring instead careful design, coding, and
testing practices that prevent most bugs and fixing bugs that do
occur as they are discovered. A Scheme program run using Chez
Scheme can crash due to bugs in the program, but it should not crash
due to bugs in the implementation.
Efficiency means performing at a high level, consuming minimal cpu
time and memory. Performance should be a continuous function, with
no cliffs or surprises, and should scale well as program or problem
size grow. Performance should be balanced across features, not
good in one area and bad in another. Compile time is important as
well as run time, so compiler optimizations are generally expected
to pay their own way, i.e., indirectly benefit compiler performance
enough to cover the direct cost of the optimization.
We attempt to achieve the core principles through careful control
over growth, testing, and documentation.
Like the Scheme language itself, a good implementation is not built
by piling up features but by providing enabling building blocks.
So when asked to add a new feature, we first look for a way to
achieve the same effect with existing functionality or smaller
extensions that are more generally applicable.
Chez Scheme is tested in two ways: implicitly by bootstrapping
itself and explicitly via a suite of tests. The suite of tests is
about as large as the code base for the implementation, and it is
often the case that more lines of test code than implementation
code are added to support a new feature. We also benchmark the
system whenever we make a change that might materially affect
performance.
This project also includes documentation for Chez Scheme in the
form of a manual page, a user's guide, and release notes, and we
try to set high standards for this documentation. A feature isn't
fully implemented until it has been documented. Writing documentation
often exposes unnecessary complexity in the design and bugs in the
implementation, particularly in corner cases.
Consistent with these principles, we naturally want Chez Scheme to
evolve in various useful ways to, among other things:
* increase utility
* improve user friendliness
* support new standards
* run on new platforms
Backward compatibility should be maintained whenever feasible but
must sometimes take a back seat to progress in a system whose
lifetime is measured in decades.
Please keep in mind the following guidance when preparing contributions:
* Appropriate tests and documentation changes should be included
with all code changes.
* Coding structure (including indentation) should be consistent
with the existing code base. This implies that contributors should
study the existing code before contributing.
* Spend the time required to make the code as clean, clear, and
efficient as possible. All other things equal, shorter code is
preferable to longer code. Although some people believe more klocs
equals more value, code quality is in fact inversely proportional
to code size.
* All changes must be described in LOG as well as via git commit
messages and/or github pull request logs. The revision-control
system might change over time, but the LOG should always be present.
* Some contributions may be more appropriately published as projects
of their own. If you are contributing a significant extension built
using Chez Scheme, consider whether your contribution is such an
independent project. An example of such a project is the [Nanopass
Framework](http://github.com/nanopass/nanopass-framework-scheme)
which is both used by Chez Scheme and was initially written using
Chez Scheme, but evolves separately.
Before investing significant effort preparing a contribution,
consider running the idea by one of the committers for additional
guidance and advice.

2341
LOG

File diff suppressed because it is too large Load Diff

@ -0,0 +1,33 @@
Chez Scheme Version 9.5.9
Copyright 1984-2022 Cisco Systems, Inc.
This product includes code developed by Cisco Systems, Inc.
This product also includes separately copyrighted:
* Unicode data files from the Unicode Consortium
* Unicode data-file processing code developed by Abdulaziz Ghuloum and
R. Kent Dybvig
* sorting code developed by Olin Shivers
* example programs, an html formatting module, and documentation
support files developed by R. Kent Dybvig
* test code and other code used for testing developed by
William D Clinger, by Dirk Lutzebaeck, and by Oscar Waddell and
R. Kent Dybvig.
* code derived from C. David Boyer's command-line editor
Builds of this product incorporate separately copyrighted code from:
* the Nanopass Infrastructure, developed by Dipanwita Sarkar,
Andrew W. Keep, R. Kent Dybvig, and Oscar Waddell
* the Zlib compression library, developed by Jean-loup Gailly and
Mark Adler
* the LZ4 compression library, developed by Yann Collet and
contributors.

@ -0,0 +1,86 @@
# Makefile
# Copyright 1984-2017 Cisco Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
version = 9.5.9
m := $(shell find ../bin/* -type d | xargs basename)
R = csv$(version)
TARBALL = $(R)-$(m).tar.gz
CONTENTS=\
$(R)/LICENSE\
$(R)/NOTICE\
$(R)/scheme.1.in\
$(R)/installsh\
$(R)/Makefile\
$(R)/examples\
$(R)/boot\
$(R)/bin
$(TARBALL): $(CONTENTS)
( BROKEN=`find -L $R -type l` ; \
if test -n "$$BROKEN" ; then \
echo "Error: missing $(BROKEN)" ; \
exit 1 ; \
fi )
tar -czhf $(TARBALL) $R
rm -rf $(R)
$(R)/LICENSE: $(R)
( cd $(R) ; ln -s ../../../LICENSE . )
$(R)/NOTICE: $(R)
( cd $(R) ; ln -s ../../../NOTICE . )
$(R)/scheme.1.in: $(R)
( cd $(R) ; ln -s ../../scheme.1.in . )
$(R)/installsh: $(R)
( cd $(R) ; ln -s ../../installsh . )
$(R)/Makefile: $(R)
( cd $(R) ; ln -s ../../Mf-install Makefile )
$(R)/examples: $(R)
( cd $(R) ; ln -s ../../examples . )
$(R)/boot: $(R)
mkdir -p $(R)/boot/$(m)
( cd $(R)/boot/$(m) ; ln -s ../../../../boot/$(m)/{scheme.h,petite.boot,scheme.boot,revision} . )
case $(m) in \
*nt) \
( cd $R/boot/$(m) ; ln -s ../../../../boot/$(m)/{csv959md.lib,csv959mt.lib,mainmd.obj,mainmt.obj,scheme.res} . ) \
;; \
*) \
( cd $R/boot/$(m) ; ln -s ../../../../boot/$(m)/{main.o,kernel.o} . ) \
;; \
esac
$(R)/bin: $(R)
mkdir -p $(R)/bin/$(m)
case $(m) in \
*nt) \
( cd $R/bin/$(m) ; ln -s ../../../../bin/$(m)/{scheme.exe,csv959.dll,csv959.lib,vcruntime140.lib} . ) \
;; \
*) \
( cd $R/bin/$(m) ; ln -s ../../../../bin/$(m)/scheme . ) \
;; \
esac
$(R):
mkdir $(R)
clean:
rm -rf $(R) $(TARBALL)

@ -0,0 +1,993 @@
/* equates.h for Chez Scheme Version 9.5.9 */
/* Do not edit this file. It is automatically generated and */
/* specifically tailored to the version of Chez Scheme named */
/* above. Always be certain that you have the correct version */
/* of this file for the version of Chez Scheme you are using. */
/* Warning: Some macros may evaluate arguments more than once. */
/* Integer typedefs */
typedef char I8;
typedef unsigned char U8;
typedef short I16;
typedef unsigned short U16;
typedef int I32;
typedef unsigned int U32;
typedef long I64;
typedef unsigned long U64;
/* constants from cmacros.ss */
#define $c_func_closure_index 0x4
#define $c_func_closure_record_index 0x3
#define $c_func_code_object_index 0x2
#define $c_func_code_record_index 0x1
#define COMPRESS_FORMAT_BITS 0x3
#define COMPRESS_GZIP 0x0
#define COMPRESS_HIGH 0x3
#define COMPRESS_LOW 0x1
#define COMPRESS_LZ4 0x1
#define COMPRESS_MAX 0x4
#define COMPRESS_MEDIUM 0x2
#define COMPRESS_MIN 0x0
#define ERROR_CALL_ARGUMENT_COUNT 0x4
#define ERROR_CALL_NONPROCEDURE 0x3
#define ERROR_CALL_NONPROCEDURE_SYMBOL 0x2
#define ERROR_CALL_UNBOUND 0x1
#define ERROR_MVLET 0x8
#define ERROR_NONCONTINUABLE_INTERRUPT 0x6
#define ERROR_OTHER 0x0
#define ERROR_RESET 0x5
#define ERROR_VALUES 0x7
#define OPEN_ERROR_EXISTS 0x2
#define OPEN_ERROR_EXISTSNOT 0x3
#define OPEN_ERROR_OTHER 0x0
#define OPEN_ERROR_PROTECTION 0x1
#define PORT_FLAG_BINARY 0x400
#define PORT_FLAG_BLOCK_BUFFERED 0x20000
#define PORT_FLAG_BOL 0x8000
#define PORT_FLAG_CHAR_POSITIONS 0x100000
#define PORT_FLAG_CLOSED 0x800
#define PORT_FLAG_COMPRESSED 0x2000
#define PORT_FLAG_EOF 0x10000
#define PORT_FLAG_EXCLUSIVE 0x4000
#define PORT_FLAG_FILE 0x1000
#define PORT_FLAG_FOLD_CASE 0x400000
#define PORT_FLAG_INPUT 0x100
#define PORT_FLAG_INPUT_MODE 0x80000
#define PORT_FLAG_LINE_BUFFERED 0x40000
#define PORT_FLAG_NO_FOLD_CASE 0x800000
#define PORT_FLAG_OUTPUT 0x200
#define PORT_FLAG_R6RS 0x200000
#define SAPPEND 0x3
#define SDEFAULT 0x4
#define SEOF -0x1
#define SERROR 0x0
#define SICONV_DUNNO 0x0
#define SICONV_INCOMPLETE 0x2
#define SICONV_INVALID 0x1
#define SICONV_NOROOM 0x3
#define SREPLACE 0x2
#define STRVNCATE 0x1
#define address_bits 0x40
#define alloc_waste_maximum 0x800
#define annotation_all 0x3
#define annotation_debug 0x1
#define annotation_profile 0x2
#define architecture x86_64
#define asm_arg_reg_cnt 0x3
#define asm_arg_reg_max 0x5
#define bigit_bits 0x20
#define bigit_bytes 0x4
#define bignum_data_disp 0x9
#define bignum_length_factor 0x40
#define bignum_length_offset 0x6
#define bignum_sign_offset 0x5
#define bignum_type_disp 0x1
#define black_hole (ptr)0x46
#define box_ref_disp 0x9
#define box_type_disp 0x1
#define byte_alignment 0x10
#define byte_constant_mask 0xFFFFFFFFFFFFFFFF
#define bytes_per_card 0x200
#define bytes_per_segment 0x4000
#define bytevector_data_disp 0x9
#define bytevector_immutable_flag 0x4
#define bytevector_length_factor 0x8
#define bytevector_length_offset 0x3
#define bytevector_type_disp 0x1
#define c_entry_name_vector #(thread-context get-thread-context handle-apply-overflood handle-docall-error handle-overflow handle-overflood handle-nonprocedure-symbol thread-list split-and-resize raw-collect-cond raw-tc-mutex activate-thread deactivate-thread unactivate-thread handle-values-error handle-mvlet-error handle-arg-error foreign-entry install-library-entry get-more-room scan-remembered-set instantiate-code-object Sreturn Scall-one-result Scall-any-results)
#define c_entry_vector_size 0x19
#define cached_stack_link_disp 0x8
#define cached_stack_size_disp 0x0
#define card_offset_bits 0x9
#define cards_per_segment 0x20
#define char_data_offset 0x8
#define char_factor 0x100
#define closure_code_disp 0x3
#define closure_data_disp 0xB
#define code_arity_mask_disp 0x21
#define code_closure_length_disp 0x29
#define code_data_disp 0x41
#define code_flag_continuation 0x2
#define code_flag_guardian 0x8
#define code_flag_system 0x1
#define code_flag_template 0x4
#define code_flags_offset 0x8
#define code_info_disp 0x31
#define code_length_disp 0x9
#define code_name_disp 0x19
#define code_pinfos_disp 0x39
#define code_reloc_disp 0x11
#define code_type_disp 0x1
#define collect_interrupt_index 0x1
#define continuation_code_disp 0x3
#define continuation_link_disp 0x23
#define continuation_return_address_disp 0x2B
#define continuation_stack_clength_disp 0x1B
#define continuation_stack_disp 0xB
#define continuation_stack_length_disp 0x13
#define continuation_winders_disp 0x33
#define countof_bignum 0x5
#define countof_box 0x9
#define countof_bytevector 0x15
#define countof_closure 0x3
#define countof_code 0xB
#define countof_continuation 0x4
#define countof_ephemeron 0x19
#define countof_exactnum 0x8
#define countof_flonum 0x2
#define countof_fxvector 0x14
#define countof_guardian 0x17
#define countof_inexactnum 0x7
#define countof_locked 0x16
#define countof_oblist 0x18
#define countof_pair 0x0
#define countof_port 0xA
#define countof_ratnum 0x6
#define countof_relocation_table 0x10
#define countof_rtd_counts 0xE
#define countof_stack 0xF
#define countof_string 0x13
#define countof_symbol 0x1
#define countof_thread 0xC
#define countof_tlc 0xD
#define countof_types 0x1A
#define countof_vector 0x12
#define countof_weakpair 0x11
#define default_collect_trip_bytes 0x800000
#define default_heap_reserve_ratio 1.0
#define default_max_nonstatic_generation 0x4
#define default_stack_size 0xFFF0
#define default_timer_ticks 0x3E8
#define dtvec_hour 0x3
#define dtvec_isdst 0x9
#define dtvec_mday 0x4
#define dtvec_min 0x2
#define dtvec_mon 0x5
#define dtvec_nsec 0x0
#define dtvec_sec 0x1
#define dtvec_size 0xC
#define dtvec_tzname 0xB
#define dtvec_tzoff 0xA
#define dtvec_wday 0x7
#define dtvec_yday 0x8
#define dtvec_year 0x6
#define ephemeron_car_disp 0x7
#define ephemeron_cdr_disp 0xF
#define ephemeron_next_disp 0x17
#define ephemeron_trigger_next_disp 0x1F
#define eq_hashtable_subtype_ephemeron 0x2
#define eq_hashtable_subtype_normal 0x0
#define eq_hashtable_subtype_weak 0x1
#define exactnum_imag_disp 0x11
#define exactnum_real_disp 0x9
#define exactnum_type_disp 0x1
#define fasl_fld_double 0xA
#define fasl_fld_i16 0x2
#define fasl_fld_i24 0x3
#define fasl_fld_i32 0x4
#define fasl_fld_i40 0x5
#define fasl_fld_i48 0x6
#define fasl_fld_i56 0x7
#define fasl_fld_i64 0x8
#define fasl_fld_ptr 0x0
#define fasl_fld_single 0x9
#define fasl_fld_u8 0x1
#define fasl_header #vu8(0 0 0 0 99 104 101 122)
#define fasl_type_base_rtd 0x1A
#define fasl_type_box 0x1
#define fasl_type_bytevector 0x1D
#define fasl_type_closure 0x6
#define fasl_type_code 0xB
#define fasl_type_entry 0xD
#define fasl_type_ephemeron 0x1C
#define fasl_type_eq_hashtable 0x1F
#define fasl_type_exactnum 0x14
#define fasl_type_flonum 0x8
#define fasl_type_fxvector 0x1B
#define fasl_type_gensym 0x13
#define fasl_type_graph 0x10
#define fasl_type_graph_def 0x11
#define fasl_type_graph_ref 0x12
#define fasl_type_gzip 0x2B
#define fasl_type_header 0x0
#define fasl_type_immediate 0xC
#define fasl_type_immutable_box 0x29
#define fasl_type_immutable_bytevector 0x28
#define fasl_type_immutable_fxvector 0x27
#define fasl_type_immutable_string 0x26
#define fasl_type_immutable_vector 0x25
#define fasl_type_inexactnum 0x5
#define fasl_type_large_integer 0xA
#define fasl_type_library 0xE
#define fasl_type_library_code 0xF
#define fasl_type_lz4 0x2C
#define fasl_type_pair 0x7
#define fasl_type_ratnum 0x3
#define fasl_type_record 0x17
#define fasl_type_revisit 0x23
#define fasl_type_rtd 0x18
#define fasl_type_small_integer 0x19
#define fasl_type_string 0x9
#define fasl_type_symbol 0x2
#define fasl_type_symbol_hashtable 0x20
#define fasl_type_uncompressed 0x2A
#define fasl_type_vector 0x4
#define fasl_type_visit 0x22
#define fasl_type_visit_revisit 0x24
#define fasl_type_weak_pair 0x1E
#define fixnum_bits 0x3D
#define fixnum_factor 0x8
#define fixnum_offset 0x3
#define fld_byte_index 0x4
#define fld_mutablep_index 0x2
#define fld_name_index 0x1
#define fld_type_index 0x3
#define flonum_data_disp 0x6
#define forward_address_disp 0x8
#define forward_marker (ptr)0x2E
#define forward_marker_disp 0x0
#define ftype_guardian_rep (ptr)0x56
#define fxvector_data_disp 0x9
#define fxvector_immutable_flag 0x8
#define fxvector_length_factor 0x10
#define fxvector_length_offset 0x4
#define fxvector_type_disp 0x1
#define guardian_entry_next_disp 0x18
#define guardian_entry_obj_disp 0x0
#define guardian_entry_rep_disp 0x8
#define guardian_entry_tconc_disp 0x10
#define hashtable_default_size 0x8
#define header_size_bignum 0x8
#define header_size_bytevector 0x8
#define header_size_closure 0x8
#define header_size_code 0x40
#define header_size_fxvector 0x8
#define header_size_record 0x8
#define header_size_reloc_table 0x10
#define header_size_string 0x8
#define header_size_vector 0x8
#define ignore_event_flag 0x0
#define inexactnum_imag_disp 0x19
#define inexactnum_pad_disp 0x9
#define inexactnum_real_disp 0x11
#define inexactnum_type_disp 0x1
#define int_bits 0x20
#define integer_divide_instruction 1
#define keyboard_interrupt_index 0x3
#define library_entry_vector_size 0x210
#define libspec_closure_index 0xD
#define libspec_does_not_expect_headroom_index 0x0
#define libspec_error_index 0xE
#define libspec_fake_index 0x10
#define libspec_flags_index 0x2
#define libspec_has_does_not_expect_headroom_version_index 0xF
#define libspec_index_base_offset 0x1
#define libspec_index_base_size 0x9
#define libspec_index_offset 0x0
#define libspec_index_size 0xA
#define libspec_interface_offset 0xA
#define libspec_interface_size 0x3
#define libspec_name_index 0x1
#define log2_ptr_bytes 0x3
#define long_bits 0x40
#define long_long_bits 0x40
#define machine_type 0xB
#define machine_type_a6fb 0x15
#define machine_type_a6le 0xB
#define machine_type_a6nb 0x19
#define machine_type_a6nt 0x1B
#define machine_type_a6ob 0xF
#define machine_type_a6osx 0xD
#define machine_type_a6s2 0x11
#define machine_type_alist ((0 . any) (1 . i3le) (2 . ti3le) (3 . i3nt) (4 . ti3nt) (5 . i3fb) (6 . ti3fb) (7 . i3ob) (8 . ti3ob) (9 . i3osx) (10 . ti3osx) (11 . a6le) (12 . ta6le) (13 . a6osx) (14 . ta6osx) (15 . a6ob) (16 . ta6ob) (17 . a6s2) (18 . ta6s2) (19 . i3s2) (20 . ti3s2) (21 . a6fb) (22 . ta6fb) (23 . i3nb) (24 . ti3nb) (25 . a6nb) (26 . ta6nb) (27 . a6nt) (28 . ta6nt) (29 . i3qnx) (30 . ti3qnx) (31 . arm32le) (32 . tarm32le) (33 . ppc32le) (34 . tppc32le))
#define machine_type_any 0x0
#define machine_type_arm32le 0x1F
#define machine_type_i3fb 0x5
#define machine_type_i3le 0x1
#define machine_type_i3nb 0x17
#define machine_type_i3nt 0x3
#define machine_type_i3ob 0x7
#define machine_type_i3osx 0x9
#define machine_type_i3qnx 0x1D
#define machine_type_i3s2 0x13
#define machine_type_limit 0x23
#define machine_type_name a6le
#define machine_type_ppc32le 0x21
#define machine_type_ta6fb 0x16
#define machine_type_ta6le 0xC
#define machine_type_ta6nb 0x1A
#define machine_type_ta6nt 0x1C
#define machine_type_ta6ob 0x10
#define machine_type_ta6osx 0xE
#define machine_type_ta6s2 0x12
#define machine_type_tarm32le 0x20
#define machine_type_ti3fb 0x6
#define machine_type_ti3le 0x2
#define machine_type_ti3nb 0x18
#define machine_type_ti3nt 0x4
#define machine_type_ti3ob 0x8
#define machine_type_ti3osx 0xA
#define machine_type_ti3qnx 0x1E
#define machine_type_ti3s2 0x14
#define machine_type_tppc32le 0x22
#define mask_bignum 0x1F
#define mask_bignum_sign 0x20
#define mask_binary_input_port 0x5FF
#define mask_binary_output_port 0x6FF
#define mask_binary_port 0x4FF
#define mask_boolean 0xF7
#define mask_box 0x7F
#define mask_bwp 0xFFFFFFFFFFFFFFFF
#define mask_bytevector 0x3
#define mask_char 0xFF
#define mask_closure 0x7
#define mask_code 0xFF
#define mask_continuation_code 0x2FF
#define mask_eof 0xFFFFFFFFFFFFFFFF
#define mask_exactnum 0xFFFFFFFFFFFFFFFF
#define mask_false 0xFFFFFFFFFFFFFFFF
#define mask_fixnum 0x7
#define mask_flonum 0x7
#define mask_fxvector 0x7
#define mask_guardian_code 0x8FF
#define mask_immediate 0x7
#define mask_inexactnum 0xFFFFFFFFFFFFFFFF
#define mask_input_port 0x1FF
#define mask_mutable_box 0xFFFFFFFFFFFFFFFF
#define mask_mutable_bytevector 0x7
#define mask_mutable_fxvector 0xF
#define mask_mutable_string 0xF
#define mask_mutable_vector 0xF
#define mask_nil 0xFFFFFFFFFFFFFFFF
#define mask_octet -0x7F9
#define mask_other_number 0xF
#define mask_output_port 0x2FF
#define mask_pair 0x7
#define mask_port 0xFF
#define mask_ratnum 0xFFFFFFFFFFFFFFFF
#define mask_record 0x7
#define mask_rtd_counts 0xFFFFFFFFFFFFFFFF
#define mask_signed_bignum 0x3F
#define mask_string 0x7
#define mask_symbol 0x7
#define mask_system_code 0x1FF
#define mask_textual_input_port 0x5FF
#define mask_textual_output_port 0x6FF
#define mask_textual_port 0x4FF
#define mask_thread 0xFFFFFFFFFFFFFFFF
#define mask_tlc 0xFFFFFFFFFFFFFFFF
#define mask_typed_object 0x7
#define mask_unbound 0xFFFFFFFFFFFFFFFF
#define mask_vector 0x7
#define max_float_alignment 0x8
#define max_integer_alignment 0x8
#define max_real_space 0xB
#define max_space 0xC
#define max_sweep_space 0xA
#define maximum_bignum_length (iptr)0x3FFFFFFFFFFFFFF
#define maximum_bytevector_length (iptr)0xFFFFFFFFFFFFFFF
#define maximum_fxvector_length (iptr)0xFFFFFFFFFFFFFFF
#define maximum_interrupt_index 0x4
#define maximum_string_length (iptr)0xFFFFFFFFFFFFFFF
#define maximum_vector_length (iptr)0xFFFFFFFFFFFFFFF
#define minimum_segment_request 0x80
#define most_negative_fixnum (iptr)-0x1000000000000000
#define most_positive_fixnum (iptr)0xFFFFFFFFFFFFFFF
#define native_endianness little
#define one_shot_headroom 0xC00
#define ordinary_type_bits 0x8
#define pair_car_disp 0x7
#define pair_cdr_disp 0xF
#define pair_shift 0x4
#define port_flag_binary 0x4
#define port_flag_block_buffered 0x200
#define port_flag_bol 0x80
#define port_flag_char_positions 0x1000
#define port_flag_closed 0x8
#define port_flag_compressed 0x20
#define port_flag_eof 0x100
#define port_flag_exclusive 0x40
#define port_flag_file 0x10
#define port_flag_fold_case 0x4000
#define port_flag_input 0x1
#define port_flag_input_mode 0x800
#define port_flag_line_buffered 0x400
#define port_flag_no_fold_case 0x8000
#define port_flag_output 0x2
#define port_flag_r6rs 0x2000
#define port_flags_offset 0x8
#define port_handler_disp 0x9
#define port_ibuffer_disp 0x39
#define port_icount_disp 0x19
#define port_ilast_disp 0x31
#define port_info_disp 0x41
#define port_name_disp 0x49
#define port_obuffer_disp 0x29
#define port_ocount_disp 0x11
#define port_olast_disp 0x21
#define port_type_disp 0x1
#define prelex_is_flags_offset 0x8
#define prelex_is_mask 0xFF00
#define prelex_sticky_mask 0xFF
#define prelex_was_flags_offset 0x10
#define primary_type_bits 0x3
#define ptr_bits 0x40
#define ptr_bytes 0x8
#define ptrdiff_t_bits 0x40
#define ratnum_denominator_disp 0x11
#define ratnum_numerator_disp 0x9
#define ratnum_type_disp 0x1
#define real_space_alist ((new . 0) (impure . 1) (symbol . 2) (port . 3) (weakpair . 4) (ephemeron . 5) (pure . 6) (continuation . 7) (code . 8) (pure-typed-object . 9) (impure-record . 10) (data . 11))
#define record_data_disp 0x9
#define record_type_counts_disp 0x49
#define record_type_disp 0x1
#define record_type_flags_disp 0x39
#define record_type_flds_disp 0x31
#define record_type_mpm_disp 0x21
#define record_type_name_disp 0x29
#define record_type_parent_disp 0x9
#define record_type_pm_disp 0x19
#define record_type_size_disp 0x11
#define record_type_type_disp 0x1
#define record_type_uid_disp 0x41
#define reloc_abs 0x0
#define reloc_code_offset_index 0x3
#define reloc_code_offset_mask 0x3FFFFFF
#define reloc_code_offset_offset 0x4
#define reloc_extended_format 0x1
#define reloc_item_offset_index 0x2
#define reloc_item_offset_mask 0x3FFFFFF
#define reloc_item_offset_offset 0x1E
#define reloc_longp_index 0x4
#define reloc_table_code_disp 0x8
#define reloc_table_data_disp 0x10
#define reloc_table_size_disp 0x0
#define reloc_type_index 0x1
#define reloc_type_mask 0x7
#define reloc_type_offset 0x1
#define reloc_x86_64_call 0x1
#define reloc_x86_64_jump 0x2
#define return_address_frame_size_disp -0x10
#define return_address_livemask_disp -0x20
#define return_address_mv_return_address_disp -0x8
#define return_address_toplink_disp -0x18
#define rp_header_frame_size_disp 0x10
#define rp_header_livemask_disp 0x0
#define rp_header_mv_return_address_disp 0x18
#define rp_header_toplink_disp 0x8
#define rtd_counts_data_disp 0x11
#define rtd_counts_timestamp_disp 0x9
#define rtd_counts_type_disp 0x1
#define rtd_generative 0x1
#define rtd_opaque 0x2
#define rtd_sealed 0x4
#define sbwp (ptr)0x4E
#define scaled_shot_1_shot_flag -0x8
#define scheme_version 0x90509
#define segment_card_offset_bits 0x5
#define segment_offset_bits 0xE
#define segment_t1_bits 0x10
#define segment_t2_bits 0x11
#define segment_t3_bits 0x11
#define segment_table_levels 0x3
#define seof (ptr)0x36
#define sfalse (ptr)0x6
#define short_bits 0x10
#define signal_interrupt_index 0x4
#define size_box 0x10
#define size_cached_stack 0x10
#define size_continuation 0x40
#define size_ephemeron 0x20
#define size_exactnum 0x20
#define size_flonum 0x10
#define size_forward 0x10
#define size_guardian_entry 0x20
#define size_inexactnum 0x20
#define size_pair 0x10
#define size_port 0x50
#define size_ratnum 0x20
#define size_record_type 0x50
#define size_rp_header 0x20
#define size_rtd_counts 0x810
#define size_symbol 0x30
#define size_tc 0x2C0
#define size_thread 0x10
#define size_tlc 0x20
#define size_typed_object 0x10
#define size_t_bits 0x40
#define snil (ptr)0x26
#define space_char_list (#\n #\i #\x #\q #\w #\e #\p #\k #\c #\r #\s #\d #\e)
#define space_cname_list ("new" "impure" "symbol" "port" "weakpr" "emph" "pure" "cont" "code" "p-tobj" "ip-rec" "data" "empty")
#define space_code 0x8
#define space_continuation 0x7
#define space_data 0xB
#define space_empty 0xC
#define space_ephemeron 0x5
#define space_impure 0x1
#define space_impure_record 0xA
#define space_locked 0x20
#define space_new 0x0
#define space_old 0x40
#define space_port 0x3
#define space_pure 0x6
#define space_pure_typed_object 0x9
#define space_symbol 0x2
#define space_weakpair 0x4
#define stack_frame_limit 0x200
#define stack_slop 0x400
#define static_generation 0xFF
#define string_char_bits 0x20
#define string_char_bytes 0x4
#define string_char_offset 0x2
#define string_data_disp 0x9
#define string_immutable_flag 0x8
#define string_length_factor 0x10
#define string_length_offset 0x4
#define string_type_disp 0x1
#define strue (ptr)0xE
#define sunbound (ptr)0x1E
#define svoid (ptr)0x3E
#define symbol_hash_disp 0x2D
#define symbol_name_disp 0x1D
#define symbol_plist_disp 0x15
#define symbol_pvalue_disp 0xD
#define symbol_splist_disp 0x25
#define symbol_value_disp 0x5
#define tc_DSTBV_disp 0x2A8
#define tc_SRCBV_disp 0x2B0
#define tc_U_disp 0x160
#define tc_V_disp 0x168
#define tc_W_disp 0x170
#define tc_X_disp 0x178
#define tc_Y_disp 0x180
#define tc_ac0_disp 0x28
#define tc_ac1_disp 0x30
#define tc_active_disp 0x134
#define tc_alloc_counter_disp 0x298
#define tc_ap_disp 0x50
#define tc_arg_regs_disp 0x0
#define tc_block_counter_disp 0x1D8
#define tc_cchain_disp 0x120
#define tc_code_ranges_to_flush_disp 0x128
#define tc_compile_profile_disp 0x230
#define tc_compress_format_disp 0x278
#define tc_compress_level_disp 0x280
#define tc_cp_disp 0x40
#define tc_current_error_disp 0x1D0
#define tc_current_input_disp 0x1C0
#define tc_current_mso_disp 0x1E8
#define tc_current_output_disp 0x1C8
#define tc_default_record_equal_procedure_disp 0x268
#define tc_default_record_hash_procedure_disp 0x270
#define tc_disable_count_disp 0x198
#define tc_eap_disp 0x58
#define tc_esp_disp 0x48
#define tc_fxfirst_bit_set_bv_disp 0x200
#define tc_fxlength_bv_disp 0x1F8
#define tc_generate_inspector_information_disp 0x238
#define tc_generate_procedure_source_information_disp 0x240
#define tc_generate_profile_forms_disp 0x248
#define tc_guardian_entries_disp 0x118
#define tc_instr_counter_disp 0x290
#define tc_keyboard_interrupt_pending_disp 0x1B0
#define tc_lz4_out_buffer_disp 0x288
#define tc_meta_level_disp 0x228
#define tc_null_immutable_bytevector_disp 0x218
#define tc_null_immutable_fxvector_disp 0x210
#define tc_null_immutable_string_disp 0x220
#define tc_null_immutable_vector_disp 0x208
#define tc_optimize_level_disp 0x250
#define tc_parameters_disp 0x2A0
#define tc_random_seed_disp 0x130
#define tc_real_eap_disp 0x90
#define tc_ret_disp 0x60
#define tc_scheme_stack_disp 0x138
#define tc_scheme_stack_size_disp 0x150
#define tc_sfd_disp 0x1E0
#define tc_sfp_disp 0x38
#define tc_signal_interrupt_pending_disp 0x1A0
#define tc_signal_interrupt_queue_disp 0x1A8
#define tc_something_pending_disp 0x188
#define tc_stack_cache_disp 0x140
#define tc_stack_link_disp 0x148
#define tc_subset_mode_disp 0x258
#define tc_suppress_primitive_inlining_disp 0x260
#define tc_target_machine_disp 0x1F0
#define tc_td_disp 0x88
#define tc_threadno_disp 0x1B8
#define tc_timer_ticks_disp 0x190
#define tc_trap_disp 0x68
#define tc_ts_disp 0x80
#define tc_virtual_registers_disp 0x98
#define tc_winders_disp 0x158
#define tc_xp_disp 0x70
#define tc_yp_disp 0x78
#define thread_tc_disp 0x9
#define thread_type_disp 0x1
#define time_collector_cpu 0x5
#define time_collector_real 0x6
#define time_duration 0x2
#define time_monotonic 0x3
#define time_process 0x0
#define time_t_bits 0x40
#define time_thread 0x1
#define time_utc 0x4
#define timer_interrupt_index 0x2
#define tlc_ht_disp 0x11
#define tlc_keyval_disp 0x9
#define tlc_next_disp 0x19
#define tlc_type_disp 0x1
#define type_bignum 0x6
#define type_binary_input_port 0x51E
#define type_binary_output_port 0x61E
#define type_binary_port 0x41E
#define type_boolean 0x6
#define type_box 0xE
#define type_bytevector 0x1
#define type_char 0x16
#define type_closure 0x5
#define type_code 0x3E
#define type_continuation_code 0x23E
#define type_exactnum 0x56
#define type_fixnum 0x0
#define type_flonum 0x2
#define type_fxvector 0x3
#define type_guardian_code 0x83E
#define type_immediate 0x6
#define type_immutable_box 0x8E
#define type_immutable_bytevector 0x5
#define type_immutable_fxvector 0xB
#define type_immutable_string 0xA
#define type_immutable_vector 0x8
#define type_inexactnum 0x36
#define type_input_port 0x11E
#define type_io_port 0x31E
#define type_mutable_box 0xE
#define type_mutable_bytevector 0x1
#define type_mutable_fxvector 0x3
#define type_mutable_string 0x2
#define type_mutable_vector 0x0
#define type_negative_bignum 0x26
#define type_octet 0x0
#define type_other_number 0x6
#define type_output_port 0x21E
#define type_pair 0x1
#define type_port 0x1E
#define type_positive_bignum 0x6
#define type_ratnum 0x16
#define type_record 0x7
#define type_rtd_counts 0x6E
#define type_string 0x2
#define type_symbol 0x3
#define type_system_code 0x13E
#define type_textual_input_port 0x11E
#define type_textual_output_port 0x21E
#define type_textual_port 0x1E
#define type_thread 0x4E
#define type_tlc 0x5E
#define type_typed_object 0x7
#define type_vector 0x0
#define typed_object_type_disp 0x1
#define typedef_i16 "short"
#define typedef_i32 "int"
#define typedef_i64 "long"
#define typedef_i8 "char"
#define typedef_iptr "long int"
#define typedef_ptr "void *"
#define typedef_string_char "unsigned int"
#define typedef_u16 "unsigned short"
#define typedef_u32 "unsigned int"
#define typedef_u64 "unsigned long"
#define typedef_u8 "unsigned char"
#define typedef_uptr "unsigned long int"
#define typemod 0x8
#define unactivate_mode_deactivate 0x1
#define unactivate_mode_destroy 0x2
#define unactivate_mode_noop 0x0
#define unaligned_floats 1
#define unaligned_integers 1
#define underflow_limit 0x80
#define unscaled_shot_1_shot_flag -0x1
#define vector_data_disp 0x9
#define vector_immutable_flag 0x8
#define vector_length_factor 0x10
#define vector_length_offset 0x4
#define vector_type_disp 0x1
#define virtual_register_count 0x10
#define wchar_bits 0x20
/* constants from declare-c-entries */
#define CENTRY_Scall_any_results 24
#define CENTRY_Scall_one_result 23
#define CENTRY_Sreturn 22
#define CENTRY_activate_thread 11
#define CENTRY_deactivate_thread 12
#define CENTRY_foreign_entry 17
#define CENTRY_get_more_room 19
#define CENTRY_get_thread_context 1
#define CENTRY_handle_apply_overflood 2
#define CENTRY_handle_arg_error 16
#define CENTRY_handle_docall_error 3
#define CENTRY_handle_mvlet_error 15
#define CENTRY_handle_nonprocedure_symbol 6
#define CENTRY_handle_overflood 5
#define CENTRY_handle_overflow 4
#define CENTRY_handle_values_error 14
#define CENTRY_install_library_entry 18
#define CENTRY_instantiate_code_object 21
#define CENTRY_raw_collect_cond 9
#define CENTRY_raw_tc_mutex 10
#define CENTRY_scan_remembered_set 20
#define CENTRY_split_and_resize 8
#define CENTRY_thread_context 0
#define CENTRY_thread_list 7
#define CENTRY_unactivate_thread 13
/* displacements for records */
#define eq_hashtable_rtd_disp 1
#define eq_hashtable_type_disp 9
#define eq_hashtable_mutablep_disp 17
#define eq_hashtable_vec_disp 25
#define eq_hashtable_minlen_disp 33
#define eq_hashtable_size_disp 41
#define eq_hashtable_subtype_disp 49
#define symbol_hashtable_rtd_disp 1
#define symbol_hashtable_type_disp 9
#define symbol_hashtable_mutablep_disp 17
#define symbol_hashtable_vec_disp 25
#define symbol_hashtable_minlen_disp 33
#define symbol_hashtable_size_disp 41
#define symbol_hashtable_equivp_disp 49
#define code_info_rtd_disp 1
#define code_info_src_disp 9
#define code_info_sexpr_disp 17
#define code_info_free_disp 25
#define code_info_live_disp 33
#define code_info_rpis_disp 41
/* predicates */
#define Simmediatep(x) (((uptr)(x)&0x7)==0x6)
#define Sportp(x) ((((uptr)(x)&0x7)==0x7) &&\
(((uptr)((*((ptr *)((uptr)(x)+1))))&0xFF)==0x1E))
#define Scodep(x) ((((uptr)(x)&0x7)==0x7) &&\
(((uptr)((*((ptr *)((uptr)(x)+1))))&0xFF)==0x3E))
/* structure accessors */
#define INITCAR(x) (*((ptr *)((uptr)(x)+7)))
#define INITCDR(x) (*((ptr *)((uptr)(x)+15)))
#define SETCAR(x,y) DIRTYSET(((ptr *)((uptr)(x)+7)),(y))
#define SETCDR(x,y) DIRTYSET(((ptr *)((uptr)(x)+15)),(y))
#define BOXTYPE(x) (*((iptr *)((uptr)(x)+1)))
#define INITBOXREF(x) (*((ptr *)((uptr)(x)+9)))
#define SETBOXREF(x,y) DIRTYSET(((ptr *)((uptr)(x)+9)),(y))
#define EPHEMERONNEXT(x) (*((ptr *)((uptr)(x)+23)))
#define INITEPHEMERONNEXT(x) (*((ptr *)((uptr)(x)+23)))
#define EPHEMERONTRIGGERNEXT(x) (*((ptr *)((uptr)(x)+31)))
#define INITEPHEMERONTRIGGERNEXT(x) (*((ptr *)((uptr)(x)+31)))
#define TLCTYPE(x) (*((iptr *)((uptr)(x)+1)))
#define TLCKEYVAL(x) (*((ptr *)((uptr)(x)+9)))
#define TLCHT(x) (*((ptr *)((uptr)(x)+17)))
#define TLCNEXT(x) (*((ptr *)((uptr)(x)+25)))
#define INITTLCKEYVAL(x) (*((ptr *)((uptr)(x)+9)))
#define INITTLCHT(x) (*((ptr *)((uptr)(x)+17)))
#define INITTLCNEXT(x) (*((ptr *)((uptr)(x)+25)))
#define SETTLCNEXT(x,y) DIRTYSET(((ptr *)((uptr)(x)+25)),(y))
#define SYMVAL(x) (*((ptr *)((uptr)(x)+5)))
#define SYMPVAL(x) (*((ptr *)((uptr)(x)+13)))
#define SYMPLIST(x) (*((ptr *)((uptr)(x)+21)))
#define SYMNAME(x) (*((ptr *)((uptr)(x)+29)))
#define SYMSPLIST(x) (*((ptr *)((uptr)(x)+37)))
#define SYMHASH(x) (*((ptr *)((uptr)(x)+45)))
#define INITSYMVAL(x) (*((ptr *)((uptr)(x)+5)))
#define INITSYMPVAL(x) (*((ptr *)((uptr)(x)+13)))
#define INITSYMPLIST(x) (*((ptr *)((uptr)(x)+21)))
#define INITSYMNAME(x) (*((ptr *)((uptr)(x)+29)))
#define INITSYMSPLIST(x) (*((ptr *)((uptr)(x)+37)))
#define INITSYMHASH(x) (*((ptr *)((uptr)(x)+45)))
#define SETSYMVAL(x,y) DIRTYSET(((ptr *)((uptr)(x)+5)),(y))
#define SETSYMPVAL(x,y) DIRTYSET(((ptr *)((uptr)(x)+13)),(y))
#define SETSYMPLIST(x,y) DIRTYSET(((ptr *)((uptr)(x)+21)),(y))
#define SETSYMNAME(x,y) DIRTYSET(((ptr *)((uptr)(x)+29)),(y))
#define SETSYMSPLIST(x,y) DIRTYSET(((ptr *)((uptr)(x)+37)),(y))
#define SETSYMHASH(x,y) DIRTYSET(((ptr *)((uptr)(x)+45)),(y))
#define VECTTYPE(x) (*((iptr *)((uptr)(x)+1)))
#define INITVECTIT(x,i) (((ptr *)((uptr)(x)+9))[i])
#define SETVECTIT(x,i,y) DIRTYSET((((ptr *)((uptr)(x)+9))+i),(y))
#define FXVECTOR_TYPE(x) (*((iptr *)((uptr)(x)+1)))
#define FXVECTIT(x,i) (((ptr *)((uptr)(x)+9))[i])
#define BYTEVECTOR_TYPE(x) (*((iptr *)((uptr)(x)+1)))
#define BVIT(x,i) (((octet *)((uptr)(x)+9))[i])
#define INEXACTNUM_TYPE(x) (*((iptr *)((uptr)(x)+1)))
#define INEXACTNUM_REAL_PART(x) (*((double *)((uptr)(x)+17)))
#define INEXACTNUM_IMAG_PART(x) (*((double *)((uptr)(x)+25)))
#define EXACTNUM_TYPE(x) (*((iptr *)((uptr)(x)+1)))
#define EXACTNUM_REAL_PART(x) (*((ptr *)((uptr)(x)+9)))
#define EXACTNUM_IMAG_PART(x) (*((ptr *)((uptr)(x)+17)))
#define RATTYPE(x) (*((iptr *)((uptr)(x)+1)))
#define RATNUM(x) (*((ptr *)((uptr)(x)+9)))
#define RATDEN(x) (*((ptr *)((uptr)(x)+17)))
#define CLOSENTRY(x) (*((ptr *)((uptr)(x)+3)))
#define CLOSIT(x,i) (((ptr *)((uptr)(x)+11))[i])
#define FLODAT(x) (*((double *)((uptr)(x)+6)))
#define PORTTYPE(x) (*((iptr *)((uptr)(x)+1)))
#define PORTNAME(x) (*((ptr *)((uptr)(x)+73)))
#define PORTHANDLER(x) (*((ptr *)((uptr)(x)+9)))
#define PORTINFO(x) (*((ptr *)((uptr)(x)+65)))
#define PORTOCNT(x) (*((iptr *)((uptr)(x)+17)))
#define PORTOLAST(x) (*((ptr *)((uptr)(x)+33)))
#define PORTOBUF(x) (*((ptr *)((uptr)(x)+41)))
#define PORTICNT(x) (*((iptr *)((uptr)(x)+25)))
#define PORTILAST(x) (*((ptr *)((uptr)(x)+49)))
#define PORTIBUF(x) (*((ptr *)((uptr)(x)+57)))
#define STRTYPE(x) (*((iptr *)((uptr)(x)+1)))
#define STRIT(x,i) (((string_char *)((uptr)(x)+9))[i])
#define BIGTYPE(x) (*((iptr *)((uptr)(x)+1)))
#define BIGIT(x,i) (((bigit *)((uptr)(x)+9))[i])
#define CODETYPE(x) (*((iptr *)((uptr)(x)+1)))
#define CODELEN(x) (*((iptr *)((uptr)(x)+9)))
#define CODERELOC(x) (*((ptr *)((uptr)(x)+17)))
#define CODENAME(x) (*((ptr *)((uptr)(x)+25)))
#define CODEARITYMASK(x) (*((ptr *)((uptr)(x)+33)))
#define CODEFREE(x) (*((iptr *)((uptr)(x)+41)))
#define CODEINFO(x) (*((ptr *)((uptr)(x)+49)))
#define CODEPINFOS(x) (*((ptr *)((uptr)(x)+57)))
#define CODEIT(x,i) (((octet *)((uptr)(x)+65))[i])
#define RELOCSIZE(x) (*((iptr *)((uptr)(x)+0)))
#define RELOCCODE(x) (*((ptr *)((uptr)(x)+8)))
#define RELOCIT(x,i) (((uptr *)((uptr)(x)+16))[i])
#define CONTSTACK(x) (*((ptr *)((uptr)(x)+11)))
#define CONTLENGTH(x) (*((iptr *)((uptr)(x)+19)))
#define CONTCLENGTH(x) (*((iptr *)((uptr)(x)+27)))
#define CONTLINK(x) (*((ptr *)((uptr)(x)+35)))
#define CONTRET(x) (*((ptr *)((uptr)(x)+43)))
#define CONTWINDERS(x) (*((ptr *)((uptr)(x)+51)))
#define RTDCOUNTSTYPE(x) (*((iptr *)((uptr)(x)+1)))
#define RTDCOUNTSTIMESTAMP(x) (*((U64 *)((uptr)(x)+9)))
#define RTDCOUNTSIT(x,i) (((uptr *)((uptr)(x)+17))[i])
#define RECORDDESCPARENT(x) (*((ptr *)((uptr)(x)+9)))
#define RECORDDESCSIZE(x) (*((ptr *)((uptr)(x)+17)))
#define RECORDDESCPM(x) (*((ptr *)((uptr)(x)+25)))
#define RECORDDESCMPM(x) (*((ptr *)((uptr)(x)+33)))
#define RECORDDESCNAME(x) (*((ptr *)((uptr)(x)+41)))
#define RECORDDESCFLDS(x) (*((ptr *)((uptr)(x)+49)))
#define RECORDDESCFLAGS(x) (*((ptr *)((uptr)(x)+57)))
#define RECORDDESCUID(x) (*((ptr *)((uptr)(x)+65)))
#define RECORDDESCCOUNTS(x) (*((ptr *)((uptr)(x)+73)))
#define RECORDINSTTYPE(x) (*((ptr *)((uptr)(x)+1)))
#define RECORDINSTIT(x,i) (((ptr *)((uptr)(x)+9))[i])
#define CLOSCODE(p) ((ptr)((uptr)CLOSENTRY(p)-code_data_disp))
#define CODEENTRYPOINT(x) ((ptr)((uptr)(x)+code_data_disp))
#define SETCLOSCODE(p,x) (CLOSENTRY(p) = CODEENTRYPOINT(x))
#define SYMCODE(p) ((ptr)((uptr)SYMPVAL(p)-code_data_disp))
#define INITSYMCODE(p,x) (INITSYMPVAL(p) = CODEENTRYPOINT(x))
#define SETSYMCODE(p,x) SETSYMPVAL(p,CODEENTRYPOINT(x))
#define BIGLEN(x) ((iptr)((uptr)BIGTYPE(x) >> bignum_length_offset))
#define BIGSIGN(x) ((BIGTYPE(x) & mask_bignum_sign) >> bignum_sign_offset)
#define SETBIGLENANDSIGN(x,xl,xs) BIGTYPE(x) = (uptr)(xl) << bignum_length_offset | (xs) << bignum_sign_offset | type_bignum
#define CLOSLEN(p) CODEFREE(CLOSCODE(p))
#define GUARDIANOBJ(x) (*((ptr *)((uptr)(x)+0)))
#define GUARDIANREP(x) (*((ptr *)((uptr)(x)+8)))
#define GUARDIANTCONC(x) (*((ptr *)((uptr)(x)+16)))
#define GUARDIANNEXT(x) (*((ptr *)((uptr)(x)+24)))
#define INITGUARDIANOBJ(x) (*((ptr *)((uptr)(x)+0)))
#define INITGUARDIANREP(x) (*((ptr *)((uptr)(x)+8)))
#define INITGUARDIANTCONC(x) (*((ptr *)((uptr)(x)+16)))
#define INITGUARDIANNEXT(x) (*((ptr *)((uptr)(x)+24)))
#define FORWARDMARKER(x) (*((ptr *)((uptr)(x)+0)))