LilyPond-Ruby 0.0.2.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/etc/fonts/conf.d/10-hinting-slight.conf +15 -0
- data/etc/fonts/conf.d/10-scale-bitmap-fonts.conf +83 -0
- data/etc/fonts/conf.d/11-lcdfilter-default.conf +17 -0
- data/etc/fonts/conf.d/20-unhint-small-vera.conf +49 -0
- data/etc/fonts/conf.d/30-metric-aliases.conf +637 -0
- data/etc/fonts/conf.d/40-nonlatin.conf +332 -0
- data/etc/fonts/conf.d/45-generic.conf +136 -0
- data/etc/fonts/conf.d/45-latin.conf +301 -0
- data/etc/fonts/conf.d/48-spacing.conf +16 -0
- data/etc/fonts/conf.d/49-sansserif.conf +22 -0
- data/etc/fonts/conf.d/50-user.conf +16 -0
- data/etc/fonts/conf.d/51-local.conf +7 -0
- data/etc/fonts/conf.d/60-generic.conf +64 -0
- data/etc/fonts/conf.d/60-latin.conf +88 -0
- data/etc/fonts/conf.d/65-fonts-persian.conf +418 -0
- data/etc/fonts/conf.d/65-nonlatin.conf +228 -0
- data/etc/fonts/conf.d/69-unifont.conf +28 -0
- data/etc/fonts/conf.d/80-delicious.conf +19 -0
- data/etc/fonts/conf.d/90-synthetic.conf +64 -0
- data/etc/fonts/conf.d/README +23 -0
- data/etc/fonts/fonts.conf +101 -0
- data/etc/relocate/fontconfig.reloc +2 -0
- data/etc/relocate/guile.reloc +2 -0
- data/etc/relocate/libexec.reloc +1 -0
- data/lib/guile/2.2/ccache/ice-9/and-let-star.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/arrays.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/atomic.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/binary-ports.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/boot-9.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/buffered-input.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/calling.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/channel.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/command-line.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/common-list.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/control.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/curried-definitions.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/debug.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/deprecated.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/documentation.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/eval-string.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/eval.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/expect.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/fdes-finalizers.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/format.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/ftw.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/futures.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/gap-buffer.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/getopt-long.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/hash-table.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/hcons.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/history.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/i18n.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/iconv.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/lineio.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/list.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/local-eval.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/ls.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/mapping.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/match.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/networking.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/null.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/occam-channel.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/optargs.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/peg/cache.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/peg/codegen.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/peg/simplify-tree.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/peg/string-peg.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/peg/using-parsers.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/peg.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/poe.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/poll.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/popen.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/ports.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/posix.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/pretty-print.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/psyntax-pp.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/q.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/r5rs.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/rdelim.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/receive.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/regex.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/runq.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/rw.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/safe-r5rs.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/safe.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/sandbox.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/save-stack.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/scm-style-repl.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/serialize.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/session.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/slib.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/stack-catch.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/streams.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/string-fun.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/suspendable-ports.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/syncase.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/textual-ports.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/threads.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/time.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/top-repl.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/unicode.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/vlist.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/weak-vector.go +0 -0
- data/lib/guile/2.2/ccache/language/brainfuck/compile-scheme.go +0 -0
- data/lib/guile/2.2/ccache/language/brainfuck/compile-tree-il.go +0 -0
- data/lib/guile/2.2/ccache/language/brainfuck/parse.go +0 -0
- data/lib/guile/2.2/ccache/language/brainfuck/spec.go +0 -0
- data/lib/guile/2.2/ccache/language/bytecode/spec.go +0 -0
- data/lib/guile/2.2/ccache/language/bytecode.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/closure-conversion.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/compile-bytecode.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/constructors.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/contification.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/cse.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/dce.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/effects-analysis.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/elide-values.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/handle-interrupts.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/intmap.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/intset.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/licm.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/optimize.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/peel-loops.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/primitives.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/prune-bailouts.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/prune-top-level-scopes.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/reify-primitives.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/renumber.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/rotate-loops.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/self-references.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/simplify.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/slot-allocation.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/spec.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/specialize-numbers.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/specialize-primcalls.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/split-rec.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/type-checks.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/type-fold.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/types.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/utils.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/verify.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/with-cps.go +0 -0
- data/lib/guile/2.2/ccache/language/cps.go +0 -0
- data/lib/guile/2.2/ccache/language/ecmascript/array.go +0 -0
- data/lib/guile/2.2/ccache/language/ecmascript/base.go +0 -0
- data/lib/guile/2.2/ccache/language/ecmascript/compile-tree-il.go +0 -0
- data/lib/guile/2.2/ccache/language/ecmascript/function.go +0 -0
- data/lib/guile/2.2/ccache/language/ecmascript/impl.go +0 -0
- data/lib/guile/2.2/ccache/language/ecmascript/parse.go +0 -0
- data/lib/guile/2.2/ccache/language/ecmascript/spec.go +0 -0
- data/lib/guile/2.2/ccache/language/ecmascript/tokenize.go +0 -0
- data/lib/guile/2.2/ccache/language/elisp/bindings.go +0 -0
- data/lib/guile/2.2/ccache/language/elisp/boot.go +0 -0
- data/lib/guile/2.2/ccache/language/elisp/compile-tree-il.go +0 -0
- data/lib/guile/2.2/ccache/language/elisp/falias.go +0 -0
- data/lib/guile/2.2/ccache/language/elisp/lexer.go +0 -0
- data/lib/guile/2.2/ccache/language/elisp/parser.go +0 -0
- data/lib/guile/2.2/ccache/language/elisp/runtime/function-slot.go +0 -0
- data/lib/guile/2.2/ccache/language/elisp/runtime/value-slot.go +0 -0
- data/lib/guile/2.2/ccache/language/elisp/runtime.go +0 -0
- data/lib/guile/2.2/ccache/language/elisp/spec.go +0 -0
- data/lib/guile/2.2/ccache/language/scheme/compile-tree-il.go +0 -0
- data/lib/guile/2.2/ccache/language/scheme/decompile-tree-il.go +0 -0
- data/lib/guile/2.2/ccache/language/scheme/spec.go +0 -0
- data/lib/guile/2.2/ccache/language/tree-il/analyze.go +0 -0
- data/lib/guile/2.2/ccache/language/tree-il/canonicalize.go +0 -0
- data/lib/guile/2.2/ccache/language/tree-il/compile-cps.go +0 -0
- data/lib/guile/2.2/ccache/language/tree-il/debug.go +0 -0
- data/lib/guile/2.2/ccache/language/tree-il/effects.go +0 -0
- data/lib/guile/2.2/ccache/language/tree-il/fix-letrec.go +0 -0
- data/lib/guile/2.2/ccache/language/tree-il/optimize.go +0 -0
- data/lib/guile/2.2/ccache/language/tree-il/peval.go +0 -0
- data/lib/guile/2.2/ccache/language/tree-il/primitives.go +0 -0
- data/lib/guile/2.2/ccache/language/tree-il/spec.go +0 -0
- data/lib/guile/2.2/ccache/language/tree-il.go +0 -0
- data/lib/guile/2.2/ccache/language/value/spec.go +0 -0
- data/lib/guile/2.2/ccache/oop/goops/accessors.go +0 -0
- data/lib/guile/2.2/ccache/oop/goops/active-slot.go +0 -0
- data/lib/guile/2.2/ccache/oop/goops/composite-slot.go +0 -0
- data/lib/guile/2.2/ccache/oop/goops/describe.go +0 -0
- data/lib/guile/2.2/ccache/oop/goops/internal.go +0 -0
- data/lib/guile/2.2/ccache/oop/goops/save.go +0 -0
- data/lib/guile/2.2/ccache/oop/goops/simple.go +0 -0
- data/lib/guile/2.2/ccache/oop/goops/stklos.go +0 -0
- data/lib/guile/2.2/ccache/oop/goops.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/arithmetic/bitwise.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/arithmetic/fixnums.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/arithmetic/flonums.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/base.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/bytevectors.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/conditions.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/control.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/enums.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/eval.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/exceptions.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/files.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/hashtables.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/io/ports.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/io/simple.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/lists.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/mutable-pairs.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/mutable-strings.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/programs.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/r5rs.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/records/inspection.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/records/procedural.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/records/syntactic.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/sorting.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/syntax-case.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/unicode.go +0 -0
- data/lib/guile/2.2/ccache/rnrs.go +0 -0
- data/lib/guile/2.2/ccache/scripts/api-diff.go +0 -0
- data/lib/guile/2.2/ccache/scripts/autofrisk.go +0 -0
- data/lib/guile/2.2/ccache/scripts/compile.go +0 -0
- data/lib/guile/2.2/ccache/scripts/disassemble.go +0 -0
- data/lib/guile/2.2/ccache/scripts/display-commentary.go +0 -0
- data/lib/guile/2.2/ccache/scripts/doc-snarf.go +0 -0
- data/lib/guile/2.2/ccache/scripts/frisk.go +0 -0
- data/lib/guile/2.2/ccache/scripts/generate-autoload.go +0 -0
- data/lib/guile/2.2/ccache/scripts/help.go +0 -0
- data/lib/guile/2.2/ccache/scripts/lint.go +0 -0
- data/lib/guile/2.2/ccache/scripts/list.go +0 -0
- data/lib/guile/2.2/ccache/scripts/punify.go +0 -0
- data/lib/guile/2.2/ccache/scripts/read-rfc822.go +0 -0
- data/lib/guile/2.2/ccache/scripts/read-scheme-source.go +0 -0
- data/lib/guile/2.2/ccache/scripts/read-text-outline.go +0 -0
- data/lib/guile/2.2/ccache/scripts/scan-api.go +0 -0
- data/lib/guile/2.2/ccache/scripts/snarf-check-and-output-texi.go +0 -0
- data/lib/guile/2.2/ccache/scripts/snarf-guile-m4-docs.go +0 -0
- data/lib/guile/2.2/ccache/scripts/summarize-guile-TODO.go +0 -0
- data/lib/guile/2.2/ccache/scripts/use2dot.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-1.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-10.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-11.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-111.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-13.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-14.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-16.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-17.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-18.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-19.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-2.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-26.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-27.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-28.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-31.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-34.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-35.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-37.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-38.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-39.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-4/gnu.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-4.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-41.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-42.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-43.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-45.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-6.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-60.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-64.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-67.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-69.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-71.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-8.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-88.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-9/gnu.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-9.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-98.go +0 -0
- data/lib/guile/2.2/ccache/statprof.go +0 -0
- data/lib/guile/2.2/ccache/sxml/apply-templates.go +0 -0
- data/lib/guile/2.2/ccache/sxml/fold.go +0 -0
- data/lib/guile/2.2/ccache/sxml/match.go +0 -0
- data/lib/guile/2.2/ccache/sxml/simple.go +0 -0
- data/lib/guile/2.2/ccache/sxml/ssax/input-parse.go +0 -0
- data/lib/guile/2.2/ccache/sxml/ssax.go +0 -0
- data/lib/guile/2.2/ccache/sxml/transform.go +0 -0
- data/lib/guile/2.2/ccache/sxml/xpath.go +0 -0
- data/lib/guile/2.2/ccache/system/base/ck.go +0 -0
- data/lib/guile/2.2/ccache/system/base/compile.go +0 -0
- data/lib/guile/2.2/ccache/system/base/lalr.go +0 -0
- data/lib/guile/2.2/ccache/system/base/language.go +0 -0
- data/lib/guile/2.2/ccache/system/base/message.go +0 -0
- data/lib/guile/2.2/ccache/system/base/pmatch.go +0 -0
- data/lib/guile/2.2/ccache/system/base/syntax.go +0 -0
- data/lib/guile/2.2/ccache/system/base/target.go +0 -0
- data/lib/guile/2.2/ccache/system/base/types.go +0 -0
- data/lib/guile/2.2/ccache/system/foreign-object.go +0 -0
- data/lib/guile/2.2/ccache/system/foreign.go +0 -0
- data/lib/guile/2.2/ccache/system/repl/command.go +0 -0
- data/lib/guile/2.2/ccache/system/repl/common.go +0 -0
- data/lib/guile/2.2/ccache/system/repl/coop-server.go +0 -0
- data/lib/guile/2.2/ccache/system/repl/debug.go +0 -0
- data/lib/guile/2.2/ccache/system/repl/error-handling.go +0 -0
- data/lib/guile/2.2/ccache/system/repl/repl.go +0 -0
- data/lib/guile/2.2/ccache/system/repl/server.go +0 -0
- data/lib/guile/2.2/ccache/system/syntax.go +0 -0
- data/lib/guile/2.2/ccache/system/vm/assembler.go +0 -0
- data/lib/guile/2.2/ccache/system/vm/coverage.go +0 -0
- data/lib/guile/2.2/ccache/system/vm/debug.go +0 -0
- data/lib/guile/2.2/ccache/system/vm/disassembler.go +0 -0
- data/lib/guile/2.2/ccache/system/vm/dwarf.go +0 -0
- data/lib/guile/2.2/ccache/system/vm/elf.go +0 -0
- data/lib/guile/2.2/ccache/system/vm/frame.go +0 -0
- data/lib/guile/2.2/ccache/system/vm/inspect.go +0 -0
- data/lib/guile/2.2/ccache/system/vm/linker.go +0 -0
- data/lib/guile/2.2/ccache/system/vm/loader.go +0 -0
- data/lib/guile/2.2/ccache/system/vm/program.go +0 -0
- data/lib/guile/2.2/ccache/system/vm/trace.go +0 -0
- data/lib/guile/2.2/ccache/system/vm/trap-state.go +0 -0
- data/lib/guile/2.2/ccache/system/vm/traps.go +0 -0
- data/lib/guile/2.2/ccache/system/vm/vm.go +0 -0
- data/lib/guile/2.2/ccache/system/xref.go +0 -0
- data/lib/guile/2.2/ccache/texinfo/docbook.go +0 -0
- data/lib/guile/2.2/ccache/texinfo/html.go +0 -0
- data/lib/guile/2.2/ccache/texinfo/indexing.go +0 -0
- data/lib/guile/2.2/ccache/texinfo/plain-text.go +0 -0
- data/lib/guile/2.2/ccache/texinfo/reflection.go +0 -0
- data/lib/guile/2.2/ccache/texinfo/serialize.go +0 -0
- data/lib/guile/2.2/ccache/texinfo/string-utils.go +0 -0
- data/lib/guile/2.2/ccache/texinfo.go +0 -0
- data/lib/guile/2.2/ccache/web/client.go +0 -0
- data/lib/guile/2.2/ccache/web/http.go +0 -0
- data/lib/guile/2.2/ccache/web/request.go +0 -0
- data/lib/guile/2.2/ccache/web/response.go +0 -0
- data/lib/guile/2.2/ccache/web/server/http.go +0 -0
- data/lib/guile/2.2/ccache/web/server.go +0 -0
- data/lib/guile/2.2/ccache/web/uri.go +0 -0
- data/lib/guile.rb +19 -0
- data/lib/lilypond/2.24.1/ccache/lily/accreg.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/auto-beam.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/autochange.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/backend-library.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/bar-line.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/breath.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/c++.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/chord-entry.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/chord-ignatzek-names.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/chord-name.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/clip-region.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/color.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/curried-definitions.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/define-context-properties.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/define-event-classes.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/define-grob-interfaces.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/define-grob-properties.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/define-grobs.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/define-markup-commands.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/define-music-callbacks.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/define-music-display-methods.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/define-music-properties.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/define-music-types.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/define-note-names.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/define-stencil-commands.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/define-woodwind-diagrams.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/display-lily.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/display-woodwind-diagrams.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/file-cache.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/flag-styles.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/font-encodings.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/font.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/framework-cairo.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/framework-ps.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/framework-svg.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/fret-diagrams.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/graphviz.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/harp-pedals.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/layout-beam.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/layout-slur.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/lily-library.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/lily.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/ly-syntax-constructors.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/markup-macros.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/markup.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/midi.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/modal-transforms.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/music-functions.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/output-lib.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/output-ps.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/output-svg.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/page.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/paper-system.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/paper.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/parser-clef.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/parser-ly-from-scheme.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/part-combiner.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/predefined-fretboards.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/ps-to-png.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/scheme-engravers.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/scheme-performers.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/script.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/skyline.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/song-util.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/song.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/stencil.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/tablature.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/time-signature-settings.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/time-signature.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/titling.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/to-xml.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/translation-functions.go +0 -0
- data/lib/lilypond/builder.rb +161 -0
- data/lib/lilypond-ruby.rb +18 -3
- data/share/emacs/site-lisp/lilypond-font-lock.el +208 -0
- data/share/emacs/site-lisp/lilypond-indent.el +605 -0
- data/share/emacs/site-lisp/lilypond-init.el +21 -0
- data/share/emacs/site-lisp/lilypond-mode.el +1204 -0
- data/share/emacs/site-lisp/lilypond-song.el +556 -0
- data/share/emacs/site-lisp/lilypond-what-beat.el +279 -0
- data/share/emacs/site-lisp/lilypond-words.el +1428 -0
- data/share/guile/2.2/guile-procedures.txt +8860 -0
- data/share/guile/2.2/ice-9/and-let-star.scm +73 -0
- data/share/guile/2.2/ice-9/arrays.scm +70 -0
- data/share/guile/2.2/ice-9/atomic.scm +38 -0
- data/share/guile/2.2/ice-9/binary-ports.scm +53 -0
- data/share/guile/2.2/ice-9/boot-9.scm +4131 -0
- data/share/guile/2.2/ice-9/buffered-input.scm +109 -0
- data/share/guile/2.2/ice-9/calling.scm +326 -0
- data/share/guile/2.2/ice-9/channel.scm +170 -0
- data/share/guile/2.2/ice-9/command-line.scm +477 -0
- data/share/guile/2.2/ice-9/common-list.scm +278 -0
- data/share/guile/2.2/ice-9/control.scm +110 -0
- data/share/guile/2.2/ice-9/curried-definitions.scm +57 -0
- data/share/guile/2.2/ice-9/debug.scm +25 -0
- data/share/guile/2.2/ice-9/deprecated.scm +93 -0
- data/share/guile/2.2/ice-9/documentation.scm +203 -0
- data/share/guile/2.2/ice-9/eval-string.scm +90 -0
- data/share/guile/2.2/ice-9/eval.scm +723 -0
- data/share/guile/2.2/ice-9/expect.scm +171 -0
- data/share/guile/2.2/ice-9/fdes-finalizers.scm +25 -0
- data/share/guile/2.2/ice-9/format.scm +1626 -0
- data/share/guile/2.2/ice-9/ftw.scm +564 -0
- data/share/guile/2.2/ice-9/futures.scm +308 -0
- data/share/guile/2.2/ice-9/gap-buffer.scm +283 -0
- data/share/guile/2.2/ice-9/getopt-long.scm +371 -0
- data/share/guile/2.2/ice-9/hash-table.scm +45 -0
- data/share/guile/2.2/ice-9/hcons.scm +80 -0
- data/share/guile/2.2/ice-9/history.scm +65 -0
- data/share/guile/2.2/ice-9/i18n.scm +531 -0
- data/share/guile/2.2/ice-9/iconv.scm +95 -0
- data/share/guile/2.2/ice-9/lineio.scm +115 -0
- data/share/guile/2.2/ice-9/list.scm +36 -0
- data/share/guile/2.2/ice-9/local-eval.scm +261 -0
- data/share/guile/2.2/ice-9/ls.scm +94 -0
- data/share/guile/2.2/ice-9/mapping.scm +118 -0
- data/share/guile/2.2/ice-9/match.scm +59 -0
- data/share/guile/2.2/ice-9/match.upstream.scm +917 -0
- data/share/guile/2.2/ice-9/networking.scm +94 -0
- data/share/guile/2.2/ice-9/null.scm +34 -0
- data/share/guile/2.2/ice-9/occam-channel.scm +261 -0
- data/share/guile/2.2/ice-9/optargs.scm +381 -0
- data/share/guile/2.2/ice-9/peg/cache.scm +45 -0
- data/share/guile/2.2/ice-9/peg/codegen.scm +359 -0
- data/share/guile/2.2/ice-9/peg/simplify-tree.scm +97 -0
- data/share/guile/2.2/ice-9/peg/string-peg.scm +273 -0
- data/share/guile/2.2/ice-9/peg/using-parsers.scm +116 -0
- data/share/guile/2.2/ice-9/peg.scm +42 -0
- data/share/guile/2.2/ice-9/poe.scm +116 -0
- data/share/guile/2.2/ice-9/poll.scm +172 -0
- data/share/guile/2.2/ice-9/popen.scm +178 -0
- data/share/guile/2.2/ice-9/ports.scm +566 -0
- data/share/guile/2.2/ice-9/posix.scm +75 -0
- data/share/guile/2.2/ice-9/pretty-print.scm +483 -0
- data/share/guile/2.2/ice-9/psyntax-pp.scm +3542 -0
- data/share/guile/2.2/ice-9/psyntax.scm +3326 -0
- data/share/guile/2.2/ice-9/q.scm +153 -0
- data/share/guile/2.2/ice-9/quasisyntax.scm +136 -0
- data/share/guile/2.2/ice-9/r5rs.scm +45 -0
- data/share/guile/2.2/ice-9/r6rs-libraries.scm +242 -0
- data/share/guile/2.2/ice-9/rdelim.scm +208 -0
- data/share/guile/2.2/ice-9/receive.scm +26 -0
- data/share/guile/2.2/ice-9/regex.scm +229 -0
- data/share/guile/2.2/ice-9/runq.scm +241 -0
- data/share/guile/2.2/ice-9/rw.scm +27 -0
- data/share/guile/2.2/ice-9/safe-r5rs.scm +145 -0
- data/share/guile/2.2/ice-9/safe.scm +34 -0
- data/share/guile/2.2/ice-9/sandbox.scm +1399 -0
- data/share/guile/2.2/ice-9/save-stack.scm +58 -0
- data/share/guile/2.2/ice-9/scm-style-repl.scm +279 -0
- data/share/guile/2.2/ice-9/serialize.scm +114 -0
- data/share/guile/2.2/ice-9/session.scm +530 -0
- data/share/guile/2.2/ice-9/slib.scm +33 -0
- data/share/guile/2.2/ice-9/stack-catch.scm +47 -0
- data/share/guile/2.2/ice-9/streams.scm +168 -0
- data/share/guile/2.2/ice-9/string-fun.scm +280 -0
- data/share/guile/2.2/ice-9/suspendable-ports.scm +788 -0
- data/share/guile/2.2/ice-9/syncase.scm +37 -0
- data/share/guile/2.2/ice-9/textual-ports.scm +70 -0
- data/share/guile/2.2/ice-9/threads.scm +392 -0
- data/share/guile/2.2/ice-9/time.scm +58 -0
- data/share/guile/2.2/ice-9/top-repl.scm +78 -0
- data/share/guile/2.2/ice-9/unicode.scm +26 -0
- data/share/guile/2.2/ice-9/vlist.scm +595 -0
- data/share/guile/2.2/ice-9/weak-vector.scm +31 -0
- data/share/guile/2.2/language/brainfuck/compile-scheme.scm +123 -0
- data/share/guile/2.2/language/brainfuck/compile-tree-il.scm +184 -0
- data/share/guile/2.2/language/brainfuck/parse.scm +95 -0
- data/share/guile/2.2/language/brainfuck/spec.scm +43 -0
- data/share/guile/2.2/language/bytecode/spec.scm +42 -0
- data/share/guile/2.2/language/bytecode.scm +104 -0
- data/share/guile/2.2/language/cps/closure-conversion.scm +848 -0
- data/share/guile/2.2/language/cps/compile-bytecode.scm +610 -0
- data/share/guile/2.2/language/cps/constructors.scm +106 -0
- data/share/guile/2.2/language/cps/contification.scm +448 -0
- data/share/guile/2.2/language/cps/cse.scm +414 -0
- data/share/guile/2.2/language/cps/dce.scm +363 -0
- data/share/guile/2.2/language/cps/effects-analysis.scm +597 -0
- data/share/guile/2.2/language/cps/elide-values.scm +88 -0
- data/share/guile/2.2/language/cps/handle-interrupts.scm +69 -0
- data/share/guile/2.2/language/cps/intmap.scm +765 -0
- data/share/guile/2.2/language/cps/intset.scm +830 -0
- data/share/guile/2.2/language/cps/licm.scm +308 -0
- data/share/guile/2.2/language/cps/optimize.scm +135 -0
- data/share/guile/2.2/language/cps/peel-loops.scm +287 -0
- data/share/guile/2.2/language/cps/primitives.scm +141 -0
- data/share/guile/2.2/language/cps/prune-bailouts.scm +86 -0
- data/share/guile/2.2/language/cps/prune-top-level-scopes.scm +63 -0
- data/share/guile/2.2/language/cps/reify-primitives.scm +179 -0
- data/share/guile/2.2/language/cps/renumber.scm +217 -0
- data/share/guile/2.2/language/cps/rotate-loops.scm +239 -0
- data/share/guile/2.2/language/cps/self-references.scm +79 -0
- data/share/guile/2.2/language/cps/simplify.scm +274 -0
- data/share/guile/2.2/language/cps/slot-allocation.scm +1058 -0
- data/share/guile/2.2/language/cps/spec.scm +51 -0
- data/share/guile/2.2/language/cps/specialize-numbers.scm +724 -0
- data/share/guile/2.2/language/cps/specialize-primcalls.scm +87 -0
- data/share/guile/2.2/language/cps/split-rec.scm +174 -0
- data/share/guile/2.2/language/cps/type-checks.scm +72 -0
- data/share/guile/2.2/language/cps/type-fold.scm +455 -0
- data/share/guile/2.2/language/cps/types.scm +1826 -0
- data/share/guile/2.2/language/cps/utils.scm +550 -0
- data/share/guile/2.2/language/cps/verify.scm +304 -0
- data/share/guile/2.2/language/cps/with-cps.scm +145 -0
- data/share/guile/2.2/language/cps.scm +358 -0
- data/share/guile/2.2/language/ecmascript/array.scm +121 -0
- data/share/guile/2.2/language/ecmascript/base.scm +251 -0
- data/share/guile/2.2/language/ecmascript/compile-tree-il.scm +576 -0
- data/share/guile/2.2/language/ecmascript/function.scm +78 -0
- data/share/guile/2.2/language/ecmascript/impl.scm +169 -0
- data/share/guile/2.2/language/ecmascript/parse.scm +352 -0
- data/share/guile/2.2/language/ecmascript/spec.scm +37 -0
- data/share/guile/2.2/language/ecmascript/tokenize.scm +513 -0
- data/share/guile/2.2/language/elisp/bindings.scm +107 -0
- data/share/guile/2.2/language/elisp/boot.el +617 -0
- data/share/guile/2.2/language/elisp/compile-tree-il.scm +812 -0
- data/share/guile/2.2/language/elisp/falias.scm +47 -0
- data/share/guile/2.2/language/elisp/lexer.scm +430 -0
- data/share/guile/2.2/language/elisp/parser.scm +222 -0
- data/share/guile/2.2/language/elisp/runtime/function-slot.scm +63 -0
- data/share/guile/2.2/language/elisp/runtime/value-slot.scm +24 -0
- data/share/guile/2.2/language/elisp/runtime.scm +153 -0
- data/share/guile/2.2/language/elisp/spec.scm +43 -0
- data/share/guile/2.2/language/scheme/compile-tree-il.scm +33 -0
- data/share/guile/2.2/language/scheme/decompile-tree-il.scm +796 -0
- data/share/guile/2.2/language/scheme/spec.scm +63 -0
- data/share/guile/2.2/language/tree-il/analyze.scm +1568 -0
- data/share/guile/2.2/language/tree-il/canonicalize.scm +82 -0
- data/share/guile/2.2/language/tree-il/compile-cps.scm +1149 -0
- data/share/guile/2.2/language/tree-il/debug.scm +246 -0
- data/share/guile/2.2/language/tree-il/effects.scm +591 -0
- data/share/guile/2.2/language/tree-il/fix-letrec.scm +314 -0
- data/share/guile/2.2/language/tree-il/optimize.scm +43 -0
- data/share/guile/2.2/language/tree-il/peval.scm +1669 -0
- data/share/guile/2.2/language/tree-il/primitives.scm +630 -0
- data/share/guile/2.2/language/tree-il/spec.scm +46 -0
- data/share/guile/2.2/language/tree-il.scm +630 -0
- data/share/guile/2.2/language/value/spec.scm +30 -0
- data/share/guile/2.2/oop/goops/accessors.scm +72 -0
- data/share/guile/2.2/oop/goops/active-slot.scm +63 -0
- data/share/guile/2.2/oop/goops/composite-slot.scm +83 -0
- data/share/guile/2.2/oop/goops/describe.scm +189 -0
- data/share/guile/2.2/oop/goops/internal.scm +30 -0
- data/share/guile/2.2/oop/goops/save.scm +874 -0
- data/share/guile/2.2/oop/goops/simple.scm +30 -0
- data/share/guile/2.2/oop/goops/stklos.scm +74 -0
- data/share/guile/2.2/oop/goops.scm +3176 -0
- data/share/guile/2.2/rnrs/arithmetic/bitwise.scm +92 -0
- data/share/guile/2.2/rnrs/arithmetic/fixnums.scm +291 -0
- data/share/guile/2.2/rnrs/arithmetic/flonums.scm +203 -0
- data/share/guile/2.2/rnrs/base.scm +291 -0
- data/share/guile/2.2/rnrs/bytevectors.scm +83 -0
- data/share/guile/2.2/rnrs/conditions.scm +225 -0
- data/share/guile/2.2/rnrs/control.scm +22 -0
- data/share/guile/2.2/rnrs/enums.scm +152 -0
- data/share/guile/2.2/rnrs/eval.scm +39 -0
- data/share/guile/2.2/rnrs/exceptions.scm +276 -0
- data/share/guile/2.2/rnrs/files.scm +96 -0
- data/share/guile/2.2/rnrs/hashtables.scm +190 -0
- data/share/guile/2.2/rnrs/io/ports.scm +554 -0
- data/share/guile/2.2/rnrs/io/simple.scm +167 -0
- data/share/guile/2.2/rnrs/lists.scm +55 -0
- data/share/guile/2.2/rnrs/mutable-pairs.scm +23 -0
- data/share/guile/2.2/rnrs/mutable-strings.scm +23 -0
- data/share/guile/2.2/rnrs/programs.scm +22 -0
- data/share/guile/2.2/rnrs/r5rs.scm +34 -0
- data/share/guile/2.2/rnrs/records/inspection.scm +81 -0
- data/share/guile/2.2/rnrs/records/procedural.scm +289 -0
- data/share/guile/2.2/rnrs/records/syntactic.scm +248 -0
- data/share/guile/2.2/rnrs/sorting.scm +27 -0
- data/share/guile/2.2/rnrs/syntax-case.scm +68 -0
- data/share/guile/2.2/rnrs/unicode.scm +104 -0
- data/share/guile/2.2/rnrs.scm +289 -0
- data/share/guile/2.2/scripts/api-diff.scm +179 -0
- data/share/guile/2.2/scripts/autofrisk.scm +218 -0
- data/share/guile/2.2/scripts/compile.scm +273 -0
- data/share/guile/2.2/scripts/disassemble.scm +38 -0
- data/share/guile/2.2/scripts/display-commentary.scm +67 -0
- data/share/guile/2.2/scripts/doc-snarf.scm +439 -0
- data/share/guile/2.2/scripts/frisk.scm +290 -0
- data/share/guile/2.2/scripts/generate-autoload.scm +144 -0
- data/share/guile/2.2/scripts/help.scm +188 -0
- data/share/guile/2.2/scripts/lint.scm +318 -0
- data/share/guile/2.2/scripts/list.scm +91 -0
- data/share/guile/2.2/scripts/punify.scm +87 -0
- data/share/guile/2.2/scripts/read-rfc822.scm +131 -0
- data/share/guile/2.2/scripts/read-scheme-source.scm +282 -0
- data/share/guile/2.2/scripts/read-text-outline.scm +253 -0
- data/share/guile/2.2/scripts/scan-api.scm +223 -0
- data/share/guile/2.2/scripts/snarf-check-and-output-texi.scm +303 -0
- data/share/guile/2.2/scripts/snarf-guile-m4-docs.scm +86 -0
- data/share/guile/2.2/scripts/summarize-guile-TODO.scm +213 -0
- data/share/guile/2.2/scripts/use2dot.scm +110 -0
- data/share/guile/2.2/srfi/srfi-1.scm +1061 -0
- data/share/guile/2.2/srfi/srfi-10.scm +89 -0
- data/share/guile/2.2/srfi/srfi-11.scm +146 -0
- data/share/guile/2.2/srfi/srfi-111.scm +37 -0
- data/share/guile/2.2/srfi/srfi-13.scm +132 -0
- data/share/guile/2.2/srfi/srfi-14.scm +99 -0
- data/share/guile/2.2/srfi/srfi-16.scm +51 -0
- data/share/guile/2.2/srfi/srfi-17.scm +174 -0
- data/share/guile/2.2/srfi/srfi-18.scm +382 -0
- data/share/guile/2.2/srfi/srfi-19.scm +1470 -0
- data/share/guile/2.2/srfi/srfi-2.scm +31 -0
- data/share/guile/2.2/srfi/srfi-26.scm +66 -0
- data/share/guile/2.2/srfi/srfi-27.scm +96 -0
- data/share/guile/2.2/srfi/srfi-28.scm +34 -0
- data/share/guile/2.2/srfi/srfi-31.scm +35 -0
- data/share/guile/2.2/srfi/srfi-34.scm +84 -0
- data/share/guile/2.2/srfi/srfi-35.scm +351 -0
- data/share/guile/2.2/srfi/srfi-37.scm +234 -0
- data/share/guile/2.2/srfi/srfi-38.scm +207 -0
- data/share/guile/2.2/srfi/srfi-39.scm +55 -0
- data/share/guile/2.2/srfi/srfi-4/gnu.scm +80 -0
- data/share/guile/2.2/srfi/srfi-4.scm +118 -0
- data/share/guile/2.2/srfi/srfi-41.scm +505 -0
- data/share/guile/2.2/srfi/srfi-42/ec.scm +1053 -0
- data/share/guile/2.2/srfi/srfi-42.scm +66 -0
- data/share/guile/2.2/srfi/srfi-43.scm +1077 -0
- data/share/guile/2.2/srfi/srfi-45.scm +93 -0
- data/share/guile/2.2/srfi/srfi-6.scm +29 -0
- data/share/guile/2.2/srfi/srfi-60.scm +73 -0
- data/share/guile/2.2/srfi/srfi-64/testing.scm +1040 -0
- data/share/guile/2.2/srfi/srfi-64.scm +55 -0
- data/share/guile/2.2/srfi/srfi-67/compare.scm +686 -0
- data/share/guile/2.2/srfi/srfi-67.scm +88 -0
- data/share/guile/2.2/srfi/srfi-69.scm +336 -0
- data/share/guile/2.2/srfi/srfi-71.scm +267 -0
- data/share/guile/2.2/srfi/srfi-8.scm +31 -0
- data/share/guile/2.2/srfi/srfi-88.scm +53 -0
- data/share/guile/2.2/srfi/srfi-9/gnu.scm +168 -0
- data/share/guile/2.2/srfi/srfi-9.scm +351 -0
- data/share/guile/2.2/srfi/srfi-98.scm +44 -0
- data/share/guile/2.2/statprof.scm +988 -0
- data/share/guile/2.2/sxml/apply-templates.scm +102 -0
- data/share/guile/2.2/sxml/fold.scm +250 -0
- data/share/guile/2.2/sxml/match.scm +75 -0
- data/share/guile/2.2/sxml/simple.scm +408 -0
- data/share/guile/2.2/sxml/ssax/input-parse.scm +180 -0
- data/share/guile/2.2/sxml/ssax.scm +265 -0
- data/share/guile/2.2/sxml/sxml-match.ss +1181 -0
- data/share/guile/2.2/sxml/transform.scm +298 -0
- data/share/guile/2.2/sxml/upstream/SSAX.scm +3235 -0
- data/share/guile/2.2/sxml/upstream/SXML-tree-trans.scm +249 -0
- data/share/guile/2.2/sxml/upstream/SXPath-old.scm +1216 -0
- data/share/guile/2.2/sxml/upstream/assert.scm +35 -0
- data/share/guile/2.2/sxml/upstream/input-parse.scm +326 -0
- data/share/guile/2.2/sxml/xpath.scm +493 -0
- data/share/guile/2.2/system/base/ck.scm +55 -0
- data/share/guile/2.2/system/base/compile.scm +282 -0
- data/share/guile/2.2/system/base/lalr.scm +51 -0
- data/share/guile/2.2/system/base/lalr.upstream.scm +2096 -0
- data/share/guile/2.2/system/base/language.scm +119 -0
- data/share/guile/2.2/system/base/message.scm +238 -0
- data/share/guile/2.2/system/base/pmatch.scm +68 -0
- data/share/guile/2.2/system/base/syntax.scm +299 -0
- data/share/guile/2.2/system/base/target.scm +152 -0
- data/share/guile/2.2/system/base/types.scm +561 -0
- data/share/guile/2.2/system/foreign-object.scm +91 -0
- data/share/guile/2.2/system/foreign.scm +200 -0
- data/share/guile/2.2/system/repl/command.scm +946 -0
- data/share/guile/2.2/system/repl/common.scm +263 -0
- data/share/guile/2.2/system/repl/coop-server.scm +200 -0
- data/share/guile/2.2/system/repl/debug.scm +210 -0
- data/share/guile/2.2/system/repl/describe.scm +347 -0
- data/share/guile/2.2/system/repl/error-handling.scm +183 -0
- data/share/guile/2.2/system/repl/repl.scm +233 -0
- data/share/guile/2.2/system/repl/server.scm +332 -0
- data/share/guile/2.2/system/syntax.scm +33 -0
- data/share/guile/2.2/system/vm/assembler.scm +2614 -0
- data/share/guile/2.2/system/vm/coverage.scm +351 -0
- data/share/guile/2.2/system/vm/debug.scm +766 -0
- data/share/guile/2.2/system/vm/disassembler.scm +658 -0
- data/share/guile/2.2/system/vm/dwarf.scm +1852 -0
- data/share/guile/2.2/system/vm/elf.scm +1042 -0
- data/share/guile/2.2/system/vm/frame.scm +485 -0
- data/share/guile/2.2/system/vm/inspect.scm +188 -0
- data/share/guile/2.2/system/vm/linker.scm +732 -0
- data/share/guile/2.2/system/vm/loader.scm +27 -0
- data/share/guile/2.2/system/vm/program.scm +312 -0
- data/share/guile/2.2/system/vm/trace.scm +121 -0
- data/share/guile/2.2/system/vm/trap-state.scm +302 -0
- data/share/guile/2.2/system/vm/traps.scm +608 -0
- data/share/guile/2.2/system/vm/vm.scm +32 -0
- data/share/guile/2.2/system/xref.scm +369 -0
- data/share/guile/2.2/texinfo/docbook.scm +240 -0
- data/share/guile/2.2/texinfo/html.scm +279 -0
- data/share/guile/2.2/texinfo/indexing.scm +75 -0
- data/share/guile/2.2/texinfo/plain-text.scm +322 -0
- data/share/guile/2.2/texinfo/reflection.scm +585 -0
- data/share/guile/2.2/texinfo/serialize.scm +300 -0
- data/share/guile/2.2/texinfo/string-utils.scm +410 -0
- data/share/guile/2.2/texinfo.scm +1263 -0
- data/share/guile/2.2/web/client.scm +513 -0
- data/share/guile/2.2/web/http.scm +2043 -0
- data/share/guile/2.2/web/request.scm +326 -0
- data/share/guile/2.2/web/response.scm +379 -0
- data/share/guile/2.2/web/server/http.scm +183 -0
- data/share/guile/2.2/web/server.scm +397 -0
- data/share/guile/2.2/web/uri.scm +552 -0
- data/share/lilypond/2.24.1/fontconfig/0bd3dc0958fa2205aaaa8ebb13e2872b-le64.cache-8 +0 -0
- data/share/lilypond/2.24.1/fontconfig/188ac73a183f12857f63bb60a4a6d603-le64.cache-8 +0 -0
- data/share/lilypond/2.24.1/fontconfig/32b6488e5b8292a2e95c79d947e009e8-le64.cache-8 +0 -0
- data/share/lilypond/2.24.1/fontconfig/3830d5c3ddfd5cd38a049b759396e72e-le64.cache-8 +0 -0
- data/share/lilypond/2.24.1/fontconfig/3f7329c5293ffd510edef78f73874cfd-le64.cache-8 +0 -0
- data/share/lilypond/2.24.1/fontconfig/4c599c202bc5c08e2d34565a40eac3b2-le64.cache-8 +0 -0
- data/share/lilypond/2.24.1/fontconfig/57e423e26b20ab21d0f2f29c145174c3-le64.cache-8 +0 -0
- data/share/lilypond/2.24.1/fontconfig/7ef2298fde41cc6eeb7af42e48b7d293-le64.cache-8 +0 -0
- data/share/lilypond/2.24.1/fontconfig/826f6b6ef79022e2eac8af26bf4b62f2-le64.cache-8 +0 -0
- data/share/lilypond/2.24.1/fontconfig/945677eb7aeaf62f1d50efc3fb3ec7d8-le64.cache-8 +0 -0
- data/share/lilypond/2.24.1/fontconfig/95530828ff6c81d309f8258d8d02a23e-le64.cache-8 +0 -0
- data/share/lilypond/2.24.1/fontconfig/CACHEDIR.TAG +4 -0
- data/share/lilypond/2.24.1/fontconfig/bf3b770c553c462765856025a94f1ce6-le64.cache-8 +0 -0
- data/share/lilypond/2.24.1/fontconfig/c855463f699352c367813e37f3f70ea7-le64.cache-8 +0 -0
- data/share/lilypond/2.24.1/fontconfig/d3e5c4ee2ceb1fc347f91d4cefc53bc0-le64.cache-8 +0 -0
- data/share/lilypond/2.24.1/fontconfig/d589a48862398ed80a3d6066f4f56f4c-le64.cache-8 +0 -0
- data/share/lilypond/2.24.1/fontconfig/d82eb4fd963d448e2fcb7d7b793b5df3-le64.cache-8 +0 -0
- data/share/lilypond/2.24.1/fontconfig/e13b20fdb08344e0e664864cc2ede53d-le64.cache-8 +0 -0
- data/share/lilypond/2.24.1/fontconfig/e52a45a1c8c8fe895fc0fc8c4e6999b8-le64.cache-8 +0 -0
- data/share/lilypond/2.24.1/fontconfig/f1f2465696798768e9653f19e17ccdc8-le64.cache-8 +0 -0
- data/share/lilypond/2.24.1/fonts/00-lilypond-fonts.conf +99 -0
- data/share/lilypond/2.24.1/fonts/99-lilypond-fonts.conf +28 -0
- data/share/lilypond/2.24.1/fonts/otf/C059-BdIta.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/C059-Bold.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/C059-Italic.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/C059-Roman.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/NimbusMonoPS-Bold.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/NimbusMonoPS-BoldItalic.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/NimbusMonoPS-Italic.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/NimbusMonoPS-Regular.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/NimbusSans-Bold.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/NimbusSans-BoldItalic.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/NimbusSans-Italic.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/NimbusSans-Regular.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/emmentaler-11.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/emmentaler-13.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/emmentaler-14.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/emmentaler-16.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/emmentaler-18.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/emmentaler-20.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/emmentaler-23.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/emmentaler-26.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/emmentaler-brace.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/texgyrecursor-bold.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/texgyrecursor-bolditalic.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/texgyrecursor-italic.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/texgyrecursor-regular.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/texgyreheros-bold.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/texgyreheros-bolditalic.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/texgyreheros-italic.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/texgyreheros-regular.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/texgyreschola-bold.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/texgyreschola-bolditalic.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/texgyreschola-italic.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/texgyreschola-regular.otf +0 -0
- data/share/lilypond/2.24.1/fonts/source/common-modules-and-initialization.mf +26 -0
- data/share/lilypond/2.24.1/fonts/source/debugging-settings.mf +14 -0
- data/share/lilypond/2.24.1/fonts/source/declare-autometric-parameters.mf +9 -0
- data/share/lilypond/2.24.1/fonts/source/feta-accidentals.mf +58 -0
- data/share/lilypond/2.24.1/fonts/source/feta-accordion.mf +575 -0
- data/share/lilypond/2.24.1/fonts/source/feta-alphabet-generic.mf +16 -0
- data/share/lilypond/2.24.1/fonts/source/feta-alphabet11.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-alphabet13.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-alphabet14.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-alphabet16.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-alphabet18.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-alphabet20.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-alphabet23.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-alphabet26.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-arrow.mf +114 -0
- data/share/lilypond/2.24.1/fonts/source/feta-arrowheads.mf +171 -0
- data/share/lilypond/2.24.1/fonts/source/feta-autometric.mf +303 -0
- data/share/lilypond/2.24.1/fonts/source/feta-braces-a.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-braces-b.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-braces-c.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-braces-d.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-braces-e.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-braces-f.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-braces-g.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-braces-generic.mf +47 -0
- data/share/lilypond/2.24.1/fonts/source/feta-braces-h.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-braces-i.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-braces.mf +125 -0
- data/share/lilypond/2.24.1/fonts/source/feta-brackettips.mf +100 -0
- data/share/lilypond/2.24.1/fonts/source/feta-clefs.mf +963 -0
- data/share/lilypond/2.24.1/fonts/source/feta-dots.mf +37 -0
- data/share/lilypond/2.24.1/fonts/source/feta-dynamics.mf +891 -0
- data/share/lilypond/2.24.1/fonts/source/feta-flags-generic.mf +17 -0
- data/share/lilypond/2.24.1/fonts/source/feta-flags.mf +926 -0
- data/share/lilypond/2.24.1/fonts/source/feta-flags11.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-flags13.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-flags14.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-flags16.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-flags18.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-flags20.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-flags23.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-flags26.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-flats.mf +668 -0
- data/share/lilypond/2.24.1/fonts/source/feta-macros.mf +506 -0
- data/share/lilypond/2.24.1/fonts/source/feta-naturals.mf +223 -0
- data/share/lilypond/2.24.1/fonts/source/feta-noteheads-generic.mf +17 -0
- data/share/lilypond/2.24.1/fonts/source/feta-noteheads.mf +2642 -0
- data/share/lilypond/2.24.1/fonts/source/feta-noteheads11.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-noteheads13.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-noteheads14.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-noteheads16.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-noteheads18.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-noteheads20.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-noteheads23.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-noteheads26.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-numbers.mf +1677 -0
- data/share/lilypond/2.24.1/fonts/source/feta-other-generic.mf +27 -0
- data/share/lilypond/2.24.1/fonts/source/feta-params.mf +323 -0
- data/share/lilypond/2.24.1/fonts/source/feta-parenthesis.mf +63 -0
- data/share/lilypond/2.24.1/fonts/source/feta-pedals.mf +355 -0
- data/share/lilypond/2.24.1/fonts/source/feta-rests.mf +890 -0
- data/share/lilypond/2.24.1/fonts/source/feta-scripts.mf +2206 -0
- data/share/lilypond/2.24.1/fonts/source/feta-sharps.mf +524 -0
- data/share/lilypond/2.24.1/fonts/source/feta-sori-koron.mf +325 -0
- data/share/lilypond/2.24.1/fonts/source/feta-ties.mf +72 -0
- data/share/lilypond/2.24.1/fonts/source/feta-timesignatures.mf +119 -0
- data/share/lilypond/2.24.1/fonts/source/feta-trills.mf +321 -0
- data/share/lilypond/2.24.1/fonts/source/feta11.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta13.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta14.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta16.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta18.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta20.mf +7 -0
- data/share/lilypond/2.24.1/fonts/source/feta23.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta26.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan-accidentals.mf +483 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan-clefs.mf +1636 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan-custodes.mf +503 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan-dots.mf +62 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan-flags.mf +319 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan-macros.mf +225 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan-noteheads-generic.mf +16 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan-noteheads.mf +2191 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan-noteheads11.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan-noteheads13.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan-noteheads14.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan-noteheads16.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan-noteheads18.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan-noteheads20.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan-noteheads23.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan-noteheads26.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan-other-generic.mf +24 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan-rests.mf +428 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan-scripts.mf +284 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan-timesignatures.mf +402 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan11.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan13.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan14.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan16.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan18.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan20.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan23.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan26.mf +6 -0
- data/share/lilypond/2.24.1/fonts/svg/emmentaler-11.svg +2525 -0
- data/share/lilypond/2.24.1/fonts/svg/emmentaler-11.woff +0 -0
- data/share/lilypond/2.24.1/fonts/svg/emmentaler-13.svg +2530 -0
- data/share/lilypond/2.24.1/fonts/svg/emmentaler-13.woff +0 -0
- data/share/lilypond/2.24.1/fonts/svg/emmentaler-14.svg +2526 -0
- data/share/lilypond/2.24.1/fonts/svg/emmentaler-14.woff +0 -0
- data/share/lilypond/2.24.1/fonts/svg/emmentaler-16.svg +2523 -0
- data/share/lilypond/2.24.1/fonts/svg/emmentaler-16.woff +0 -0
- data/share/lilypond/2.24.1/fonts/svg/emmentaler-18.svg +2519 -0
- data/share/lilypond/2.24.1/fonts/svg/emmentaler-18.woff +0 -0
- data/share/lilypond/2.24.1/fonts/svg/emmentaler-20.svg +2512 -0
- data/share/lilypond/2.24.1/fonts/svg/emmentaler-20.woff +0 -0
- data/share/lilypond/2.24.1/fonts/svg/emmentaler-23.svg +2506 -0
- data/share/lilypond/2.24.1/fonts/svg/emmentaler-23.woff +0 -0
- data/share/lilypond/2.24.1/fonts/svg/emmentaler-26.svg +2510 -0
- data/share/lilypond/2.24.1/fonts/svg/emmentaler-26.woff +0 -0
- data/share/lilypond/2.24.1/fonts/svg/emmentaler-brace.svg +1757 -0
- data/share/lilypond/2.24.1/fonts/svg/emmentaler-brace.woff +0 -0
- data/share/lilypond/2.24.1/ly/Welcome_to_LilyPond.ly +45 -0
- data/share/lilypond/2.24.1/ly/arabic.ly +185 -0
- data/share/lilypond/2.24.1/ly/articulate.ly +1013 -0
- data/share/lilypond/2.24.1/ly/bagpipe.ly +368 -0
- data/share/lilypond/2.24.1/ly/base-tkit.ly +135 -0
- data/share/lilypond/2.24.1/ly/catalan.ly +23 -0
- data/share/lilypond/2.24.1/ly/chord-modifiers-init.ly +63 -0
- data/share/lilypond/2.24.1/ly/chord-repetition-init.ly +60 -0
- data/share/lilypond/2.24.1/ly/context-mods-init.ly +119 -0
- data/share/lilypond/2.24.1/ly/declarations-init.ly +167 -0
- data/share/lilypond/2.24.1/ly/deutsch.ly +23 -0
- data/share/lilypond/2.24.1/ly/drumpitch-init.ly +366 -0
- data/share/lilypond/2.24.1/ly/dynamic-scripts-init.ly +54 -0
- data/share/lilypond/2.24.1/ly/english.ly +23 -0
- data/share/lilypond/2.24.1/ly/engraver-init.ly +1619 -0
- data/share/lilypond/2.24.1/ly/espanol.ly +23 -0
- data/share/lilypond/2.24.1/ly/event-listener.ly +241 -0
- data/share/lilypond/2.24.1/ly/festival.ly +38 -0
- data/share/lilypond/2.24.1/ly/generate-documentation.ly +7 -0
- data/share/lilypond/2.24.1/ly/grace-init.ly +56 -0
- data/share/lilypond/2.24.1/ly/graphviz-init.ly +174 -0
- data/share/lilypond/2.24.1/ly/gregorian.ly +268 -0
- data/share/lilypond/2.24.1/ly/guile-debugger.ly +55 -0
- data/share/lilypond/2.24.1/ly/hel-arabic.ly +307 -0
- data/share/lilypond/2.24.1/ly/init.ly +96 -0
- data/share/lilypond/2.24.1/ly/italiano.ly +23 -0
- data/share/lilypond/2.24.1/ly/lilypond-book-preamble.ly +47 -0
- data/share/lilypond/2.24.1/ly/lyrics-tkit.ly +68 -0
- data/share/lilypond/2.24.1/ly/makam.ly +166 -0
- data/share/lilypond/2.24.1/ly/midi-init.ly +59 -0
- data/share/lilypond/2.24.1/ly/music-functions-init.ly +2254 -0
- data/share/lilypond/2.24.1/ly/nederlands.ly +23 -0
- data/share/lilypond/2.24.1/ly/norsk.ly +23 -0
- data/share/lilypond/2.24.1/ly/paper-defaults-init.ly +188 -0
- data/share/lilypond/2.24.1/ly/performer-init.ly +398 -0
- data/share/lilypond/2.24.1/ly/persian.ly +335 -0
- data/share/lilypond/2.24.1/ly/piano-tkit.ly +61 -0
- data/share/lilypond/2.24.1/ly/portugues.ly +23 -0
- data/share/lilypond/2.24.1/ly/predefined-fretboards-init.ly +78 -0
- data/share/lilypond/2.24.1/ly/predefined-guitar-fretboards.ly +506 -0
- data/share/lilypond/2.24.1/ly/predefined-guitar-ninth-fretboards.ly +75 -0
- data/share/lilypond/2.24.1/ly/predefined-mandolin-fretboards.ly +876 -0
- data/share/lilypond/2.24.1/ly/predefined-ukulele-fretboards.ly +1285 -0
- data/share/lilypond/2.24.1/ly/property-init.ly +858 -0
- data/share/lilypond/2.24.1/ly/satb.ly +214 -0
- data/share/lilypond/2.24.1/ly/scale-definitions-init.ly +117 -0
- data/share/lilypond/2.24.1/ly/scheme-sandbox.ly +39 -0
- data/share/lilypond/2.24.1/ly/script-init.ly +94 -0
- data/share/lilypond/2.24.1/ly/spanners-init.ly +146 -0
- data/share/lilypond/2.24.1/ly/ssaattbb.ly +335 -0
- data/share/lilypond/2.24.1/ly/staff-tkit.ly +182 -0
- data/share/lilypond/2.24.1/ly/string-tunings-init.ly +94 -0
- data/share/lilypond/2.24.1/ly/suomi.ly +23 -0
- data/share/lilypond/2.24.1/ly/svenska.ly +23 -0
- data/share/lilypond/2.24.1/ly/swing.ly +362 -0
- data/share/lilypond/2.24.1/ly/text-replacements.ly +150 -0
- data/share/lilypond/2.24.1/ly/titling-init.ly +150 -0
- data/share/lilypond/2.24.1/ly/toc-init.ly +182 -0
- data/share/lilypond/2.24.1/ly/turkish-makam.ly +609 -0
- data/share/lilypond/2.24.1/ly/vlaams.ly +23 -0
- data/share/lilypond/2.24.1/ly/vocal-tkit.ly +103 -0
- data/share/lilypond/2.24.1/ly/voice-tkit.ly +34 -0
- data/share/lilypond/2.24.1/ps/encodingdefs.ps +2611 -0
- data/share/lilypond/2.24.1/ps/lilyponddefs.ps +49 -0
- data/share/lilypond/2.24.1/ps/music-drawing-routines.ps +329 -0
- data/share/lilypond/2.24.1/python/__pycache__/book_base.cpython-310.pyc +0 -0
- data/share/lilypond/2.24.1/python/__pycache__/book_docbook.cpython-310.pyc +0 -0
- data/share/lilypond/2.24.1/python/__pycache__/book_html.cpython-310.pyc +0 -0
- data/share/lilypond/2.24.1/python/__pycache__/book_latex.cpython-310.pyc +0 -0
- data/share/lilypond/2.24.1/python/__pycache__/book_snippets.cpython-310.pyc +0 -0
- data/share/lilypond/2.24.1/python/__pycache__/book_texinfo.cpython-310.pyc +0 -0
- data/share/lilypond/2.24.1/python/__pycache__/convertrules.cpython-310.pyc +0 -0
- data/share/lilypond/2.24.1/python/__pycache__/langdefs.cpython-310.pyc +0 -0
- data/share/lilypond/2.24.1/python/__pycache__/lilylib.cpython-310.pyc +0 -0
- data/share/lilypond/2.24.1/python/__pycache__/midi.cpython-310.pyc +0 -0
- data/share/lilypond/2.24.1/python/__pycache__/musicexp.cpython-310.pyc +0 -0
- data/share/lilypond/2.24.1/python/__pycache__/musicxml.cpython-310.pyc +0 -0
- data/share/lilypond/2.24.1/python/__pycache__/musicxml2ly_conversion.cpython-310.pyc +0 -0
- data/share/lilypond/2.24.1/python/__pycache__/utilities.cpython-310.pyc +0 -0
- data/share/lilypond/2.24.1/python/book_base.py +331 -0
- data/share/lilypond/2.24.1/python/book_docbook.py +154 -0
- data/share/lilypond/2.24.1/python/book_html.py +178 -0
- data/share/lilypond/2.24.1/python/book_latex.py +373 -0
- data/share/lilypond/2.24.1/python/book_snippets.py +1052 -0
- data/share/lilypond/2.24.1/python/book_texinfo.py +437 -0
- data/share/lilypond/2.24.1/python/convertrules.py +4764 -0
- data/share/lilypond/2.24.1/python/langdefs.py +131 -0
- data/share/lilypond/2.24.1/python/lilylib.py +141 -0
- data/share/lilypond/2.24.1/python/midi.py +212 -0
- data/share/lilypond/2.24.1/python/musicexp.py +2781 -0
- data/share/lilypond/2.24.1/python/musicxml.py +1905 -0
- data/share/lilypond/2.24.1/python/musicxml2ly_conversion.py +80 -0
- data/share/lilypond/2.24.1/python/utilities.py +280 -0
- data/share/lilypond/2.24.1/scm/lily/accreg.scm +579 -0
- data/share/lilypond/2.24.1/scm/lily/auto-beam.scm +163 -0
- data/share/lilypond/2.24.1/scm/lily/autochange.scm +100 -0
- data/share/lilypond/2.24.1/scm/lily/backend-library.scm +593 -0
- data/share/lilypond/2.24.1/scm/lily/bar-line.scm +1281 -0
- data/share/lilypond/2.24.1/scm/lily/breath.scm +74 -0
- data/share/lilypond/2.24.1/scm/lily/c++.scm +174 -0
- data/share/lilypond/2.24.1/scm/lily/chord-entry.scm +278 -0
- data/share/lilypond/2.24.1/scm/lily/chord-ignatzek-names.scm +304 -0
- data/share/lilypond/2.24.1/scm/lily/chord-name.scm +217 -0
- data/share/lilypond/2.24.1/scm/lily/clip-region.scm +87 -0
- data/share/lilypond/2.24.1/scm/lily/color.scm +757 -0
- data/share/lilypond/2.24.1/scm/lily/curried-definitions.scm +68 -0
- data/share/lilypond/2.24.1/scm/lily/define-context-properties.scm +939 -0
- data/share/lilypond/2.24.1/scm/lily/define-event-classes.scm +142 -0
- data/share/lilypond/2.24.1/scm/lily/define-grob-interfaces.scm +640 -0
- data/share/lilypond/2.24.1/scm/lily/define-grob-properties.scm +1647 -0
- data/share/lilypond/2.24.1/scm/lily/define-grobs.scm +4027 -0
- data/share/lilypond/2.24.1/scm/lily/define-markup-commands.scm +5737 -0
- data/share/lilypond/2.24.1/scm/lily/define-music-callbacks.scm +257 -0
- data/share/lilypond/2.24.1/scm/lily/define-music-display-methods.scm +1350 -0
- data/share/lilypond/2.24.1/scm/lily/define-music-properties.scm +242 -0
- data/share/lilypond/2.24.1/scm/lily/define-music-types.scm +983 -0
- data/share/lilypond/2.24.1/scm/lily/define-note-names.scm +1421 -0
- data/share/lilypond/2.24.1/scm/lily/define-stencil-commands.scm +71 -0
- data/share/lilypond/2.24.1/scm/lily/define-woodwind-diagrams.scm +1215 -0
- data/share/lilypond/2.24.1/scm/lily/display-lily.scm +315 -0
- data/share/lilypond/2.24.1/scm/lily/display-woodwind-diagrams.scm +1985 -0
- data/share/lilypond/2.24.1/scm/lily/document-backend.scm +307 -0
- data/share/lilypond/2.24.1/scm/lily/document-context-mods.scm +98 -0
- data/share/lilypond/2.24.1/scm/lily/document-functions.scm +169 -0
- data/share/lilypond/2.24.1/scm/lily/document-identifiers.scm +76 -0
- data/share/lilypond/2.24.1/scm/lily/document-markup.scm +158 -0
- data/share/lilypond/2.24.1/scm/lily/document-music.scm +146 -0
- data/share/lilypond/2.24.1/scm/lily/document-outside-staff-priorities.scm +40 -0
- data/share/lilypond/2.24.1/scm/lily/document-paper-sizes.scm +71 -0
- data/share/lilypond/2.24.1/scm/lily/document-translation.scm +318 -0
- data/share/lilypond/2.24.1/scm/lily/document-type-predicates.scm +85 -0
- data/share/lilypond/2.24.1/scm/lily/documentation-generate.scm +259 -0
- data/share/lilypond/2.24.1/scm/lily/documentation-lib.scm +207 -0
- data/share/lilypond/2.24.1/scm/lily/file-cache.scm +28 -0
- data/share/lilypond/2.24.1/scm/lily/flag-styles.scm +249 -0
- data/share/lilypond/2.24.1/scm/lily/font-encodings.scm +1242 -0
- data/share/lilypond/2.24.1/scm/lily/font.scm +303 -0
- data/share/lilypond/2.24.1/scm/lily/framework-cairo.scm +26 -0
- data/share/lilypond/2.24.1/scm/lily/framework-ps.scm +896 -0
- data/share/lilypond/2.24.1/scm/lily/framework-svg.scm +172 -0
- data/share/lilypond/2.24.1/scm/lily/fret-diagrams.scm +1261 -0
- data/share/lilypond/2.24.1/scm/lily/graphviz.scm +78 -0
- data/share/lilypond/2.24.1/scm/lily/guile-debugger.scm +90 -0
- data/share/lilypond/2.24.1/scm/lily/harp-pedals.scm +172 -0
- data/share/lilypond/2.24.1/scm/lily/hyphenate-internal-words.scm +51 -0
- data/share/lilypond/2.24.1/scm/lily/layout-beam.scm +73 -0
- data/share/lilypond/2.24.1/scm/lily/layout-slur.scm +45 -0
- data/share/lilypond/2.24.1/scm/lily/lily-library.scm +1446 -0
- data/share/lilypond/2.24.1/scm/lily/lily-sort.scm +116 -0
- data/share/lilypond/2.24.1/scm/lily/lily.scm +929 -0
- data/share/lilypond/2.24.1/scm/lily/ly-syntax-constructors.scm +374 -0
- data/share/lilypond/2.24.1/scm/lily/markup-macros.scm +493 -0
- data/share/lilypond/2.24.1/scm/lily/markup.scm +126 -0
- data/share/lilypond/2.24.1/scm/lily/midi.scm +258 -0
- data/share/lilypond/2.24.1/scm/lily/modal-transforms.scm +337 -0
- data/share/lilypond/2.24.1/scm/lily/music-functions.scm +2878 -0
- data/share/lilypond/2.24.1/scm/lily/output-lib.scm +3377 -0
- data/share/lilypond/2.24.1/scm/lily/output-ps.scm +335 -0
- data/share/lilypond/2.24.1/scm/lily/output-svg.scm +684 -0
- data/share/lilypond/2.24.1/scm/lily/page.scm +321 -0
- data/share/lilypond/2.24.1/scm/lily/paper-system.scm +271 -0
- data/share/lilypond/2.24.1/scm/lily/paper.scm +376 -0
- data/share/lilypond/2.24.1/scm/lily/parser-clef.scm +205 -0
- data/share/lilypond/2.24.1/scm/lily/parser-ly-from-scheme.scm +170 -0
- data/share/lilypond/2.24.1/scm/lily/part-combiner.scm +998 -0
- data/share/lilypond/2.24.1/scm/lily/predefined-fretboards.scm +54 -0
- data/share/lilypond/2.24.1/scm/lily/ps-to-png.scm +182 -0
- data/share/lilypond/2.24.1/scm/lily/scheme-engravers.scm +1813 -0
- data/share/lilypond/2.24.1/scm/lily/scheme-performers.scm +126 -0
- data/share/lilypond/2.24.1/scm/lily/script.scm +416 -0
- data/share/lilypond/2.24.1/scm/lily/skyline.scm +25 -0
- data/share/lilypond/2.24.1/scm/lily/song-util.scm +191 -0
- data/share/lilypond/2.24.1/scm/lily/song.scm +853 -0
- data/share/lilypond/2.24.1/scm/lily/stencil.scm +998 -0
- data/share/lilypond/2.24.1/scm/lily/tablature.scm +392 -0
- data/share/lilypond/2.24.1/scm/lily/time-signature-settings.scm +473 -0
- data/share/lilypond/2.24.1/scm/lily/time-signature.scm +35 -0
- data/share/lilypond/2.24.1/scm/lily/titling.scm +99 -0
- data/share/lilypond/2.24.1/scm/lily/to-xml.scm +254 -0
- data/share/lilypond/2.24.1/scm/lily/translation-functions.scm +1169 -0
- data/share/lilypond/2.24.1/vim/compiler/lilypond.vim +36 -0
- data/share/lilypond/2.24.1/vim/ftdetect/lilypond.vim +4 -0
- data/share/lilypond/2.24.1/vim/ftplugin/lilypond.vim +91 -0
- data/share/lilypond/2.24.1/vim/indent/lilypond.vim +79 -0
- data/share/lilypond/2.24.1/vim/syntax/lilypond-words +1408 -0
- data/share/lilypond/2.24.1/vim/syntax/lilypond-words.vim +3 -0
- data/share/lilypond/2.24.1/vim/syntax/lilypond.vim +104 -0
- data/share/locale/ca/LC_MESSAGES/lilypond.mo +0 -0
- data/share/locale/cs/LC_MESSAGES/lilypond.mo +0 -0
- data/share/locale/da/LC_MESSAGES/lilypond.mo +0 -0
- data/share/locale/de/LC_MESSAGES/lilypond.mo +0 -0
- data/share/locale/el/LC_MESSAGES/lilypond.mo +0 -0
- data/share/locale/eo/LC_MESSAGES/lilypond.mo +0 -0
- data/share/locale/es/LC_MESSAGES/lilypond.mo +0 -0
- data/share/locale/fi/LC_MESSAGES/lilypond.mo +0 -0
- data/share/locale/fr/LC_MESSAGES/lilypond.mo +0 -0
- data/share/locale/it/LC_MESSAGES/lilypond.mo +0 -0
- data/share/locale/ja/LC_MESSAGES/lilypond.mo +0 -0
- data/share/locale/nl/LC_MESSAGES/lilypond.mo +0 -0
- data/share/locale/ru/LC_MESSAGES/lilypond.mo +0 -0
- data/share/locale/sv/LC_MESSAGES/lilypond.mo +0 -0
- data/share/locale/tr/LC_MESSAGES/lilypond.mo +0 -0
- data/share/locale/uk/LC_MESSAGES/lilypond.mo +0 -0
- data/share/locale/vi/LC_MESSAGES/lilypond.mo +0 -0
- data/share/locale/zh_CN/LC_MESSAGES/lilypond.mo +0 -0
- data/share/locale/zh_TW/LC_MESSAGES/lilypond.mo +0 -0
- metadata +1135 -4
@@ -0,0 +1,1826 @@
|
|
1
|
+
;;; Type analysis on CPS
|
2
|
+
;;; Copyright (C) 2014, 2015, 2018 Free Software Foundation, Inc.
|
3
|
+
;;;
|
4
|
+
;;; This library is free software: you can redistribute it and/or modify
|
5
|
+
;;; it under the terms of the GNU Lesser General Public License as
|
6
|
+
;;; published by the Free Software Foundation, either version 3 of the
|
7
|
+
;;; License, or (at your option) any later version.
|
8
|
+
;;;
|
9
|
+
;;; This library is distributed in the hope that it will be useful, but
|
10
|
+
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
|
+
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
12
|
+
;;; Lesser General Public License for more details.
|
13
|
+
;;;
|
14
|
+
;;; You should have received a copy of the GNU Lesser General Public
|
15
|
+
;;; License along with this program. If not, see
|
16
|
+
;;; <http://www.gnu.org/licenses/>.
|
17
|
+
|
18
|
+
;;; Commentary:
|
19
|
+
;;;
|
20
|
+
;;; Type analysis computes the possible types and ranges that values may
|
21
|
+
;;; have at all program positions. This analysis can help to prove that
|
22
|
+
;;; a primcall has no side-effects, if its arguments have the
|
23
|
+
;;; appropriate type and range. It can also enable constant folding of
|
24
|
+
;;; type predicates and, in the future, enable the compiler to choose
|
25
|
+
;;; untagged, unboxed representations for numbers.
|
26
|
+
;;;
|
27
|
+
;;; For the purposes of this analysis, a "type" is an aspect of a value
|
28
|
+
;;; that will not change. Guile's CPS intermediate language does not
|
29
|
+
;;; carry manifest type information that asserts properties about given
|
30
|
+
;;; values; instead, we recover this information via flow analysis,
|
31
|
+
;;; garnering properties from type predicates, constant literals,
|
32
|
+
;;; primcall results, and primcalls that assert that their arguments are
|
33
|
+
;;; of particular types.
|
34
|
+
;;;
|
35
|
+
;;; A range denotes a subset of the set of values in a type, bounded by
|
36
|
+
;;; a minimum and a maximum. The precise meaning of a range depends on
|
37
|
+
;;; the type. For real numbers, the range indicates an inclusive lower
|
38
|
+
;;; and upper bound on the integer value of a type. For vectors, the
|
39
|
+
;;; range indicates the length of the vector. The range is the union of
|
40
|
+
;;; the signed and unsigned 64-bit ranges. Additionally, the minimum
|
41
|
+
;;; bound of a range may be -inf.0, and the maximum bound may be +inf.0.
|
42
|
+
;;; For some types, like pairs, the concept of "range" makes no sense.
|
43
|
+
;;; In these cases we consider the range to be -inf.0 to +inf.0.
|
44
|
+
;;;
|
45
|
+
;;; Types are represented as a bitfield. Fewer bits means a more precise
|
46
|
+
;;; type. Although normally only values that have a single type will
|
47
|
+
;;; have an associated range, this is not enforced. The range applies
|
48
|
+
;;; to all types in the bitfield. When control flow meets, the types and
|
49
|
+
;;; ranges meet with the union operator.
|
50
|
+
;;;
|
51
|
+
;;; It is not practical to precisely compute value ranges in all cases.
|
52
|
+
;;; For example, in the following case:
|
53
|
+
;;;
|
54
|
+
;;; (let lp ((n 0)) (when (foo) (lp (1+ n))))
|
55
|
+
;;;
|
56
|
+
;;; The first time that range analysis visits the program, N is
|
57
|
+
;;; determined to be the exact integer 0. The second time, it is an
|
58
|
+
;;; exact integer in the range [0, 1]; the third, [0, 2]; and so on.
|
59
|
+
;;; This analysis will terminate, but only after the positive half of
|
60
|
+
;;; the 64-bit range has been fully explored and we decide that the
|
61
|
+
;;; range of N is [0, +inf.0]. At the same time, we want to do range
|
62
|
+
;;; analysis and type analysis at the same time, as there are
|
63
|
+
;;; interactions between them, notably in the case of `sqrt' which
|
64
|
+
;;; returns a complex number if its argument cannot be proven to be
|
65
|
+
;;; non-negative. So what we do instead is to precisely propagate types
|
66
|
+
;;; and ranges when propagating forward, but after the first backwards
|
67
|
+
;;; branch is seen, we cause backward branches that would expand the
|
68
|
+
;;; range of a value to saturate that range towards positive or negative
|
69
|
+
;;; infinity (as appropriate).
|
70
|
+
;;;
|
71
|
+
;;; A naive approach to type analysis would build up a table that has
|
72
|
+
;;; entries for all variables at all program points, but this has
|
73
|
+
;;; N-squared complexity and quickly grows unmanageable. Instead, we
|
74
|
+
;;; use _intmaps_ from (language cps intmap) to share state between
|
75
|
+
;;; connected program points.
|
76
|
+
;;;
|
77
|
+
;;; Code:
|
78
|
+
|
79
|
+
(define-module (language cps types)
|
80
|
+
#:use-module (ice-9 match)
|
81
|
+
#:use-module (language cps)
|
82
|
+
#:use-module (language cps utils)
|
83
|
+
#:use-module (language cps intmap)
|
84
|
+
#:use-module (language cps intset)
|
85
|
+
#:use-module (rnrs bytevectors)
|
86
|
+
#:use-module (srfi srfi-11)
|
87
|
+
#:use-module ((system syntax internal) #:select (syntax?))
|
88
|
+
#:export (;; Specific types.
|
89
|
+
&exact-integer
|
90
|
+
&flonum
|
91
|
+
&complex
|
92
|
+
&fraction
|
93
|
+
|
94
|
+
&char
|
95
|
+
&unspecified
|
96
|
+
&unbound
|
97
|
+
&false
|
98
|
+
&true
|
99
|
+
&nil
|
100
|
+
&null
|
101
|
+
&symbol
|
102
|
+
&keyword
|
103
|
+
|
104
|
+
&procedure
|
105
|
+
|
106
|
+
&pointer
|
107
|
+
&fluid
|
108
|
+
&pair
|
109
|
+
&vector
|
110
|
+
&box
|
111
|
+
&struct
|
112
|
+
&string
|
113
|
+
&bytevector
|
114
|
+
&bitvector
|
115
|
+
&array
|
116
|
+
&syntax
|
117
|
+
|
118
|
+
;; Union types.
|
119
|
+
&number &real
|
120
|
+
|
121
|
+
;; Untagged types.
|
122
|
+
&f64
|
123
|
+
&u64
|
124
|
+
&s64
|
125
|
+
|
126
|
+
infer-types
|
127
|
+
lookup-pre-type
|
128
|
+
lookup-post-type
|
129
|
+
primcall-types-check?))
|
130
|
+
|
131
|
+
(define-syntax define-flags
|
132
|
+
(lambda (x)
|
133
|
+
(syntax-case x ()
|
134
|
+
((_ all shift name ...)
|
135
|
+
(let ((count (length #'(name ...))))
|
136
|
+
(with-syntax (((n ...) (iota count))
|
137
|
+
(count count))
|
138
|
+
#'(begin
|
139
|
+
(define-syntax name (identifier-syntax (ash 1 n)))
|
140
|
+
...
|
141
|
+
(define-syntax all (identifier-syntax (1- (ash 1 count))))
|
142
|
+
(define-syntax shift (identifier-syntax count)))))))))
|
143
|
+
|
144
|
+
;; More precise types have fewer bits.
|
145
|
+
(define-flags &all-types &type-bits
|
146
|
+
&exact-integer
|
147
|
+
&flonum
|
148
|
+
&complex
|
149
|
+
&fraction
|
150
|
+
|
151
|
+
&char
|
152
|
+
&unspecified
|
153
|
+
&unbound
|
154
|
+
&false
|
155
|
+
&true
|
156
|
+
&nil
|
157
|
+
&null
|
158
|
+
&symbol
|
159
|
+
&keyword
|
160
|
+
|
161
|
+
&procedure
|
162
|
+
|
163
|
+
&pointer
|
164
|
+
&fluid
|
165
|
+
&pair
|
166
|
+
&vector
|
167
|
+
&box
|
168
|
+
&struct
|
169
|
+
&string
|
170
|
+
&bytevector
|
171
|
+
&bitvector
|
172
|
+
&array
|
173
|
+
&syntax
|
174
|
+
|
175
|
+
&f64
|
176
|
+
&u64
|
177
|
+
&s64)
|
178
|
+
|
179
|
+
(define-syntax &no-type (identifier-syntax 0))
|
180
|
+
|
181
|
+
(define-syntax &number
|
182
|
+
(identifier-syntax (logior &exact-integer &flonum &complex &fraction)))
|
183
|
+
(define-syntax &real
|
184
|
+
(identifier-syntax (logior &exact-integer &flonum &fraction)))
|
185
|
+
|
186
|
+
;; Versions of min and max that do not coerce exact numbers to become
|
187
|
+
;; inexact.
|
188
|
+
(define min
|
189
|
+
(case-lambda
|
190
|
+
((a b) (if (< a b) a b))
|
191
|
+
((a b c) (min (min a b) c))
|
192
|
+
((a b c d) (min (min a b) c d))))
|
193
|
+
(define max
|
194
|
+
(case-lambda
|
195
|
+
((a b) (if (> a b) a b))
|
196
|
+
((a b c) (max (max a b) c))
|
197
|
+
((a b c d) (max (max a b) c d))))
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
(define-syntax-rule (define-compile-time-value name val)
|
202
|
+
(define-syntax name
|
203
|
+
(make-variable-transformer
|
204
|
+
(lambda (x)
|
205
|
+
(syntax-case x (set!)
|
206
|
+
(var (identifier? #'var)
|
207
|
+
(datum->syntax #'var val)))))))
|
208
|
+
|
209
|
+
(define-compile-time-value &s64-min (- #x8000000000000000))
|
210
|
+
(define-compile-time-value &s64-max #x7fffFFFFffffFFFF)
|
211
|
+
(define-compile-time-value &u64-max #xffffFFFFffffFFFF)
|
212
|
+
|
213
|
+
(define-syntax &range-min (identifier-syntax &s64-min))
|
214
|
+
(define-syntax &range-max (identifier-syntax &u64-max))
|
215
|
+
|
216
|
+
;; This is a hack that takes advantage of knowing that
|
217
|
+
;; most-positive-fixnum is the size of a word, but with two tag bits and
|
218
|
+
;; one sign bit. We also assume that the current common architectural
|
219
|
+
;; restriction of a maximum 48-bit address space means that we won't see
|
220
|
+
;; a size_t value above 2^48.
|
221
|
+
(define *max-size-t*
|
222
|
+
(min (+ (ash most-positive-fixnum 3) #b111)
|
223
|
+
(1- (ash 1 48))))
|
224
|
+
(define *max-codepoint* #x10ffff)
|
225
|
+
|
226
|
+
(define-inlinable (make-unclamped-type-entry type min max)
|
227
|
+
(vector type min max))
|
228
|
+
(define-inlinable (type-entry-type tentry)
|
229
|
+
(vector-ref tentry 0))
|
230
|
+
(define-inlinable (type-entry-min tentry)
|
231
|
+
(vector-ref tentry 1))
|
232
|
+
(define-inlinable (type-entry-max tentry)
|
233
|
+
(vector-ref tentry 2))
|
234
|
+
|
235
|
+
(define-inlinable (clamp-min val)
|
236
|
+
(cond
|
237
|
+
;; Fast path to avoid comparisons with bignums.
|
238
|
+
((<= most-negative-fixnum val most-positive-fixnum) val)
|
239
|
+
((< val &range-min) -inf.0)
|
240
|
+
((< &range-max val) &range-max)
|
241
|
+
(else val)))
|
242
|
+
|
243
|
+
(define-inlinable (clamp-max val)
|
244
|
+
(cond
|
245
|
+
;; Fast path to avoid comparisons with bignums.
|
246
|
+
((<= most-negative-fixnum val most-positive-fixnum) val)
|
247
|
+
((< &range-max val) +inf.0)
|
248
|
+
((< val &range-min) &range-min)
|
249
|
+
(else val)))
|
250
|
+
|
251
|
+
(define-inlinable (make-type-entry type min max)
|
252
|
+
(vector type (clamp-min min) (clamp-max max)))
|
253
|
+
|
254
|
+
(define all-types-entry (make-type-entry &all-types -inf.0 +inf.0))
|
255
|
+
|
256
|
+
(define* (var-type-entry typeset var #:optional (default all-types-entry))
|
257
|
+
(intmap-ref typeset var (lambda (_) default)))
|
258
|
+
|
259
|
+
(define (var-type typeset var)
|
260
|
+
(type-entry-type (var-type-entry typeset var)))
|
261
|
+
(define (var-min typeset var)
|
262
|
+
(type-entry-min (var-type-entry typeset var)))
|
263
|
+
(define (var-max typeset var)
|
264
|
+
(type-entry-max (var-type-entry typeset var)))
|
265
|
+
|
266
|
+
;; Is the type entry A contained entirely within B?
|
267
|
+
(define (type-entry<=? a b)
|
268
|
+
(match (cons a b)
|
269
|
+
((#(a-type a-min a-max) . #(b-type b-min b-max))
|
270
|
+
(and (eqv? b-type (logior a-type b-type))
|
271
|
+
(<= b-min a-min)
|
272
|
+
(>= b-max a-max)))))
|
273
|
+
|
274
|
+
(define (type-entry-union a b)
|
275
|
+
(cond
|
276
|
+
((type-entry<=? b a) a)
|
277
|
+
((type-entry<=? a b) b)
|
278
|
+
(else (make-type-entry
|
279
|
+
(logior (type-entry-type a) (type-entry-type b))
|
280
|
+
(min (type-entry-min a) (type-entry-min b))
|
281
|
+
(max (type-entry-max a) (type-entry-max b))))))
|
282
|
+
|
283
|
+
(define (type-entry-saturating-union a b)
|
284
|
+
(cond
|
285
|
+
((type-entry<=? b a) a)
|
286
|
+
(else
|
287
|
+
(make-type-entry
|
288
|
+
(logior (type-entry-type a) (type-entry-type b))
|
289
|
+
(let ((a-min (type-entry-min a))
|
290
|
+
(b-min (type-entry-min b)))
|
291
|
+
(cond
|
292
|
+
((not (< b-min a-min)) a-min)
|
293
|
+
((< 0 b-min) 0)
|
294
|
+
((< &range-min b-min) &range-min)
|
295
|
+
(else -inf.0)))
|
296
|
+
(let ((a-max (type-entry-max a))
|
297
|
+
(b-max (type-entry-max b)))
|
298
|
+
(cond
|
299
|
+
((not (> b-max a-max)) a-max)
|
300
|
+
((> *max-size-t* b-max) *max-size-t*)
|
301
|
+
((> &range-max b-max) &range-max)
|
302
|
+
(else +inf.0)))))))
|
303
|
+
|
304
|
+
(define (type-entry-intersection a b)
|
305
|
+
(cond
|
306
|
+
((type-entry<=? a b) a)
|
307
|
+
((type-entry<=? b a) b)
|
308
|
+
(else (make-type-entry
|
309
|
+
(logand (type-entry-type a) (type-entry-type b))
|
310
|
+
(max (type-entry-min a) (type-entry-min b))
|
311
|
+
(min (type-entry-max a) (type-entry-max b))))))
|
312
|
+
|
313
|
+
(define (adjoin-var typeset var entry)
|
314
|
+
(intmap-add typeset var entry type-entry-union))
|
315
|
+
|
316
|
+
(define (restrict-var typeset var entry)
|
317
|
+
(intmap-add typeset var entry type-entry-intersection))
|
318
|
+
|
319
|
+
(define (constant-type val)
|
320
|
+
"Compute the type and range of VAL. Return three values: the type,
|
321
|
+
minimum, and maximum."
|
322
|
+
(define (return type val)
|
323
|
+
(if val
|
324
|
+
(make-type-entry type val val)
|
325
|
+
(make-type-entry type -inf.0 +inf.0)))
|
326
|
+
(cond
|
327
|
+
((number? val)
|
328
|
+
(cond
|
329
|
+
((exact-integer? val) (return &exact-integer val))
|
330
|
+
((eqv? (imag-part val) 0)
|
331
|
+
(if (nan? val)
|
332
|
+
(make-type-entry &flonum -inf.0 +inf.0)
|
333
|
+
(make-type-entry
|
334
|
+
(if (exact? val) &fraction &flonum)
|
335
|
+
(if (rational? val) (inexact->exact (floor val)) val)
|
336
|
+
(if (rational? val) (inexact->exact (ceiling val)) val))))
|
337
|
+
(else (return &complex #f))))
|
338
|
+
((eq? val '()) (return &null #f))
|
339
|
+
((eq? val #nil) (return &nil #f))
|
340
|
+
((eq? val #t) (return &true #f))
|
341
|
+
((eq? val #f) (return &false #f))
|
342
|
+
((char? val) (return &char (char->integer val)))
|
343
|
+
((eqv? val *unspecified*) (return &unspecified #f))
|
344
|
+
((symbol? val) (return &symbol #f))
|
345
|
+
((keyword? val) (return &keyword #f))
|
346
|
+
((pair? val) (return &pair #f))
|
347
|
+
((vector? val) (return &vector (vector-length val)))
|
348
|
+
((string? val) (return &string (string-length val)))
|
349
|
+
((bytevector? val) (return &bytevector (bytevector-length val)))
|
350
|
+
((bitvector? val) (return &bitvector (bitvector-length val)))
|
351
|
+
((array? val) (return &array (array-rank val)))
|
352
|
+
((syntax? val) (return &syntax 0))
|
353
|
+
((not (variable-bound? (make-variable val))) (return &unbound #f))
|
354
|
+
|
355
|
+
(else (error "unhandled constant" val))))
|
356
|
+
|
357
|
+
(define *type-checkers* (make-hash-table))
|
358
|
+
(define *type-inferrers* (make-hash-table))
|
359
|
+
|
360
|
+
(define-syntax-rule (define-type-helper name)
|
361
|
+
(define-syntax-parameter name
|
362
|
+
(lambda (stx)
|
363
|
+
(syntax-violation 'name
|
364
|
+
"macro used outside of define-type"
|
365
|
+
stx))))
|
366
|
+
(define-type-helper define!)
|
367
|
+
(define-type-helper restrict!)
|
368
|
+
(define-type-helper &type)
|
369
|
+
(define-type-helper &min)
|
370
|
+
(define-type-helper &max)
|
371
|
+
|
372
|
+
;; Accessors to use in type inferrers where you know that the values
|
373
|
+
;; must be in some range for the computation to proceed (not throw an
|
374
|
+
;; error). Note that these accessors should be used even for &u64 and
|
375
|
+
;; &s64 values, whose definitions you would think would be apparent
|
376
|
+
;; already. However it could be that the graph isn't sorted, so we see
|
377
|
+
;; a use before a definition, in which case we need to clamp the generic
|
378
|
+
;; limits to the &u64/&s64 range.
|
379
|
+
(define-syntax-rule (&min/0 x) (max (&min x) 0))
|
380
|
+
(define-syntax-rule (&max/u64 x) (min (&max x) &u64-max))
|
381
|
+
(define-syntax-rule (&min/s64 x) (max (&min x) &s64-min))
|
382
|
+
(define-syntax-rule (&max/s64 x) (min (&max x) &s64-max))
|
383
|
+
(define-syntax-rule (&max/size x) (min (&max x) *max-size-t*))
|
384
|
+
|
385
|
+
(define-syntax-rule (define-type-checker (name arg ...) body ...)
|
386
|
+
(hashq-set!
|
387
|
+
*type-checkers*
|
388
|
+
'name
|
389
|
+
(lambda (typeset arg ...)
|
390
|
+
(syntax-parameterize
|
391
|
+
((&type (syntax-rules () ((_ val) (var-type typeset val))))
|
392
|
+
(&min (syntax-rules () ((_ val) (var-min typeset val))))
|
393
|
+
(&max (syntax-rules () ((_ val) (var-max typeset val)))))
|
394
|
+
body ...))))
|
395
|
+
|
396
|
+
(define-syntax-rule (check-type arg type min max)
|
397
|
+
;; If the arg is negative, it is a closure variable.
|
398
|
+
(and (>= arg 0)
|
399
|
+
(zero? (logand (lognot type) (&type arg)))
|
400
|
+
(<= min (&min arg))
|
401
|
+
(<= (&max arg) max)))
|
402
|
+
|
403
|
+
(define-syntax-rule (define-type-inferrer* (name succ var ...) body ...)
|
404
|
+
(hashq-set!
|
405
|
+
*type-inferrers*
|
406
|
+
'name
|
407
|
+
(lambda (in succ var ...)
|
408
|
+
(let ((out in))
|
409
|
+
(syntax-parameterize
|
410
|
+
((define!
|
411
|
+
(syntax-rules ()
|
412
|
+
((_ val type min max)
|
413
|
+
(set! out (adjoin-var out val
|
414
|
+
(make-type-entry type min max))))))
|
415
|
+
(restrict!
|
416
|
+
(syntax-rules ()
|
417
|
+
((_ val type min max)
|
418
|
+
(set! out (restrict-var out val
|
419
|
+
(make-type-entry type min max))))))
|
420
|
+
(&type (syntax-rules () ((_ val) (var-type in val))))
|
421
|
+
(&min (syntax-rules () ((_ val) (var-min in val))))
|
422
|
+
(&max (syntax-rules () ((_ val) (var-max in val)))))
|
423
|
+
body ...
|
424
|
+
out)))))
|
425
|
+
|
426
|
+
(define-syntax-rule (define-type-inferrer (name arg ...) body ...)
|
427
|
+
(define-type-inferrer* (name succ arg ...) body ...))
|
428
|
+
|
429
|
+
(define-syntax-rule (define-predicate-inferrer (name arg ... true?) body ...)
|
430
|
+
(define-type-inferrer* (name succ arg ...)
|
431
|
+
(let ((true? (not (zero? succ))))
|
432
|
+
body ...)))
|
433
|
+
|
434
|
+
(define-syntax define-simple-type-checker
|
435
|
+
(lambda (x)
|
436
|
+
(define (parse-spec l)
|
437
|
+
(syntax-case l ()
|
438
|
+
(() '())
|
439
|
+
(((type min max) . l) (cons #'(type min max) (parse-spec #'l)))
|
440
|
+
(((type min+max) . l) (cons #'(type min+max min+max) (parse-spec #'l)))
|
441
|
+
((type . l) (cons #'(type -inf.0 +inf.0) (parse-spec #'l)))))
|
442
|
+
(syntax-case x ()
|
443
|
+
((_ (name arg-spec ...) result-spec ...)
|
444
|
+
(with-syntax
|
445
|
+
(((arg ...) (generate-temporaries #'(arg-spec ...)))
|
446
|
+
(((arg-type arg-min arg-max) ...) (parse-spec #'(arg-spec ...))))
|
447
|
+
#'(define-type-checker (name arg ...)
|
448
|
+
(and (check-type arg arg-type arg-min arg-max)
|
449
|
+
...)))))))
|
450
|
+
|
451
|
+
(define-syntax define-simple-type-inferrer
|
452
|
+
(lambda (x)
|
453
|
+
(define (parse-spec l)
|
454
|
+
(syntax-case l ()
|
455
|
+
(() '())
|
456
|
+
(((type min max) . l) (cons #'(type min max) (parse-spec #'l)))
|
457
|
+
(((type min+max) . l) (cons #'(type min+max min+max) (parse-spec #'l)))
|
458
|
+
((type . l) (cons #'(type -inf.0 +inf.0) (parse-spec #'l)))))
|
459
|
+
(syntax-case x ()
|
460
|
+
((_ (name arg-spec ...) result-spec ...)
|
461
|
+
(with-syntax
|
462
|
+
(((arg ...) (generate-temporaries #'(arg-spec ...)))
|
463
|
+
(((arg-type arg-min arg-max) ...) (parse-spec #'(arg-spec ...)))
|
464
|
+
((res ...) (generate-temporaries #'(result-spec ...)))
|
465
|
+
(((res-type res-min res-max) ...) (parse-spec #'(result-spec ...))))
|
466
|
+
#'(define-type-inferrer (name arg ... res ...)
|
467
|
+
(restrict! arg arg-type arg-min arg-max)
|
468
|
+
...
|
469
|
+
(define! res res-type res-min res-max)
|
470
|
+
...))))))
|
471
|
+
|
472
|
+
(define-syntax-rule (define-simple-type (name arg-spec ...) result-spec ...)
|
473
|
+
(begin
|
474
|
+
(define-simple-type-checker (name arg-spec ...))
|
475
|
+
(define-simple-type-inferrer (name arg-spec ...) result-spec ...)))
|
476
|
+
|
477
|
+
(define-syntax-rule (define-simple-types
|
478
|
+
((name arg-spec ...) result-spec ...)
|
479
|
+
...)
|
480
|
+
(begin
|
481
|
+
(define-simple-type (name arg-spec ...) result-spec ...)
|
482
|
+
...))
|
483
|
+
|
484
|
+
(define-syntax-rule (define-type-checker-aliases orig alias ...)
|
485
|
+
(let ((check (hashq-ref *type-checkers* 'orig)))
|
486
|
+
(hashq-set! *type-checkers* 'alias check)
|
487
|
+
...))
|
488
|
+
(define-syntax-rule (define-type-inferrer-aliases orig alias ...)
|
489
|
+
(let ((check (hashq-ref *type-inferrers* 'orig)))
|
490
|
+
(hashq-set! *type-inferrers* 'alias check)
|
491
|
+
...))
|
492
|
+
(define-syntax-rule (define-type-aliases orig alias ...)
|
493
|
+
(begin
|
494
|
+
(define-type-checker-aliases orig alias ...)
|
495
|
+
(define-type-inferrer-aliases orig alias ...)))
|
496
|
+
|
497
|
+
|
498
|
+
|
499
|
+
|
500
|
+
;;; This list of primcall type definitions follows the order of
|
501
|
+
;;; effects-analysis.scm; please keep it in a similar order.
|
502
|
+
;;;
|
503
|
+
;;; There is no need to add checker definitions for expressions that do
|
504
|
+
;;; not exhibit the &type-check effect, as callers should not ask if
|
505
|
+
;;; such an expression does or does not type-check. For those that do
|
506
|
+
;;; exhibit &type-check, you should define a type inferrer unless the
|
507
|
+
;;; primcall will never typecheck.
|
508
|
+
;;;
|
509
|
+
;;; Likewise there is no need to define inferrers for primcalls which
|
510
|
+
;;; return &all-types values and which never raise exceptions from which
|
511
|
+
;;; we can infer the types of incoming values.
|
512
|
+
|
513
|
+
|
514
|
+
|
515
|
+
|
516
|
+
;;;
|
517
|
+
;;; Generic effect-free predicates.
|
518
|
+
;;;
|
519
|
+
|
520
|
+
(define-predicate-inferrer (eq? a b true?)
|
521
|
+
;; We can only propagate information down the true leg.
|
522
|
+
(when true?
|
523
|
+
(let ((type (logand (&type a) (&type b)))
|
524
|
+
(min (max (&min a) (&min b)))
|
525
|
+
(max (min (&max a) (&max b))))
|
526
|
+
(restrict! a type min max)
|
527
|
+
(restrict! b type min max))))
|
528
|
+
(define-type-inferrer-aliases eq? eqv?)
|
529
|
+
|
530
|
+
(define-syntax-rule (define-simple-predicate-inferrer predicate type)
|
531
|
+
(define-predicate-inferrer (predicate val true?)
|
532
|
+
(let ((type* (logand (&type val)
|
533
|
+
(if true?
|
534
|
+
type
|
535
|
+
(lognot type)))))
|
536
|
+
(restrict! val type* -inf.0 +inf.0))))
|
537
|
+
(define-simple-predicate-inferrer pair? &pair)
|
538
|
+
(define-simple-predicate-inferrer null? (logior &nil &null))
|
539
|
+
(define-simple-predicate-inferrer nil? (logior &false &nil &null))
|
540
|
+
(define-simple-predicate-inferrer symbol? &symbol)
|
541
|
+
(define-simple-predicate-inferrer variable? &box)
|
542
|
+
(define-simple-predicate-inferrer vector? &vector)
|
543
|
+
(define-simple-predicate-inferrer struct? &struct)
|
544
|
+
(define-simple-predicate-inferrer string? &string)
|
545
|
+
(define-simple-predicate-inferrer bytevector? &bytevector)
|
546
|
+
(define-simple-predicate-inferrer bitvector? &bitvector)
|
547
|
+
(define-simple-predicate-inferrer keyword? &keyword)
|
548
|
+
(define-simple-predicate-inferrer number? &number)
|
549
|
+
(define-simple-predicate-inferrer char? &char)
|
550
|
+
(define-simple-predicate-inferrer procedure? &procedure)
|
551
|
+
(define-simple-predicate-inferrer thunk? &procedure)
|
552
|
+
|
553
|
+
|
554
|
+
|
555
|
+
;;;
|
556
|
+
;;; Fluids. Note that we can't track bound-ness of fluids, as pop-fluid
|
557
|
+
;;; can change boundness.
|
558
|
+
;;;
|
559
|
+
|
560
|
+
(define-simple-types
|
561
|
+
((fluid-ref (&fluid 1)) &all-types)
|
562
|
+
((fluid-set! (&fluid 0 1) &all-types))
|
563
|
+
((push-fluid (&fluid 0 1) &all-types))
|
564
|
+
((pop-fluid))
|
565
|
+
((push-dynamic-state &all-types))
|
566
|
+
((pop-dynamic-state)))
|
567
|
+
|
568
|
+
|
569
|
+
|
570
|
+
|
571
|
+
;;;
|
572
|
+
;;; Threads. We don't currently track threads as an object type.
|
573
|
+
;;;
|
574
|
+
|
575
|
+
(define-simple-types
|
576
|
+
((current-thread) &all-types))
|
577
|
+
|
578
|
+
|
579
|
+
|
580
|
+
|
581
|
+
;;;
|
582
|
+
;;; Prompts. (Nothing to do.)
|
583
|
+
;;;
|
584
|
+
|
585
|
+
|
586
|
+
|
587
|
+
|
588
|
+
;;;
|
589
|
+
;;; Pairs.
|
590
|
+
;;;
|
591
|
+
|
592
|
+
(define-simple-types
|
593
|
+
((cons &all-types &all-types) &pair)
|
594
|
+
((car &pair) &all-types)
|
595
|
+
((set-car! &pair &all-types))
|
596
|
+
((cdr &pair) &all-types)
|
597
|
+
((set-cdr! &pair &all-types)))
|
598
|
+
|
599
|
+
|
600
|
+
|
601
|
+
|
602
|
+
;;;
|
603
|
+
;;; Variables.
|
604
|
+
;;;
|
605
|
+
|
606
|
+
(define-simple-types
|
607
|
+
((box &all-types) (&box 1))
|
608
|
+
((box-ref (&box 1)) &all-types))
|
609
|
+
|
610
|
+
(define-simple-type-checker (box-set! (&box 0 1) &all-types))
|
611
|
+
(define-type-inferrer (box-set! box val)
|
612
|
+
(restrict! box &box 1 1))
|
613
|
+
|
614
|
+
|
615
|
+
|
616
|
+
|
617
|
+
;;;
|
618
|
+
;;; Vectors.
|
619
|
+
;;;
|
620
|
+
|
621
|
+
;; This max-vector-len computation is a hack.
|
622
|
+
(define *max-vector-len* (ash most-positive-fixnum -5))
|
623
|
+
(define-syntax-rule (&max/vector x) (min (&max x) *max-vector-len*))
|
624
|
+
|
625
|
+
(define-simple-type-checker (make-vector (&u64 0 *max-vector-len*)
|
626
|
+
&all-types))
|
627
|
+
(define-type-inferrer (make-vector size init result)
|
628
|
+
(restrict! size &u64 0 *max-vector-len*)
|
629
|
+
(define! result &vector (&min/0 size) (&max/vector size)))
|
630
|
+
|
631
|
+
(define-type-checker (vector-ref v idx)
|
632
|
+
(and (check-type v &vector 0 *max-vector-len*)
|
633
|
+
(check-type idx &u64 0 (1- (&min v)))))
|
634
|
+
(define-type-inferrer (vector-ref v idx result)
|
635
|
+
(restrict! v &vector (1+ (&min/0 idx)) *max-vector-len*)
|
636
|
+
(restrict! idx &u64 0 (1- (&max/vector v)))
|
637
|
+
(define! result &all-types -inf.0 +inf.0))
|
638
|
+
|
639
|
+
(define-type-checker (vector-set! v idx val)
|
640
|
+
(and (check-type v &vector 0 *max-vector-len*)
|
641
|
+
(check-type idx &u64 0 (1- (&min v)))))
|
642
|
+
(define-type-inferrer (vector-set! v idx val)
|
643
|
+
(restrict! v &vector (1+ (&min/0 idx)) *max-vector-len*)
|
644
|
+
(restrict! idx &u64 0 (1- (&max/vector v))))
|
645
|
+
|
646
|
+
(define-type-aliases make-vector make-vector/immediate)
|
647
|
+
(define-type-aliases vector-ref vector-ref/immediate)
|
648
|
+
(define-type-aliases vector-set! vector-set!/immediate)
|
649
|
+
|
650
|
+
(define-simple-type-checker (vector-length &vector))
|
651
|
+
(define-type-inferrer (vector-length v result)
|
652
|
+
(restrict! v &vector 0 *max-vector-len*)
|
653
|
+
(define! result &u64 (&min/0 v) (&max/vector v)))
|
654
|
+
|
655
|
+
|
656
|
+
|
657
|
+
|
658
|
+
;;;
|
659
|
+
;;; Structs.
|
660
|
+
;;;
|
661
|
+
|
662
|
+
;; No type-checker for allocate-struct, as we can't currently check that
|
663
|
+
;; vt is actually a vtable.
|
664
|
+
(define-type-inferrer (allocate-struct vt size result)
|
665
|
+
(restrict! vt &struct vtable-offset-user *max-size-t*)
|
666
|
+
(restrict! size &u64 0 *max-size-t*)
|
667
|
+
(define! result &struct (&min/0 size) (&max/size size)))
|
668
|
+
|
669
|
+
(define-type-checker (struct-ref s idx)
|
670
|
+
(and (check-type s &struct 0 *max-size-t*)
|
671
|
+
(check-type idx &u64 0 *max-size-t*)
|
672
|
+
;; FIXME: is the field readable?
|
673
|
+
(< (&max idx) (&min s))))
|
674
|
+
(define-type-inferrer (struct-ref s idx result)
|
675
|
+
(restrict! s &struct (1+ (&min/0 idx)) *max-size-t*)
|
676
|
+
(restrict! idx &u64 0 (1- (&max/size s)))
|
677
|
+
(define! result &all-types -inf.0 +inf.0))
|
678
|
+
|
679
|
+
(define-type-checker (struct-set! s idx val)
|
680
|
+
(and (check-type s &struct 0 *max-size-t*)
|
681
|
+
(check-type idx &u64 0 *max-size-t*)
|
682
|
+
;; FIXME: is the field writable?
|
683
|
+
(< (&max idx) (&min s))))
|
684
|
+
(define-type-inferrer (struct-set! s idx val)
|
685
|
+
(restrict! s &struct (1+ (&min/0 idx)) *max-size-t*)
|
686
|
+
(restrict! idx &u64 0 (1- (&max/size s))))
|
687
|
+
|
688
|
+
(define-type-aliases allocate-struct allocate-struct/immediate)
|
689
|
+
(define-type-aliases struct-ref struct-ref/immediate)
|
690
|
+
(define-type-aliases struct-set! struct-set!/immediate)
|
691
|
+
|
692
|
+
(define-simple-type (struct-vtable (&struct 0 *max-size-t*))
|
693
|
+
(&struct vtable-offset-user *max-size-t*))
|
694
|
+
|
695
|
+
|
696
|
+
|
697
|
+
|
698
|
+
;;;
|
699
|
+
;;; Strings.
|
700
|
+
;;;
|
701
|
+
|
702
|
+
(define-type-checker (string-ref s idx)
|
703
|
+
(and (check-type s &string 0 *max-size-t*)
|
704
|
+
(check-type idx &u64 0 *max-size-t*)
|
705
|
+
(< (&max idx) (&min s))))
|
706
|
+
(define-type-inferrer (string-ref s idx result)
|
707
|
+
(restrict! s &string (1+ (&min/0 idx)) *max-size-t*)
|
708
|
+
(restrict! idx &u64 0 (1- (&max/size s)))
|
709
|
+
(define! result &char 0 *max-codepoint*))
|
710
|
+
|
711
|
+
(define-type-checker (string-set! s idx val)
|
712
|
+
(and (check-type s &string 0 *max-size-t*)
|
713
|
+
(check-type idx &u64 0 *max-size-t*)
|
714
|
+
(check-type val &char 0 *max-codepoint*)
|
715
|
+
(< (&max idx) (&min s))))
|
716
|
+
(define-type-inferrer (string-set! s idx val)
|
717
|
+
(restrict! s &string (1+ (&min/0 idx)) *max-size-t*)
|
718
|
+
(restrict! idx &u64 0 (1- (&max/size s)))
|
719
|
+
(restrict! val &char 0 *max-codepoint*))
|
720
|
+
|
721
|
+
(define-simple-type-checker (string-length &string))
|
722
|
+
(define-type-inferrer (string-length s result)
|
723
|
+
(restrict! s &string 0 *max-size-t*)
|
724
|
+
(define! result &u64 (&min/0 s) (&max/size s)))
|
725
|
+
|
726
|
+
(define-simple-type (number->string &number) (&string 0 *max-size-t*))
|
727
|
+
(define-simple-type (string->number (&string 0 *max-size-t*))
|
728
|
+
((logior &number &false) -inf.0 +inf.0))
|
729
|
+
|
730
|
+
|
731
|
+
|
732
|
+
|
733
|
+
;;;
|
734
|
+
;;; Unboxed numbers.
|
735
|
+
;;;
|
736
|
+
|
737
|
+
(define-type-checker (scm->f64 scm)
|
738
|
+
(check-type scm &real -inf.0 +inf.0))
|
739
|
+
(define-type-inferrer (scm->f64 scm result)
|
740
|
+
(restrict! scm &real -inf.0 +inf.0)
|
741
|
+
(define! result &f64 (&min scm) (&max scm)))
|
742
|
+
(define-type-aliases scm->f64 load-f64)
|
743
|
+
|
744
|
+
(define-type-checker (f64->scm f64)
|
745
|
+
#t)
|
746
|
+
(define-type-inferrer (f64->scm f64 result)
|
747
|
+
(define! result &flonum (&min f64) (&max f64)))
|
748
|
+
|
749
|
+
(define-type-checker (scm->u64 scm)
|
750
|
+
(check-type scm &exact-integer 0 &u64-max))
|
751
|
+
(define-type-inferrer (scm->u64 scm result)
|
752
|
+
(restrict! scm &exact-integer 0 &u64-max)
|
753
|
+
(define! result &u64 (&min/0 scm) (&max/u64 scm)))
|
754
|
+
(define-type-aliases scm->u64 load-u64)
|
755
|
+
|
756
|
+
(define-type-checker (scm->u64/truncate scm)
|
757
|
+
(check-type scm &exact-integer &range-min &range-max))
|
758
|
+
(define-type-inferrer (scm->u64/truncate scm result)
|
759
|
+
(restrict! scm &exact-integer &range-min &range-max)
|
760
|
+
(define! result &u64 0 &u64-max))
|
761
|
+
|
762
|
+
(define-type-checker (u64->scm u64)
|
763
|
+
#t)
|
764
|
+
(define-type-inferrer (u64->scm u64 result)
|
765
|
+
(define! result &exact-integer (&min/0 u64) (&max/u64 u64)))
|
766
|
+
|
767
|
+
(define-type-checker (scm->s64 scm)
|
768
|
+
(check-type scm &exact-integer &s64-min &s64-max))
|
769
|
+
(define-type-inferrer (scm->s64 scm result)
|
770
|
+
(restrict! scm &exact-integer &s64-min &s64-max)
|
771
|
+
(define! result &s64 (&min/s64 scm) (&max/s64 scm)))
|
772
|
+
(define-type-aliases scm->s64 load-s64)
|
773
|
+
|
774
|
+
(define-type-checker (s64->scm s64)
|
775
|
+
#t)
|
776
|
+
(define-type-inferrer (s64->scm s64 result)
|
777
|
+
(define! result &exact-integer (&min/s64 s64) (&max/s64 s64)))
|
778
|
+
|
779
|
+
|
780
|
+
|
781
|
+
|
782
|
+
;;;
|
783
|
+
;;; Bytevectors.
|
784
|
+
;;;
|
785
|
+
|
786
|
+
(define-simple-type-checker (bv-length &bytevector))
|
787
|
+
(define-type-inferrer (bv-length bv result)
|
788
|
+
(restrict! bv &bytevector 0 *max-size-t*)
|
789
|
+
(define! result &u64 (&min/0 bv) (&max/size bv)))
|
790
|
+
|
791
|
+
(define-syntax-rule (define-bytevector-accessors ref set type size lo hi)
|
792
|
+
(begin
|
793
|
+
(define-type-checker (ref bv idx)
|
794
|
+
(and (check-type bv &bytevector 0 *max-size-t*)
|
795
|
+
(check-type idx &u64 0 *max-size-t*)
|
796
|
+
(< (&max idx) (- (&min bv) size))))
|
797
|
+
(define-type-inferrer (ref bv idx result)
|
798
|
+
(restrict! bv &bytevector (+ (&min/0 idx) size) *max-size-t*)
|
799
|
+
(restrict! idx &u64 0 (- (&max/size bv) size))
|
800
|
+
(define! result type lo hi))
|
801
|
+
(define-type-checker (set bv idx val)
|
802
|
+
(and (check-type bv &bytevector 0 *max-size-t*)
|
803
|
+
(check-type idx &u64 0 *max-size-t*)
|
804
|
+
(check-type val type lo hi)
|
805
|
+
(< (&max idx) (- (&min bv) size))))
|
806
|
+
(define-type-inferrer (set! bv idx val)
|
807
|
+
(restrict! bv &bytevector (+ (&min/0 idx) size) *max-size-t*)
|
808
|
+
(restrict! idx &u64 0 (- (&max/size bv) size))
|
809
|
+
(restrict! val type lo hi))))
|
810
|
+
|
811
|
+
(define-bytevector-accessors bv-u8-ref bv-u8-set! &u64 1 0 #xff)
|
812
|
+
(define-bytevector-accessors bv-s8-ref bv-s8-set! &s64 1 (- #x80) #x7f)
|
813
|
+
|
814
|
+
(define-bytevector-accessors bv-u16-ref bv-u16-set! &u64 2 0 #xffff)
|
815
|
+
(define-bytevector-accessors bv-s16-ref bv-s16-set! &s64 2 (- #x8000) #x7fff)
|
816
|
+
|
817
|
+
(define-bytevector-accessors bv-u32-ref bv-u32-set! &u64 4 0 #xffffffff)
|
818
|
+
(define-bytevector-accessors bv-s32-ref bv-s32-set! &s64 4
|
819
|
+
(- #x80000000) #x7fffffff)
|
820
|
+
|
821
|
+
(define-bytevector-accessors bv-u64-ref bv-u64-set! &u64 8 0 &u64-max)
|
822
|
+
(define-bytevector-accessors bv-s64-ref bv-s64-set! &s64 8 &s64-min &s64-max)
|
823
|
+
|
824
|
+
(define-bytevector-accessors bv-f32-ref bv-f32-set! &f64 4 -inf.0 +inf.0)
|
825
|
+
(define-bytevector-accessors bv-f64-ref bv-f64-set! &f64 8 -inf.0 +inf.0)
|
826
|
+
|
827
|
+
|
828
|
+
|
829
|
+
|
830
|
+
;;;
|
831
|
+
;;; Numbers.
|
832
|
+
;;;
|
833
|
+
|
834
|
+
;; First, branching primitives with no results.
|
835
|
+
(define-simple-type-checker (= &number &number))
|
836
|
+
(define-predicate-inferrer (= a b true?)
|
837
|
+
(when (and true?
|
838
|
+
(zero? (logand (logior (&type a) (&type b)) (lognot &number))))
|
839
|
+
(let ((min (max (&min a) (&min b)))
|
840
|
+
(max (min (&max a) (&max b))))
|
841
|
+
(restrict! a &number min max)
|
842
|
+
(restrict! b &number min max))))
|
843
|
+
|
844
|
+
(define (restricted-comparison-ranges op type0 min0 max0 type1 min1 max1)
|
845
|
+
(define (infer-integer-ranges)
|
846
|
+
(match op
|
847
|
+
('< (values min0 (min max0 (1- max1)) (max (1+ min0) min1) max1))
|
848
|
+
('<= (values min0 (min max0 max1) (max min0 min1) max1))
|
849
|
+
('>= (values (max min0 min1) max0 min1 (min max0 max1)))
|
850
|
+
('> (values (max min0 (1+ min1)) max0 min1 (min (1- max0) max1)))))
|
851
|
+
(define (infer-real-ranges)
|
852
|
+
(match op
|
853
|
+
((or '< '<=) (values min0 (min max0 max1) (max min0 min1) max1))
|
854
|
+
((or '> '>=) (values (max min0 min1) max0 min1 (min max0 max1)))))
|
855
|
+
(if (= (logior type0 type1) &exact-integer)
|
856
|
+
(infer-integer-ranges)
|
857
|
+
(infer-real-ranges)))
|
858
|
+
|
859
|
+
(define-syntax-rule (true-comparison-restrictions op a b a-type b-type)
|
860
|
+
(call-with-values
|
861
|
+
(lambda ()
|
862
|
+
(restricted-comparison-ranges op
|
863
|
+
(&type a) (&min a) (&max a)
|
864
|
+
(&type b) (&min b) (&max b)))
|
865
|
+
(lambda (min0 max0 min1 max1)
|
866
|
+
(restrict! a a-type min0 max0)
|
867
|
+
(restrict! b b-type min1 max1))))
|
868
|
+
|
869
|
+
(define-syntax-rule (define-comparison-inferrer (op inverse))
|
870
|
+
(define-predicate-inferrer (op a b true?)
|
871
|
+
(when (zero? (logand (logior (&type a) (&type b)) (lognot &number)))
|
872
|
+
(true-comparison-restrictions (if true? 'op 'inverse) a b &real &real))))
|
873
|
+
|
874
|
+
(define-simple-type-checker (< &real &real))
|
875
|
+
(define-comparison-inferrer (< >=))
|
876
|
+
|
877
|
+
(define-simple-type-checker (<= &real &real))
|
878
|
+
(define-comparison-inferrer (<= >))
|
879
|
+
|
880
|
+
(define-simple-type-checker (>= &real &real))
|
881
|
+
(define-comparison-inferrer (>= <))
|
882
|
+
|
883
|
+
(define-simple-type-checker (> &real &real))
|
884
|
+
(define-comparison-inferrer (> <=))
|
885
|
+
|
886
|
+
(define-simple-type-checker (u64-= &u64 &u64))
|
887
|
+
(define-predicate-inferrer (u64-= a b true?)
|
888
|
+
(when true?
|
889
|
+
(let ((min (max (&min/0 a) (&min/0 b)))
|
890
|
+
(max (min (&max/u64 a) (&max/u64 b))))
|
891
|
+
(restrict! a &u64 min max)
|
892
|
+
(restrict! b &u64 min max))))
|
893
|
+
|
894
|
+
(define-simple-type-checker (u64-=-scm &u64 &real))
|
895
|
+
(define-predicate-inferrer (u64-=-scm a b true?)
|
896
|
+
(when (and true? (zero? (logand (&type b) (lognot &real))))
|
897
|
+
(let ((min (max (&min/0 a) (&min/0 b)))
|
898
|
+
(max (min (&max/u64 a) (&max/u64 b))))
|
899
|
+
(restrict! a &u64 min max)
|
900
|
+
(restrict! b &real min max))))
|
901
|
+
|
902
|
+
(define-simple-type-checker (u64-<-scm &u64 &real))
|
903
|
+
(define-predicate-inferrer (u64-<-scm a b true?)
|
904
|
+
(when (and true? (zero? (logand (&type b) (lognot &real))))
|
905
|
+
(true-comparison-restrictions '< a b &u64 &real)))
|
906
|
+
|
907
|
+
(define-simple-type-checker (u64-<=-scm &u64 &real))
|
908
|
+
(define-predicate-inferrer (u64-<=-scm a b true?)
|
909
|
+
(when (and true? (zero? (logand (&type b) (lognot &real))))
|
910
|
+
(true-comparison-restrictions '<= a b &u64 &real)))
|
911
|
+
|
912
|
+
(define-simple-type-checker (u64->=-scm &u64 &real))
|
913
|
+
(define-predicate-inferrer (u64->=-scm a b true?)
|
914
|
+
(when (and true? (zero? (logand (&type b) (lognot &real))))
|
915
|
+
(true-comparison-restrictions '>= a b &u64 &real)))
|
916
|
+
|
917
|
+
(define-simple-type-checker (u64->-scm &u64 &real))
|
918
|
+
(define-predicate-inferrer (u64->-scm a b true?)
|
919
|
+
(when (and true? (zero? (logand (&type b) (lognot &real))))
|
920
|
+
(true-comparison-restrictions '> a b &u64 &real)))
|
921
|
+
|
922
|
+
(define (infer-u64-comparison-ranges op min0 max0 min1 max1)
|
923
|
+
(match op
|
924
|
+
('< (values min0 (min max0 (1- max1)) (max (1+ min0) min1) max1))
|
925
|
+
('<= (values min0 (min max0 max1) (max min0 min1) max1))
|
926
|
+
('>= (values (max min0 min1) max0 min1 (min max0 max1)))
|
927
|
+
('> (values (max min0 (1+ min1)) max0 min1 (min (1- max0) max1)))))
|
928
|
+
(define-syntax-rule (define-u64-comparison-inferrer (u64-op op inverse))
|
929
|
+
(define-predicate-inferrer (u64-op a b true?)
|
930
|
+
(call-with-values
|
931
|
+
(lambda ()
|
932
|
+
(infer-u64-comparison-ranges (if true? 'op 'inverse)
|
933
|
+
(&min/0 a) (&max/u64 a)
|
934
|
+
(&min/0 b) (&max/u64 b)))
|
935
|
+
(lambda (min0 max0 min1 max1)
|
936
|
+
(restrict! a &u64 min0 max0)
|
937
|
+
(restrict! b &u64 min1 max1)))))
|
938
|
+
|
939
|
+
(define-simple-type-checker (u64-< &u64 &u64))
|
940
|
+
(define-u64-comparison-inferrer (u64-< < >=))
|
941
|
+
|
942
|
+
(define-simple-type-checker (u64-<= &u64 &u64))
|
943
|
+
(define-u64-comparison-inferrer (u64-<= <= >))
|
944
|
+
|
945
|
+
(define-simple-type-checker (u64->= &u64 &u64))
|
946
|
+
(define-u64-comparison-inferrer (u64-<= >= <))
|
947
|
+
|
948
|
+
(define-simple-type-checker (u64-> &u64 &u64))
|
949
|
+
(define-u64-comparison-inferrer (u64-> > <=))
|
950
|
+
|
951
|
+
;; Arithmetic.
|
952
|
+
(define-syntax-rule (define-unary-result! a result min max)
|
953
|
+
(let ((min* min)
|
954
|
+
(max* max)
|
955
|
+
(type (logand (&type a) &number)))
|
956
|
+
(cond
|
957
|
+
((not (= type (&type a)))
|
958
|
+
;; Not a number. Punt and do nothing.
|
959
|
+
(define! result &all-types -inf.0 +inf.0))
|
960
|
+
;; Complex numbers don't have a range.
|
961
|
+
((eqv? type &complex)
|
962
|
+
(define! result &complex -inf.0 +inf.0))
|
963
|
+
(else
|
964
|
+
(define! result type min* max*)))))
|
965
|
+
|
966
|
+
(define-syntax-rule (define-binary-result! a b result closed? min max)
|
967
|
+
(let ((min* min)
|
968
|
+
(max* max)
|
969
|
+
(a-type (logand (&type a) &number))
|
970
|
+
(b-type (logand (&type b) &number)))
|
971
|
+
(cond
|
972
|
+
((or (not (= a-type (&type a))) (not (= b-type (&type b))))
|
973
|
+
;; One input not a number. Perhaps we end up dispatching to
|
974
|
+
;; GOOPS.
|
975
|
+
(define! result &all-types -inf.0 +inf.0))
|
976
|
+
;; Complex numbers are contagious.
|
977
|
+
((or (eqv? a-type &complex) (eqv? b-type &complex))
|
978
|
+
(define! result &complex -inf.0 +inf.0))
|
979
|
+
((or (eqv? a-type &flonum) (eqv? b-type &flonum))
|
980
|
+
;; If one argument is a flonum, the result will be flonum or
|
981
|
+
;; possibly complex.
|
982
|
+
(let ((result-type (logand (logior a-type b-type)
|
983
|
+
(logior &complex &flonum))))
|
984
|
+
(define! result result-type min* max*)))
|
985
|
+
;; Exact integers are closed under some operations.
|
986
|
+
((and closed? (eqv? a-type &exact-integer) (eqv? b-type &exact-integer))
|
987
|
+
(define! result &exact-integer min* max*))
|
988
|
+
(else
|
989
|
+
(let* ((type (logior a-type b-type))
|
990
|
+
;; Fractions may become integers.
|
991
|
+
(type (if (zero? (logand type &fraction))
|
992
|
+
type
|
993
|
+
(logior type &exact-integer)))
|
994
|
+
;; Integers may become fractions under division.
|
995
|
+
(type (if (or closed?
|
996
|
+
(zero? (logand type (logior &exact-integer))))
|
997
|
+
type
|
998
|
+
(logior type &fraction))))
|
999
|
+
(define! result type min* max*))))))
|
1000
|
+
|
1001
|
+
(define-simple-type-checker (add &number &number))
|
1002
|
+
(define-type-aliases add add/immediate)
|
1003
|
+
(define-type-checker (fadd a b) #t)
|
1004
|
+
(define-type-checker (uadd a b) #t)
|
1005
|
+
(define-type-inferrer (add a b result)
|
1006
|
+
(define-binary-result! a b result #t
|
1007
|
+
(+ (&min a) (&min b))
|
1008
|
+
(+ (&max a) (&max b))))
|
1009
|
+
(define-type-inferrer (fadd a b result)
|
1010
|
+
(define! result &f64
|
1011
|
+
(+ (&min a) (&min b))
|
1012
|
+
(+ (&max a) (&max b))))
|
1013
|
+
(define-type-inferrer (uadd a b result)
|
1014
|
+
;; Handle wraparound.
|
1015
|
+
(let ((max (+ (&max/u64 a) (&max/u64 b))))
|
1016
|
+
(if (<= max &u64-max)
|
1017
|
+
(define! result &u64 (+ (&min/0 a) (&min/0 b)) max)
|
1018
|
+
(define! result &u64 0 &u64-max))))
|
1019
|
+
(define-type-aliases uadd uadd/immediate)
|
1020
|
+
|
1021
|
+
(define-simple-type-checker (sub &number &number))
|
1022
|
+
(define-type-aliases sub sub/immediate)
|
1023
|
+
(define-type-checker (fsub a b) #t)
|
1024
|
+
(define-type-checker (usub a b) #t)
|
1025
|
+
(define-type-inferrer (sub a b result)
|
1026
|
+
(define-binary-result! a b result #t
|
1027
|
+
(- (&min a) (&max b))
|
1028
|
+
(- (&max a) (&min b))))
|
1029
|
+
(define-type-inferrer (fsub a b result)
|
1030
|
+
(define! result &f64
|
1031
|
+
(- (&min a) (&max b))
|
1032
|
+
(- (&max a) (&min b))))
|
1033
|
+
(define-type-inferrer (usub a b result)
|
1034
|
+
;; Handle wraparound.
|
1035
|
+
(let ((min (- (&min/0 a) (&max/u64 b))))
|
1036
|
+
(if (< min 0)
|
1037
|
+
(define! result &u64 0 &u64-max)
|
1038
|
+
(define! result &u64 min (- (&max/u64 a) (&min/0 b))))))
|
1039
|
+
(define-type-aliases usub usub/immediate)
|
1040
|
+
|
1041
|
+
(define-simple-type-checker (mul &number &number))
|
1042
|
+
(define-type-checker (fmul a b) #t)
|
1043
|
+
(define-type-checker (umul a b) #t)
|
1044
|
+
(define (mul-result-range same? nan-impossible? min-a max-a min-b max-b)
|
1045
|
+
(define (nan* a b)
|
1046
|
+
(if (and (or (and (inf? a) (zero? b))
|
1047
|
+
(and (zero? a) (inf? b)))
|
1048
|
+
nan-impossible?)
|
1049
|
+
0
|
1050
|
+
(* a b)))
|
1051
|
+
(let ((-- (nan* min-a min-b))
|
1052
|
+
(-+ (nan* min-a max-b))
|
1053
|
+
(++ (nan* max-a max-b))
|
1054
|
+
(+- (nan* max-a min-b)))
|
1055
|
+
(let ((has-nan? (or (nan? --) (nan? -+) (nan? ++) (nan? +-))))
|
1056
|
+
(values (cond
|
1057
|
+
(same? 0)
|
1058
|
+
(has-nan? -inf.0)
|
1059
|
+
(else (min -- -+ ++ +-)))
|
1060
|
+
(if has-nan?
|
1061
|
+
+inf.0
|
1062
|
+
(max -- -+ ++ +-))))))
|
1063
|
+
(define-type-inferrer (mul a b result)
|
1064
|
+
(let ((min-a (&min a)) (max-a (&max a))
|
1065
|
+
(min-b (&min b)) (max-b (&max b))
|
1066
|
+
;; We only really get +inf.0 at runtime for flonums and
|
1067
|
+
;; compnums. If we have inferred that the arguments are not
|
1068
|
+
;; flonums and not compnums, then the result of (* +inf.0 0) at
|
1069
|
+
;; range inference time is 0 and not +nan.0.
|
1070
|
+
(nan-impossible? (not (logtest (logior (&type a) (&type b))
|
1071
|
+
(logior &flonum &complex)))))
|
1072
|
+
(call-with-values (lambda ()
|
1073
|
+
(mul-result-range (eqv? a b) nan-impossible?
|
1074
|
+
min-a max-a min-b max-b))
|
1075
|
+
(lambda (min max)
|
1076
|
+
(define-binary-result! a b result #t min max)))))
|
1077
|
+
(define-type-inferrer (fmul a b result)
|
1078
|
+
(let ((min-a (&min a)) (max-a (&max a))
|
1079
|
+
(min-b (&min b)) (max-b (&max b))
|
1080
|
+
(nan-impossible? #f))
|
1081
|
+
(call-with-values (lambda ()
|
1082
|
+
(mul-result-range (eqv? a b) nan-impossible?
|
1083
|
+
min-a max-a min-b max-b))
|
1084
|
+
(lambda (min max)
|
1085
|
+
(define! result &f64 min max)))))
|
1086
|
+
(define-type-inferrer (umul a b result)
|
1087
|
+
;; Handle wraparound.
|
1088
|
+
(let ((max (* (&max/u64 a) (&max/u64 b))))
|
1089
|
+
(if (<= max &u64-max)
|
1090
|
+
(define! result &u64 (* (&min/0 a) (&min/0 b)) max)
|
1091
|
+
(define! result &u64 0 &u64-max))))
|
1092
|
+
(define-type-aliases umul umul/immediate)
|
1093
|
+
|
1094
|
+
(define-type-checker (div a b)
|
1095
|
+
(and (check-type a &number -inf.0 +inf.0)
|
1096
|
+
(check-type b &number -inf.0 +inf.0)
|
1097
|
+
;; We only know that there will not be an exception if b is not
|
1098
|
+
;; zero.
|
1099
|
+
(not (<= (&min b) 0 (&max b)))))
|
1100
|
+
(define-type-checker (fdiv a b) #t)
|
1101
|
+
(define (div-result-range min-a max-a min-b max-b)
|
1102
|
+
(if (<= min-b 0 max-b)
|
1103
|
+
;; If the range of the divisor crosses 0, the result spans
|
1104
|
+
;; the whole range.
|
1105
|
+
(values -inf.0 +inf.0)
|
1106
|
+
;; Otherwise min-b and max-b have the same sign, and cannot both
|
1107
|
+
;; be infinity.
|
1108
|
+
(let ((--- (if (inf? min-b) 0 (floor/ min-a min-b)))
|
1109
|
+
(-+- (if (inf? max-b) 0 (floor/ min-a max-b)))
|
1110
|
+
(++- (if (inf? max-b) 0 (floor/ max-a max-b)))
|
1111
|
+
(+-- (if (inf? min-b) 0 (floor/ max-a min-b)))
|
1112
|
+
(--+ (if (inf? min-b) 0 (ceiling/ min-a min-b)))
|
1113
|
+
(-++ (if (inf? max-b) 0 (ceiling/ min-a max-b)))
|
1114
|
+
(+++ (if (inf? max-b) 0 (ceiling/ max-a max-b)))
|
1115
|
+
(+-+ (if (inf? min-b) 0 (ceiling/ max-a min-b))))
|
1116
|
+
(values (min (min --- -+- ++- +--)
|
1117
|
+
(min --+ -++ +++ +-+))
|
1118
|
+
(max (max --- -+- ++- +--)
|
1119
|
+
(max --+ -++ +++ +-+))))))
|
1120
|
+
(define-type-inferrer (div a b result)
|
1121
|
+
(let ((min-a (&min a)) (max-a (&max a))
|
1122
|
+
(min-b (&min b)) (max-b (&max b)))
|
1123
|
+
(call-with-values (lambda ()
|
1124
|
+
(div-result-range min-a max-a min-b max-b))
|
1125
|
+
(lambda (min max)
|
1126
|
+
(define-binary-result! a b result #f min max)))))
|
1127
|
+
(define-type-inferrer (fdiv a b result)
|
1128
|
+
(let ((min-a (&min a)) (max-a (&max a))
|
1129
|
+
(min-b (&min b)) (max-b (&max b)))
|
1130
|
+
(call-with-values (lambda ()
|
1131
|
+
(div-result-range min-a max-a min-b max-b))
|
1132
|
+
(lambda (min max)
|
1133
|
+
(define! result &f64 min max)))))
|
1134
|
+
|
1135
|
+
(define-type-checker (quo a b)
|
1136
|
+
(and (check-type a &exact-integer -inf.0 +inf.0)
|
1137
|
+
(check-type b &exact-integer -inf.0 +inf.0)
|
1138
|
+
;; We only know that there will not be an exception if b is not
|
1139
|
+
;; zero.
|
1140
|
+
(not (<= (&min b) 0 (&max b)))))
|
1141
|
+
(define-type-inferrer (quo a b result)
|
1142
|
+
(restrict! a &exact-integer -inf.0 +inf.0)
|
1143
|
+
(restrict! b &exact-integer -inf.0 +inf.0)
|
1144
|
+
(define! result &exact-integer -inf.0 +inf.0))
|
1145
|
+
|
1146
|
+
(define-type-checker-aliases quo rem)
|
1147
|
+
(define-type-inferrer (rem a b result)
|
1148
|
+
(restrict! a &exact-integer -inf.0 +inf.0)
|
1149
|
+
(restrict! b &exact-integer -inf.0 +inf.0)
|
1150
|
+
;; Same sign as A.
|
1151
|
+
(let ((max-abs-rem (1- (max (abs (&min b)) (abs (&max b))))))
|
1152
|
+
(cond
|
1153
|
+
((< (&min a) 0)
|
1154
|
+
(if (< 0 (&max a))
|
1155
|
+
(define! result &exact-integer (- max-abs-rem) max-abs-rem)
|
1156
|
+
(define! result &exact-integer (- max-abs-rem) 0)))
|
1157
|
+
(else
|
1158
|
+
(define! result &exact-integer 0 max-abs-rem)))))
|
1159
|
+
|
1160
|
+
(define-type-checker-aliases quo mod)
|
1161
|
+
(define-type-inferrer (mod a b result)
|
1162
|
+
(restrict! a &exact-integer -inf.0 +inf.0)
|
1163
|
+
(restrict! b &exact-integer -inf.0 +inf.0)
|
1164
|
+
;; Same sign as B.
|
1165
|
+
(let ((max-abs-mod (1- (max (abs (&min b)) (abs (&max b))))))
|
1166
|
+
(cond
|
1167
|
+
((< (&min b) 0)
|
1168
|
+
(if (< 0 (&max b))
|
1169
|
+
(define! result &exact-integer (- max-abs-mod) max-abs-mod)
|
1170
|
+
(define! result &exact-integer (- max-abs-mod) 0)))
|
1171
|
+
(else
|
1172
|
+
(define! result &exact-integer 0 max-abs-mod)))))
|
1173
|
+
|
1174
|
+
;; Predicates.
|
1175
|
+
(define-syntax-rule (define-number-kind-predicate-inferrer name type)
|
1176
|
+
(define-type-inferrer (name val result)
|
1177
|
+
(cond
|
1178
|
+
((zero? (logand (&type val) type))
|
1179
|
+
(define! result &false 0 0))
|
1180
|
+
((zero? (logand (&type val) (lognot type)))
|
1181
|
+
(define! result &true 0 0))
|
1182
|
+
(else
|
1183
|
+
(define! result (logior &true &false) 0 0)))))
|
1184
|
+
(define-number-kind-predicate-inferrer complex? &number)
|
1185
|
+
(define-number-kind-predicate-inferrer real? &real)
|
1186
|
+
(define-number-kind-predicate-inferrer rational?
|
1187
|
+
(logior &exact-integer &fraction))
|
1188
|
+
(define-number-kind-predicate-inferrer integer?
|
1189
|
+
(logior &exact-integer &flonum))
|
1190
|
+
(define-number-kind-predicate-inferrer exact-integer?
|
1191
|
+
&exact-integer)
|
1192
|
+
|
1193
|
+
(define-simple-type-checker (exact? &number))
|
1194
|
+
(define-type-inferrer (exact? val result)
|
1195
|
+
(restrict! val &number -inf.0 +inf.0)
|
1196
|
+
(cond
|
1197
|
+
((zero? (logand (&type val) (logior &exact-integer &fraction)))
|
1198
|
+
(define! result &false 0 0))
|
1199
|
+
((zero? (logand (&type val) (lognot (logior &exact-integer &fraction))))
|
1200
|
+
(define! result &true 0 0))
|
1201
|
+
(else
|
1202
|
+
(define! result (logior &true &false) 0 0))))
|
1203
|
+
|
1204
|
+
(define-simple-type-checker (inexact? &number))
|
1205
|
+
(define-type-inferrer (inexact? val result)
|
1206
|
+
(restrict! val &number -inf.0 +inf.0)
|
1207
|
+
(cond
|
1208
|
+
((zero? (logand (&type val) (logior &flonum &complex)))
|
1209
|
+
(define! result &false 0 0))
|
1210
|
+
((zero? (logand (&type val) (logand &number
|
1211
|
+
(lognot (logior &flonum &complex)))))
|
1212
|
+
(define! result &true 0 0))
|
1213
|
+
(else
|
1214
|
+
(define! result (logior &true &false) 0 0))))
|
1215
|
+
|
1216
|
+
(define-simple-type-checker (inf? &real))
|
1217
|
+
(define-type-inferrer (inf? val result)
|
1218
|
+
(restrict! val &real -inf.0 +inf.0)
|
1219
|
+
(cond
|
1220
|
+
((or (zero? (logand (&type val) (logior &flonum &complex)))
|
1221
|
+
(and (not (inf? (&min val))) (not (inf? (&max val)))))
|
1222
|
+
(define! result &false 0 0))
|
1223
|
+
(else
|
1224
|
+
(define! result (logior &true &false) 0 0))))
|
1225
|
+
|
1226
|
+
(define-type-aliases inf? nan?)
|
1227
|
+
|
1228
|
+
(define-simple-type (even? &exact-integer)
|
1229
|
+
((logior &true &false) 0 0))
|
1230
|
+
(define-type-aliases even? odd?)
|
1231
|
+
|
1232
|
+
;; Bit operations.
|
1233
|
+
(define-simple-type-checker (ash &exact-integer &exact-integer))
|
1234
|
+
(define-type-inferrer (ash val count result)
|
1235
|
+
(define (ash* val count)
|
1236
|
+
;; As we only precisely represent a 64-bit range, don't bother inferring
|
1237
|
+
;; shifts that might exceed that range.
|
1238
|
+
(cond
|
1239
|
+
((inf? val) val) ; Preserves sign.
|
1240
|
+
((< -64 count 64) (ash val count))
|
1241
|
+
((zero? val) 0)
|
1242
|
+
((positive? val) +inf.0)
|
1243
|
+
(else -inf.0)))
|
1244
|
+
(restrict! val &exact-integer -inf.0 +inf.0)
|
1245
|
+
(restrict! count &exact-integer -inf.0 +inf.0)
|
1246
|
+
(let ((-- (ash* (&min val) (&min count)))
|
1247
|
+
(-+ (ash* (&min val) (&max count)))
|
1248
|
+
(++ (ash* (&max val) (&max count)))
|
1249
|
+
(+- (ash* (&max val) (&min count))))
|
1250
|
+
(define! result &exact-integer
|
1251
|
+
(min -- -+ ++ +-)
|
1252
|
+
(max -- -+ ++ +-))))
|
1253
|
+
|
1254
|
+
(define-simple-type-checker (ursh &u64 &u64))
|
1255
|
+
(define-type-inferrer (ursh a b result)
|
1256
|
+
(restrict! a &u64 0 &u64-max)
|
1257
|
+
(restrict! b &u64 0 &u64-max)
|
1258
|
+
(define! result &u64
|
1259
|
+
(ash (&min/0 a) (- (&max/u64 b)))
|
1260
|
+
(ash (&max/u64 a) (- (&min/0 b)))))
|
1261
|
+
(define-type-aliases ursh ursh/immediate)
|
1262
|
+
|
1263
|
+
(define-simple-type-checker (ulsh &u64 &u64))
|
1264
|
+
(define-type-inferrer (ulsh a b result)
|
1265
|
+
(restrict! a &u64 0 &u64-max)
|
1266
|
+
(restrict! b &u64 0 &u64-max)
|
1267
|
+
(if (and (< (&max/u64 b) 64)
|
1268
|
+
(<= (ash (&max/u64 a) (&max/u64 b)) &u64-max))
|
1269
|
+
;; No overflow; we can be precise.
|
1270
|
+
(define! result &u64
|
1271
|
+
(ash (&min/0 a) (&min/0 b))
|
1272
|
+
(ash (&max/u64 a) (&max/u64 b)))
|
1273
|
+
;; Otherwise assume the whole range.
|
1274
|
+
(define! result &u64 0 &u64-max)))
|
1275
|
+
(define-type-aliases ulsh ulsh/immediate)
|
1276
|
+
|
1277
|
+
(define-inlinable (non-negative? n)
|
1278
|
+
"Return true if N is non-negative, otherwise return false."
|
1279
|
+
(not (negative? n)))
|
1280
|
+
|
1281
|
+
;; Like 'lognot', but handles infinities.
|
1282
|
+
(define-inlinable (lognot* n)
|
1283
|
+
"Return the bitwise complement of N. If N is infinite, return -N."
|
1284
|
+
(- -1 n))
|
1285
|
+
|
1286
|
+
(define saturate+
|
1287
|
+
(case-lambda
|
1288
|
+
"Let N be the least upper bound of the integer lengths of the
|
1289
|
+
arguments. Return the greatest integer whose integer length is N.
|
1290
|
+
If any of the arguments are infinite, return positive infinity."
|
1291
|
+
((a b)
|
1292
|
+
(if (or (inf? a) (inf? b))
|
1293
|
+
+inf.0
|
1294
|
+
(1- (ash 1 (max (integer-length a)
|
1295
|
+
(integer-length b))))))
|
1296
|
+
((a b c)
|
1297
|
+
(saturate+ (saturate+ a b) c))
|
1298
|
+
((a b c d)
|
1299
|
+
(saturate+ (saturate+ a b) c d))))
|
1300
|
+
|
1301
|
+
(define saturate-
|
1302
|
+
(case-lambda
|
1303
|
+
"Let N be the least upper bound of the integer lengths of the
|
1304
|
+
arguments. Return the least integer whose integer length is N.
|
1305
|
+
If any of the arguments are infinite, return negative infinity."
|
1306
|
+
((a b) (lognot* (saturate+ a b)))
|
1307
|
+
((a b c) (lognot* (saturate+ a b c)))
|
1308
|
+
((a b c d) (lognot* (saturate+ a b c d)))))
|
1309
|
+
|
1310
|
+
(define (logand-bounds a0 a1 b0 b1)
|
1311
|
+
"Return two values: lower and upper bounds for (logand A B)
|
1312
|
+
where (A0 <= A <= A1) and (B0 <= B <= B1)."
|
1313
|
+
;; For each argument, we consider three cases: (1) the argument is
|
1314
|
+
;; non-negative, (2) its sign is unknown, or (3) it is negative.
|
1315
|
+
;; To handle both arguments, we must consider a total of 9 cases:
|
1316
|
+
;;
|
1317
|
+
;; -----------------------------------------------------------------------
|
1318
|
+
;; LOGAND | non-negative B | unknown-sign B | negative B
|
1319
|
+
;; -----------------------------------------------------------------------
|
1320
|
+
;; non-negative A | 0 .. (min A1 B1) | 0 .. A1 | 0 .. A1
|
1321
|
+
;; -----------------------------------------------------------------------
|
1322
|
+
;; unknown-sign A | 0 .. B1 | (sat- A0 B0) | (sat- A0 B0)
|
1323
|
+
;; | | .. | .. A1
|
1324
|
+
;; | | (sat+ A1 B1) |
|
1325
|
+
;; -----------------------------------------------------------------------
|
1326
|
+
;; negative A | 0 .. B1 | (sat- A0 B0) | (sat- A0 B0)
|
1327
|
+
;; | | .. B1 | .. (min A1 B1)
|
1328
|
+
;; -----------------------------------------------------------------------
|
1329
|
+
(values (if (or (non-negative? a0) (non-negative? b0))
|
1330
|
+
0
|
1331
|
+
(saturate- a0 b0))
|
1332
|
+
(cond ((or (and (non-negative? a0) (non-negative? b0))
|
1333
|
+
(and (negative? a1) (negative? b1)))
|
1334
|
+
(min a1 b1))
|
1335
|
+
((or (non-negative? a0) (negative? b1))
|
1336
|
+
a1)
|
1337
|
+
((or (non-negative? b0) (negative? a1))
|
1338
|
+
b1)
|
1339
|
+
(else
|
1340
|
+
(saturate+ a1 b1)))))
|
1341
|
+
|
1342
|
+
(define-simple-type-checker (logand &exact-integer &exact-integer))
|
1343
|
+
(define-type-inferrer (logand a b result)
|
1344
|
+
(restrict! a &exact-integer -inf.0 +inf.0)
|
1345
|
+
(restrict! b &exact-integer -inf.0 +inf.0)
|
1346
|
+
(call-with-values (lambda ()
|
1347
|
+
(logand-bounds (&min a) (&max a) (&min b) (&max b)))
|
1348
|
+
(lambda (min max)
|
1349
|
+
(define! result &exact-integer min max))))
|
1350
|
+
|
1351
|
+
(define-simple-type-checker (ulogand &u64 &u64))
|
1352
|
+
(define-type-inferrer (ulogand a b result)
|
1353
|
+
(restrict! a &u64 0 &u64-max)
|
1354
|
+
(restrict! b &u64 0 &u64-max)
|
1355
|
+
(define! result &u64 0 (min (&max/u64 a) (&max/u64 b))))
|
1356
|
+
|
1357
|
+
(define (logsub-bounds a0 a1 b0 b1)
|
1358
|
+
"Return two values: lower and upper bounds for (logsub A B),
|
1359
|
+
i.e. (logand A (lognot B)), where (A0 <= A <= A1) and (B0 <= B <= B1)."
|
1360
|
+
;; Here we use 'logand-bounds' to compute the bounds, after
|
1361
|
+
;; computing the bounds of (lognot B) from the bounds of B.
|
1362
|
+
;; From (B0 <= B <= B1) it follows that (~B1 <= ~B <= ~B0),
|
1363
|
+
;; where ~X means (lognot X).
|
1364
|
+
(logand-bounds a0 a1 (lognot* b1) (lognot* b0)))
|
1365
|
+
|
1366
|
+
(define-simple-type-checker (logsub &exact-integer &exact-integer))
|
1367
|
+
(define-type-inferrer (logsub a b result)
|
1368
|
+
(restrict! a &exact-integer -inf.0 +inf.0)
|
1369
|
+
(restrict! b &exact-integer -inf.0 +inf.0)
|
1370
|
+
(call-with-values (lambda ()
|
1371
|
+
(logsub-bounds (&min a) (&max a) (&min b) (&max b)))
|
1372
|
+
(lambda (min max)
|
1373
|
+
(define! result &exact-integer min max))))
|
1374
|
+
|
1375
|
+
(define-simple-type-checker (ulogsub &u64 &u64))
|
1376
|
+
(define-type-inferrer (ulogsub a b result)
|
1377
|
+
(restrict! a &u64 0 &u64-max)
|
1378
|
+
(restrict! b &u64 0 &u64-max)
|
1379
|
+
(define! result &u64 0 (&max/u64 a)))
|
1380
|
+
|
1381
|
+
(define (logior-bounds a0 a1 b0 b1)
|
1382
|
+
"Return two values: lower and upper bounds for (logior A B)
|
1383
|
+
where (A0 <= A <= A1) and (B0 <= B <= B1)."
|
1384
|
+
;; For each argument, we consider three cases: (1) the argument is
|
1385
|
+
;; non-negative, (2) its sign is unknown, or (3) it is negative.
|
1386
|
+
;; To handle both arguments, we must consider a total of 9 cases.
|
1387
|
+
;;
|
1388
|
+
;; ---------------------------------------------------------------------
|
1389
|
+
;; LOGIOR | non-negative B | unknown-sign B | negative B
|
1390
|
+
;; ---------------------------------------------------------------------
|
1391
|
+
;; non-negative A | (max A0 B0) | B0 | B0 .. -1
|
1392
|
+
;; | .. | .. |
|
1393
|
+
;; | (sat+ A1 B1) | (sat+ A1 B1) |
|
1394
|
+
;; ---------------------------------------------------------------------
|
1395
|
+
;; unknown-sign A | A0 | (sat- A0 B0) | B0 .. -1
|
1396
|
+
;; | .. | .. |
|
1397
|
+
;; | (sat+ A1 B1) | (sat+ A1 B1) |
|
1398
|
+
;; ---------------------------------------------------------------------
|
1399
|
+
;; negative A | A0 .. -1 | A0 .. -1 | (max A0 B0) .. -1
|
1400
|
+
;; ---------------------------------------------------------------------
|
1401
|
+
(values (cond ((or (and (non-negative? a0) (non-negative? b0))
|
1402
|
+
(and (negative? a1) (negative? b1)))
|
1403
|
+
(max a0 b0))
|
1404
|
+
((or (non-negative? a0) (negative? b1))
|
1405
|
+
b0)
|
1406
|
+
((or (non-negative? b0) (negative? a1))
|
1407
|
+
a0)
|
1408
|
+
(else
|
1409
|
+
(saturate- a0 b0)))
|
1410
|
+
(if (or (negative? a1) (negative? b1))
|
1411
|
+
-1
|
1412
|
+
(saturate+ a1 b1))))
|
1413
|
+
|
1414
|
+
(define-simple-type-checker (logior &exact-integer &exact-integer))
|
1415
|
+
(define-type-inferrer (logior a b result)
|
1416
|
+
(restrict! a &exact-integer -inf.0 +inf.0)
|
1417
|
+
(restrict! b &exact-integer -inf.0 +inf.0)
|
1418
|
+
(call-with-values (lambda ()
|
1419
|
+
(logior-bounds (&min a) (&max a) (&min b) (&max b)))
|
1420
|
+
(lambda (min max)
|
1421
|
+
(define! result &exact-integer min max))))
|
1422
|
+
|
1423
|
+
(define-simple-type-checker (ulogior &u64 &u64))
|
1424
|
+
(define-type-inferrer (ulogior a b result)
|
1425
|
+
(restrict! a &u64 0 &u64-max)
|
1426
|
+
(restrict! b &u64 0 &u64-max)
|
1427
|
+
(define! result &u64
|
1428
|
+
(max (&min/0 a) (&min/0 b))
|
1429
|
+
(saturate+ (&max/u64 a) (&max/u64 b))))
|
1430
|
+
|
1431
|
+
(define (logxor-bounds a0 a1 b0 b1)
|
1432
|
+
"Return two values: lower and upper bounds for (logxor A B)
|
1433
|
+
where (A0 <= A <= A1) and (B0 <= B <= B1)."
|
1434
|
+
;; For each argument, we consider three cases: (1) the argument is
|
1435
|
+
;; non-negative, (2) its sign is unknown, or (3) it is negative.
|
1436
|
+
;; To handle both arguments, we must consider a total of 9 cases.
|
1437
|
+
;;
|
1438
|
+
;; --------------------------------------------------------------------
|
1439
|
+
;; LOGXOR | non-negative B | unknown-sign B | negative B
|
1440
|
+
;; --------------------------------------------------------------------
|
1441
|
+
;; non-negative A | 0 | (sat- A1 B0) | (sat- A1 B0)
|
1442
|
+
;; | .. | .. | ..
|
1443
|
+
;; | (sat+ A1 B1) | (sat+ A1 B1) | -1
|
1444
|
+
;; --------------------------------------------------------------------
|
1445
|
+
;; unknown-sign A | (sat- A0 B1) | (sat- A0 B1 A1 B0) | (sat- A1 B0)
|
1446
|
+
;; | .. | .. | ..
|
1447
|
+
;; | (sat+ A1 B1) | (sat+ A1 B1 A0 B0) | (sat+ A0 B0)
|
1448
|
+
;; --------------------------------------------------------------------
|
1449
|
+
;; negative A | (sat- A0 B1) | (sat- A0 B1) | 0
|
1450
|
+
;; | .. | .. | ..
|
1451
|
+
;; | -1 | (sat+ A0 B0) | (sat+ A0 B0)
|
1452
|
+
;; --------------------------------------------------------------------
|
1453
|
+
(values (cond ((or (and (non-negative? a0) (non-negative? b0))
|
1454
|
+
(and (negative? a1) (negative? b1)))
|
1455
|
+
0)
|
1456
|
+
((or (non-negative? a0) (negative? b1))
|
1457
|
+
(saturate- a1 b0))
|
1458
|
+
((or (non-negative? b0) (negative? a1))
|
1459
|
+
(saturate- a0 b1))
|
1460
|
+
(else
|
1461
|
+
(saturate- a0 b1 a1 b0)))
|
1462
|
+
(cond ((or (and (non-negative? a0) (negative? b1))
|
1463
|
+
(and (non-negative? b0) (negative? a1)))
|
1464
|
+
-1)
|
1465
|
+
((or (non-negative? a0) (non-negative? b0))
|
1466
|
+
(saturate+ a1 b1))
|
1467
|
+
((or (negative? a1) (negative? b1))
|
1468
|
+
(saturate+ a0 b0))
|
1469
|
+
(else
|
1470
|
+
(saturate+ a1 b1 a0 b0)))))
|
1471
|
+
|
1472
|
+
(define-simple-type-checker (logxor &exact-integer &exact-integer))
|
1473
|
+
(define-type-inferrer (logxor a b result)
|
1474
|
+
(restrict! a &exact-integer -inf.0 +inf.0)
|
1475
|
+
(restrict! b &exact-integer -inf.0 +inf.0)
|
1476
|
+
(call-with-values (lambda ()
|
1477
|
+
(logxor-bounds (&min a) (&max a) (&min b) (&max b)))
|
1478
|
+
(lambda (min max)
|
1479
|
+
(define! result &exact-integer min max))))
|
1480
|
+
|
1481
|
+
(define-simple-type-checker (ulogxor &u64 &u64))
|
1482
|
+
(define-type-inferrer (ulogxor a b result)
|
1483
|
+
(restrict! a &u64 0 &u64-max)
|
1484
|
+
(restrict! b &u64 0 &u64-max)
|
1485
|
+
(define! result &u64 0 (saturate+ (&max/u64 a) (&max/u64 b))))
|
1486
|
+
|
1487
|
+
(define-simple-type-checker (lognot &exact-integer))
|
1488
|
+
(define-type-inferrer (lognot a result)
|
1489
|
+
(restrict! a &exact-integer -inf.0 +inf.0)
|
1490
|
+
(define! result &exact-integer
|
1491
|
+
(lognot* (&max a))
|
1492
|
+
(lognot* (&min a))))
|
1493
|
+
|
1494
|
+
(define-simple-type-checker (logtest &exact-integer &exact-integer))
|
1495
|
+
(define-predicate-inferrer (logtest a b true?)
|
1496
|
+
(restrict! a &exact-integer -inf.0 +inf.0)
|
1497
|
+
(restrict! b &exact-integer -inf.0 +inf.0))
|
1498
|
+
|
1499
|
+
(define-simple-type-checker (logbit? (&exact-integer 0 +inf.0) &exact-integer))
|
1500
|
+
(define-type-inferrer (logbit? a b result)
|
1501
|
+
(let ((a-min (&min a))
|
1502
|
+
(a-max (&max a))
|
1503
|
+
(b-min (&min b))
|
1504
|
+
(b-max (&max b)))
|
1505
|
+
(if (and (eqv? a-min a-max) (>= a-min 0) (not (inf? a-min))
|
1506
|
+
(eqv? b-min b-max) (>= b-min 0) (not (inf? b-min)))
|
1507
|
+
(let ((type (if (logbit? a-min b-min) &true &false)))
|
1508
|
+
(define! result type 0 0))
|
1509
|
+
(define! result (logior &true &false) 0 0))))
|
1510
|
+
|
1511
|
+
;; Flonums.
|
1512
|
+
(define-simple-type-checker (sqrt &number))
|
1513
|
+
(define-type-inferrer (sqrt x result)
|
1514
|
+
(let ((type (&type x)))
|
1515
|
+
(cond
|
1516
|
+
((and (zero? (logand type &complex))
|
1517
|
+
(non-negative? (&min x)))
|
1518
|
+
(define! result
|
1519
|
+
(logior type &flonum)
|
1520
|
+
(exact-integer-sqrt (&min x))
|
1521
|
+
(if (inf? (&max x))
|
1522
|
+
+inf.0
|
1523
|
+
(call-with-values (lambda () (exact-integer-sqrt (&max x)))
|
1524
|
+
(lambda (s r)
|
1525
|
+
(if (zero? r) s (+ s 1)))))))
|
1526
|
+
(else
|
1527
|
+
(define! result (logior type &flonum &complex) -inf.0 +inf.0)))))
|
1528
|
+
|
1529
|
+
(define-simple-type-checker (abs &real))
|
1530
|
+
(define-type-inferrer (abs x result)
|
1531
|
+
(let ((type (&type x)))
|
1532
|
+
(cond
|
1533
|
+
((eqv? type (logand type &number))
|
1534
|
+
(restrict! x &real -inf.0 +inf.0)
|
1535
|
+
(define! result (logand type &real)
|
1536
|
+
(min (abs (&min x)) (abs (&max x)))
|
1537
|
+
(max (abs (&min x)) (abs (&max x)))))
|
1538
|
+
(else
|
1539
|
+
(define! result (logior (logand (&type x) (lognot &number))
|
1540
|
+
(logand (&type x) &real))
|
1541
|
+
(&min/0 x)
|
1542
|
+
(max (abs (&min x)) (abs (&max x))))))))
|
1543
|
+
|
1544
|
+
|
1545
|
+
|
1546
|
+
|
1547
|
+
;;;
|
1548
|
+
;;; Characters.
|
1549
|
+
;;;
|
1550
|
+
|
1551
|
+
(define-simple-type-checker (integer->char (&u64 0 *max-codepoint*)))
|
1552
|
+
(define-type-inferrer (integer->char i result)
|
1553
|
+
(restrict! i &u64 0 *max-codepoint*)
|
1554
|
+
(define! result &char (&min/0 i) (min (&max i) *max-codepoint*)))
|
1555
|
+
|
1556
|
+
(define-simple-type-checker (char->integer &char))
|
1557
|
+
(define-type-inferrer (char->integer c result)
|
1558
|
+
(restrict! c &char 0 *max-codepoint*)
|
1559
|
+
(define! result &u64 (&min/0 c) (min (&max c) *max-codepoint*)))
|
1560
|
+
|
1561
|
+
|
1562
|
+
|
1563
|
+
|
1564
|
+
;;;
|
1565
|
+
;;; Type flow analysis: the meet (ahem) of the algorithm.
|
1566
|
+
;;;
|
1567
|
+
|
1568
|
+
(define (successor-count cont)
|
1569
|
+
(match cont
|
1570
|
+
(($ $kargs _ _ ($ $continue k src exp))
|
1571
|
+
(match exp
|
1572
|
+
((or ($ $branch) ($ $prompt)) 2)
|
1573
|
+
(_ 1)))
|
1574
|
+
(($ $kfun src meta self tail clause) (if clause 1 0))
|
1575
|
+
(($ $kclause arity body alt) (if alt 2 1))
|
1576
|
+
(($ $kreceive) 1)
|
1577
|
+
(($ $ktail) 0)))
|
1578
|
+
|
1579
|
+
(define (intset-pop set)
|
1580
|
+
(match (intset-next set)
|
1581
|
+
(#f (values set #f))
|
1582
|
+
(i (values (intset-remove set i) i))))
|
1583
|
+
|
1584
|
+
(define-syntax-rule (make-worklist-folder* seed ...)
|
1585
|
+
(lambda (f worklist seed ...)
|
1586
|
+
(let lp ((worklist worklist) (seed seed) ...)
|
1587
|
+
(call-with-values (lambda () (intset-pop worklist))
|
1588
|
+
(lambda (worklist i)
|
1589
|
+
(if i
|
1590
|
+
(call-with-values (lambda () (f i seed ...))
|
1591
|
+
(lambda (i* seed ...)
|
1592
|
+
(let add ((i* i*) (worklist worklist))
|
1593
|
+
(match i*
|
1594
|
+
(() (lp worklist seed ...))
|
1595
|
+
((i . i*) (add i* (intset-add worklist i)))))))
|
1596
|
+
(values seed ...)))))))
|
1597
|
+
|
1598
|
+
(define worklist-fold*
|
1599
|
+
(case-lambda
|
1600
|
+
((f worklist seed)
|
1601
|
+
((make-worklist-folder* seed) f worklist seed))))
|
1602
|
+
|
1603
|
+
(define intmap-ensure
|
1604
|
+
(let* ((*absent* (list 'absent))
|
1605
|
+
(not-found (lambda (i) *absent*)))
|
1606
|
+
(lambda (map i ensure)
|
1607
|
+
(let ((val (intmap-ref map i not-found)))
|
1608
|
+
(if (eq? val *absent*)
|
1609
|
+
(let ((val (ensure i)))
|
1610
|
+
(values (intmap-add map i val) val))
|
1611
|
+
(values map val))))))
|
1612
|
+
|
1613
|
+
;; For best results, the labels in the function starting should be
|
1614
|
+
;; topologically sorted (renumbered). Otherwise the backward branch
|
1615
|
+
;; detection mentioned in the module commentary will trigger for
|
1616
|
+
;; ordinary forward branches.
|
1617
|
+
(define (infer-types conts kfun)
|
1618
|
+
"Compute types for all variables bound in the function labelled
|
1619
|
+
@var{kfun}, from @var{conts}. Returns an intmap mapping labels to type
|
1620
|
+
entries.
|
1621
|
+
|
1622
|
+
A type entry is a vector that describes the types of the values that
|
1623
|
+
flow into and out of a labelled expression. The first slot in the type
|
1624
|
+
entry vector corresponds to the types that flow in, and the rest of the
|
1625
|
+
slots correspond to the types that flow out. Each element of the type
|
1626
|
+
entry vector is an intmap mapping variable name to the variable's
|
1627
|
+
inferred type. An inferred type is a 3-vector of type, minimum, and
|
1628
|
+
maximum, where type is a bitset as a fixnum."
|
1629
|
+
(define (get-entry typev label) (intmap-ref typev label))
|
1630
|
+
(define (entry-not-found label)
|
1631
|
+
(make-vector (1+ (successor-count (intmap-ref conts label))) #f))
|
1632
|
+
(define (ensure-entry typev label)
|
1633
|
+
(intmap-ensure typev label entry-not-found))
|
1634
|
+
|
1635
|
+
(define (compute-initial-state)
|
1636
|
+
(let ((entry (entry-not-found kfun)))
|
1637
|
+
;; Nothing flows in to the first label.
|
1638
|
+
(vector-set! entry 0 empty-intmap)
|
1639
|
+
(intmap-add empty-intmap kfun entry)))
|
1640
|
+
|
1641
|
+
(define (adjoin-vars types vars entry)
|
1642
|
+
(match vars
|
1643
|
+
(() types)
|
1644
|
+
((var . vars)
|
1645
|
+
(adjoin-vars (adjoin-var types var entry) vars entry))))
|
1646
|
+
|
1647
|
+
(define (infer-primcall types succ name args result)
|
1648
|
+
(cond
|
1649
|
+
((hashq-ref *type-inferrers* name)
|
1650
|
+
=> (lambda (inferrer)
|
1651
|
+
;; FIXME: remove the apply?
|
1652
|
+
;; (pk 'primcall name args result)
|
1653
|
+
(apply inferrer types succ
|
1654
|
+
(if result
|
1655
|
+
(append args (list result))
|
1656
|
+
args))))
|
1657
|
+
(result
|
1658
|
+
(adjoin-var types result all-types-entry))
|
1659
|
+
(else
|
1660
|
+
types)))
|
1661
|
+
|
1662
|
+
(define (vector-replace vec idx val)
|
1663
|
+
(let ((vec (vector-copy vec)))
|
1664
|
+
(vector-set! vec idx val)
|
1665
|
+
vec))
|
1666
|
+
|
1667
|
+
(define (update-out-types label typev types succ-idx)
|
1668
|
+
(let* ((entry (get-entry typev label))
|
1669
|
+
(old-types (vector-ref entry (1+ succ-idx))))
|
1670
|
+
(if (eq? types old-types)
|
1671
|
+
(values typev #f)
|
1672
|
+
(let ((entry (vector-replace entry (1+ succ-idx) types))
|
1673
|
+
(first? (not old-types)))
|
1674
|
+
(values (intmap-replace typev label entry) first?)))))
|
1675
|
+
|
1676
|
+
(define (update-in-types label typev types saturate?)
|
1677
|
+
(let*-values (((typev entry) (ensure-entry typev label))
|
1678
|
+
((old-types) (vector-ref entry 0))
|
1679
|
+
;; TODO: If the label has only one predecessor, we can
|
1680
|
+
;; avoid the meet.
|
1681
|
+
((types) (if (not old-types)
|
1682
|
+
types
|
1683
|
+
(let ((meet (if saturate?
|
1684
|
+
type-entry-saturating-union
|
1685
|
+
type-entry-union)))
|
1686
|
+
(intmap-intersect old-types types meet)))))
|
1687
|
+
(if (eq? old-types types)
|
1688
|
+
(values typev #f)
|
1689
|
+
(let ((entry (vector-replace entry 0 types)))
|
1690
|
+
(values (intmap-replace typev label entry) #t)))))
|
1691
|
+
|
1692
|
+
(define (propagate-types label typev succ-idx succ-label types)
|
1693
|
+
(let*-values
|
1694
|
+
(((typev first?) (update-out-types label typev types succ-idx))
|
1695
|
+
((saturate?) (and (not first?) (<= succ-label label)))
|
1696
|
+
((typev changed?) (update-in-types succ-label typev types saturate?)))
|
1697
|
+
(values (if changed? (list succ-label) '()) typev)))
|
1698
|
+
|
1699
|
+
(define (visit-exp label typev k types exp)
|
1700
|
+
(define (propagate1 succ-label types)
|
1701
|
+
(propagate-types label typev 0 succ-label types))
|
1702
|
+
(define (propagate2 succ0-label types0 succ1-label types1)
|
1703
|
+
(let*-values (((changed0 typev)
|
1704
|
+
(propagate-types label typev 0 succ0-label types0))
|
1705
|
+
((changed1 typev)
|
1706
|
+
(propagate-types label typev 1 succ1-label types1)))
|
1707
|
+
(values (append changed0 changed1) typev)))
|
1708
|
+
;; Each of these branches must propagate to its successors.
|
1709
|
+
(match exp
|
1710
|
+
(($ $branch kt ($ $values (arg)))
|
1711
|
+
;; The "normal" continuation is the #f branch.
|
1712
|
+
(let ((kf-types (restrict-var types arg
|
1713
|
+
(make-type-entry (logior &false &nil)
|
1714
|
+
0
|
1715
|
+
0)))
|
1716
|
+
(kt-types (restrict-var types arg
|
1717
|
+
(make-type-entry
|
1718
|
+
(logand &all-types
|
1719
|
+
(lognot (logior &false &nil)))
|
1720
|
+
-inf.0 +inf.0))))
|
1721
|
+
(propagate2 k kf-types kt kt-types)))
|
1722
|
+
(($ $branch kt ($ $primcall name args))
|
1723
|
+
;; The "normal" continuation is the #f branch.
|
1724
|
+
(let ((kf-types (infer-primcall types 0 name args #f))
|
1725
|
+
(kt-types (infer-primcall types 1 name args #f)))
|
1726
|
+
(propagate2 k kf-types kt kt-types)))
|
1727
|
+
(($ $prompt escape? tag handler)
|
1728
|
+
;; The "normal" continuation enters the prompt.
|
1729
|
+
(propagate2 k types handler types))
|
1730
|
+
(($ $primcall name args)
|
1731
|
+
(propagate1 k
|
1732
|
+
(match (intmap-ref conts k)
|
1733
|
+
(($ $kargs _ defs)
|
1734
|
+
(infer-primcall types 0 name args
|
1735
|
+
(match defs ((var) var) (() #f))))
|
1736
|
+
(_
|
1737
|
+
;; (pk 'warning-no-restrictions name)
|
1738
|
+
types))))
|
1739
|
+
(($ $values args)
|
1740
|
+
(match (intmap-ref conts k)
|
1741
|
+
(($ $kargs _ defs)
|
1742
|
+
(let ((in types))
|
1743
|
+
(let lp ((defs defs) (args args) (out types))
|
1744
|
+
(match (cons defs args)
|
1745
|
+
((() . ())
|
1746
|
+
(propagate1 k out))
|
1747
|
+
(((def . defs) . (arg . args))
|
1748
|
+
(lp defs args
|
1749
|
+
(adjoin-var out def (var-type-entry in arg))))))))
|
1750
|
+
(_
|
1751
|
+
(propagate1 k types))))
|
1752
|
+
((or ($ $call) ($ $callk))
|
1753
|
+
(propagate1 k types))
|
1754
|
+
(($ $rec names vars funs)
|
1755
|
+
(let ((proc-type (make-type-entry &procedure -inf.0 +inf.0)))
|
1756
|
+
(propagate1 k (adjoin-vars types vars proc-type))))
|
1757
|
+
(_
|
1758
|
+
(match (intmap-ref conts k)
|
1759
|
+
(($ $kargs (_) (var))
|
1760
|
+
(let ((entry (match exp
|
1761
|
+
(($ $const val)
|
1762
|
+
(constant-type val))
|
1763
|
+
((or ($ $prim) ($ $fun) ($ $closure))
|
1764
|
+
;; Could be more precise here.
|
1765
|
+
(make-type-entry &procedure -inf.0 +inf.0)))))
|
1766
|
+
(propagate1 k (adjoin-var types var entry))))))))
|
1767
|
+
|
1768
|
+
(define (visit-cont label typev)
|
1769
|
+
(let ((types (vector-ref (intmap-ref typev label) 0)))
|
1770
|
+
(define (propagate0)
|
1771
|
+
(values '() typev))
|
1772
|
+
(define (propagate1 succ-label types)
|
1773
|
+
(propagate-types label typev 0 succ-label types))
|
1774
|
+
(define (propagate2 succ0-label types0 succ1-label types1)
|
1775
|
+
(let*-values (((changed0 typev)
|
1776
|
+
(propagate-types label typev 0 succ0-label types0))
|
1777
|
+
((changed1 typev)
|
1778
|
+
(propagate-types label typev 1 succ1-label types1)))
|
1779
|
+
(values (append changed0 changed1) typev)))
|
1780
|
+
|
1781
|
+
;; Add types for new definitions, and restrict types of
|
1782
|
+
;; existing variables due to side effects.
|
1783
|
+
(match (intmap-ref conts label)
|
1784
|
+
(($ $kargs names vars ($ $continue k src exp))
|
1785
|
+
(visit-exp label typev k types exp))
|
1786
|
+
(($ $kreceive arity k)
|
1787
|
+
(match (intmap-ref conts k)
|
1788
|
+
(($ $kargs names vars)
|
1789
|
+
(propagate1 k (adjoin-vars types vars all-types-entry)))))
|
1790
|
+
(($ $kfun src meta self tail clause)
|
1791
|
+
(if clause
|
1792
|
+
(propagate1 clause (adjoin-var types self all-types-entry))
|
1793
|
+
(propagate0)))
|
1794
|
+
(($ $kclause arity kbody kalt)
|
1795
|
+
(match (intmap-ref conts kbody)
|
1796
|
+
(($ $kargs _ defs)
|
1797
|
+
(let ((body-types (adjoin-vars types defs all-types-entry)))
|
1798
|
+
(if kalt
|
1799
|
+
(propagate2 kbody body-types kalt types)
|
1800
|
+
(propagate1 kbody body-types))))))
|
1801
|
+
(($ $ktail) (propagate0)))))
|
1802
|
+
|
1803
|
+
(worklist-fold* visit-cont
|
1804
|
+
(intset-add empty-intset kfun)
|
1805
|
+
(compute-initial-state)))
|
1806
|
+
|
1807
|
+
(define (lookup-pre-type types label def)
|
1808
|
+
(let* ((entry (intmap-ref types label))
|
1809
|
+
(tentry (var-type-entry (vector-ref entry 0) def)))
|
1810
|
+
(values (type-entry-type tentry)
|
1811
|
+
(type-entry-min tentry)
|
1812
|
+
(type-entry-max tentry))))
|
1813
|
+
|
1814
|
+
(define (lookup-post-type types label def succ-idx)
|
1815
|
+
(let* ((entry (intmap-ref types label))
|
1816
|
+
(tentry (var-type-entry (vector-ref entry (1+ succ-idx)) def)))
|
1817
|
+
(values (type-entry-type tentry)
|
1818
|
+
(type-entry-min tentry)
|
1819
|
+
(type-entry-max tentry))))
|
1820
|
+
|
1821
|
+
(define (primcall-types-check? types label name args)
|
1822
|
+
(match (hashq-ref *type-checkers* name)
|
1823
|
+
(#f #f)
|
1824
|
+
(checker
|
1825
|
+
(let ((entry (intmap-ref types label)))
|
1826
|
+
(apply checker (vector-ref entry 0) args)))))
|