mirror of
git://git.code.sf.net/p/sbcl/sbcl
synced 2026-09-10 07:26:40 -04:00
CONSTRAINT-PROPAGATE optimizers can add new information about the
state of the world after/if the function has returned. Function
type declarations/propagation suffice for simple patterns (e.g.
return types, or unconditional type requirements on arguments),
but this optimizer is more general.
Such optimizers receive two arguments, the combination node and the
current set of constraints, and return a sequence of constraints.
Constraints are lists of three or four values:
1. a constraint kind (either TYPEP, <, >, or EQL);
2, 3. two arguments, either LVARs, LAMBDA-VARs or a CTYPE;
4. optionally, whether the meaning of the constraint must be
flipped.
This mimics the (defstruct (constraint ...)) in constraint.lisp.
If any of the argument is NIL, the constraint is skipped; otherwise,
it is added to current set of constraints. Optimizers have access
to that set, and can thus map LVARs to LAMBDA-VARs thanks to
OK-LVAR-LAMBDA-VAR.
CONSTRAINT-PROPAGATE-IF optimizers can instead hook into the
interpretation of functions as predicate, when their result feeds
into an IF node. They also receive the node and the current set
of constraints as arguments, and return four values. The first two
values are an LVAR and a CTYPE: if they are non-NIL, that LVAR is
of that CTYPE iff the combination returns true. The two remaining
values are sequences of constraints (see previous paragraph) for
the consequent (if-true) and alternative (if-false) branches,
respectively. These are useful for more complex tests, but also
to represent partial information, e.g., if an EQUAL test fails,
the two values are not EQL either.
|
||
|---|---|---|
| contrib | ||
| doc | ||
| src | ||
| tests | ||
| tools-for-build | ||
| .cvsignore | ||
| .gitignore | ||
| .mailmap | ||
| base-target-features.lisp-expr | ||
| binary-distribution.sh | ||
| BUGS | ||
| build-order.lisp-expr | ||
| clean.sh | ||
| common-lisp-exports.lisp-expr | ||
| COPYING | ||
| CREDITS | ||
| distclean.sh | ||
| find-gnumake.sh | ||
| generate-version.sh | ||
| HACKING | ||
| html-distribution.sh | ||
| INSTALL | ||
| install.sh | ||
| make-config.sh | ||
| make-genesis-2.lisp | ||
| make-genesis-2.sh | ||
| make-host-1.lisp | ||
| make-host-1.sh | ||
| make-host-2.lisp | ||
| make-host-2.sh | ||
| make-target-1.sh | ||
| make-target-2-load.lisp | ||
| make-target-2.lisp | ||
| make-target-2.sh | ||
| make-target-contrib.sh | ||
| make-windows-installer.sh | ||
| make.sh | ||
| NEWS | ||
| OPTIMIZATIONS | ||
| package-data-list.lisp-expr | ||
| PRINCIPLES | ||
| pubring.pgp | ||
| README | ||
| release.sh | ||
| run-sbcl.sh | ||
| sbcl-pwd.sh | ||
| slam.sh | ||
| source-distribution.sh | ||
| tagify.sh | ||
| TLA | ||
| TODO | ||
| wc.sh | ||
GENERAL INFORMATION Welcome to SBCL. If you'd like to install or build the system, see the "INSTALL" file. To find out more about who created the system, see the "CREDITS" file. If you'd like information about the legalities of copying the system, see the "COPYING" file. If you'd like more information about using the system, see the man page, "sbcl.1", or the user manual in the "doc/manual" subdirectory of the distribution. (The user manual is maintained as Texinfo in the source distribution; HTML version is available for download, and "INSTALL" describes how to build the Texinfo version in HTML and PDF.) The system is a work in progress. See the "TODO" file in the source distribution for some highlights. The "BUGS" file lists current known bugs. If you'd like to make suggestions, report a bug, or help to improve the system, please send mail to one of the mailing lists: sbcl-help@lists.sourceforge.net sbcl-devel@lists.sourceforge.net Note that as a spam reduction measure you must subscribe to the lists before you can post. SYSTEM-SPECIFIC HINTS for NetBSD: NetBSD 2.0 and above are required because of the lack of needed signal APIs in NetBSD 1.6 and earlier.