From 892c62e1dc227e9e4c94788094e00955680c18d0 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Fri, 3 Jul 2015 09:39:59 -0700 Subject: [PATCH] factor: second stab at [ ] [ ] unit-test -> { } [ ] unit-test --- basis/alien/parser/parser-tests.factor | 14 +- .../prettyprint/prettyprint-tests.factor | 30 +- basis/bootstrap/image/image-tests.factor | 16 +- basis/byte-arrays/hex/hex-tests.factor | 4 +- basis/calendar/format/format-tests.factor | 52 +- .../format/macros/macros-tests.factor | 6 +- .../checksums/adler-32/adler-32-tests.factor | 4 +- basis/checksums/fnv1/fnv1-tests.factor | 56 +- basis/checksums/hmac/hmac-tests.factor | 26 +- .../interleave/interleave-tests.factor | 4 +- .../checksums/internet/internet-tests.factor | 10 +- basis/checksums/md5/md5-tests.factor | 30 +- basis/checksums/openssl/openssl-tests.factor | 10 +- basis/checksums/sha/sha-tests.factor | 32 +- .../bit-accessors/bit-accessors-tests.factor | 4 +- basis/classes/struct/struct-tests.factor | 210 +++--- basis/colors/constants/constants-tests.factor | 2 +- basis/colors/hex/hex-tests.factor | 10 +- basis/colors/hsv/hsv-tests.factor | 28 +- basis/combinators/random/random-tests.factor | 38 +- .../short-circuit/short-circuit-tests.factor | 36 +- .../short-circuit/smart/smart-tests.factor | 20 +- basis/combinators/smart/smart-tests.factor | 56 +- .../alias-analysis-tests.factor | 92 +-- .../branch-splitting-tests.factor | 8 +- .../compiler/cfg/builder/builder-tests.factor | 24 +- .../cfg/copy-prop/copy-prop-tests.factor | 12 +- basis/compiler/cfg/dce/dce-tests.factor | 22 +- .../compiler/cfg/def-use/def-use-tests.factor | 2 +- .../cfg/dominance/dominance-tests.factor | 34 +- .../cfg/gc-checks/gc-checks-tests.factor | 92 +-- .../cfg/intrinsics/simd/simd-tests.factor | 154 ++-- .../cfg/linear-scan/linear-scan-tests.factor | 94 +-- .../linear-scan/resolve/resolve-tests.factor | 34 +- .../cfg/liveness/liveness-tests.factor | 40 +- .../loop-detection-tests.factor | 8 +- .../parallel-copy/parallel-copy-tests.factor | 16 +- .../coalescing/coalescing-tests.factor | 8 +- .../representations-tests.factor | 154 ++-- .../save-contexts/save-contexts-tests.factor | 12 +- .../construction/construction-tests.factor | 34 +- .../ssa/construction/tdmsc/tdmsc-tests.factor | 20 +- .../interference/interference-tests.factor | 68 +- .../value-numbering-tests.factor | 668 ++++++++--------- .../write-barrier/write-barrier-tests.factor | 40 +- basis/compiler/codegen/codegen-tests.factor | 8 +- .../codegen/gc-maps/gc-maps-tests.factor | 6 +- basis/compiler/crossref/crossref-tests.factor | 2 +- .../tree/builder/builder-tests.factor | 2 +- .../tree/cleanup/cleanup-tests.factor | 172 ++--- .../tree/dead-code/dead-code-tests.factor | 110 +-- .../tree/def-use/def-use-tests.factor | 4 +- .../simplified/simplified-tests.factor | 6 +- .../escape-analysis/check/check-tests.factor | 8 +- .../escape-analysis-tests.factor | 96 +-- .../recursive/recursive-tests.factor | 10 +- .../modular-arithmetic-tests.factor | 112 +-- .../normalization/normalization-tests.factor | 20 +- .../call-effect/call-effect-tests.factor | 68 +- .../tree/propagation/copy/copy-tests.factor | 30 +- .../tree/propagation/info/info-tests.factor | 26 +- .../tree/propagation/propagation-tests.factor | 578 +++++++-------- .../recursive/recursive-tests.factor | 16 +- .../tree/recursive/recursive-tests.factor | 58 +- .../tuple-unboxing-tests.factor | 4 +- .../compression/inflate/inflate-tests.factor | 4 +- basis/compression/snappy/snappy-tests.factor | 10 +- basis/compression/zlib/zlib-tests.factor | 2 +- .../combinators/combinators-tests.factor | 16 +- .../count-downs/count-downs-tests.factor | 4 +- .../distributed/distributed-tests.factor | 2 +- .../exchangers/exchangers-tests.factor | 2 +- basis/concurrency/flags/flags-tests.factor | 12 +- .../concurrency/futures/futures-tests.factor | 8 +- basis/concurrency/locks/locks-tests.factor | 24 +- .../mailboxes/mailboxes-tests.factor | 8 +- .../messaging/messaging-tests.factor | 8 +- .../promises/promises-tests.factor | 2 +- .../arrays/arrays-tests.factor | 2 +- .../attributed-strings-tests.factor | 2 +- .../dictionaries/dictionaries-tests.factor | 4 +- .../strings/strings-tests.factor | 14 +- .../cpu/x86/assembler/assembler-tests.factor | 304 ++++---- basis/db/pools/pools-tests.factor | 8 +- basis/db/postgresql/postgresql-tests.factor | 28 +- basis/db/sqlite/sqlite-tests.factor | 26 +- basis/db/tester/tester-tests.factor | 4 +- .../documents/elements/elements-tests.factor | 68 +- basis/ftp/server/server-tests.factor | 2 +- basis/furnace/actions/actions-tests.factor | 4 +- .../auth/providers/assoc/assoc-tests.factor | 16 +- .../chloe-tags/chloe-tags-tests.factor | 8 +- basis/game/input/input-tests.factor | 16 +- .../hash-sets/identity/identity-tests.factor | 8 +- .../sequences/sequences-tests.factor | 8 +- .../hashtables/identity/identity-tests.factor | 12 +- .../sequences/sequences-tests.factor | 8 +- basis/help/apropos/apropos-tests.factor | 2 +- basis/help/crossref/crossref-tests.factor | 26 +- .../help/definitions/definitions-tests.factor | 2 +- basis/help/handbook/handbook-tests.factor | 8 +- basis/help/html/html-tests.factor | 26 +- basis/help/markup/markup-tests.factor | 46 +- basis/help/topics/topics-tests.factor | 12 +- basis/help/vocabs/vocabs-tests.factor | 6 +- basis/html/components/components-tests.factor | 94 +-- basis/html/forms/forms-tests.factor | 10 +- basis/html/streams/streams-tests.factor | 20 +- basis/html/templates/chloe/chloe-tests.factor | 70 +- basis/html/templates/fhtml/fhtml-tests.factor | 6 +- basis/http/client/client-tests.factor | 30 +- basis/http/parsers/parsers-tests.factor | 12 +- .../dispatchers/dispatchers-tests.factor | 4 +- .../server/requests/requests-tests.factor | 6 +- .../http/server/rewrite/rewrite-tests.factor | 12 +- basis/http/server/server-tests.factor | 20 +- basis/http/server/static/static-tests.factor | 2 +- basis/images/loader/gtk/gtk-tests.factor | 4 +- .../normalization/normalization-tests.factor | 48 +- .../tessellation/tessellation-tests.factor | 10 +- basis/io/backend/unix/unix-tests.factor | 20 +- basis/io/buffers/buffers-tests.factor | 20 +- basis/io/crlf/crlf-tests.factor | 18 +- basis/io/directories/directories-tests.factor | 88 +-- .../hierarchy/hierarchy-tests.factor | 6 +- .../io/directories/search/search-tests.factor | 10 +- basis/io/encodings/8-bit/8-bit-tests.factor | 14 +- basis/io/encodings/euc/euc-tests.factor | 26 +- .../io/encodings/gb18030/gb18030-tests.factor | 22 +- basis/io/encodings/iana/iana-tests.factor | 24 +- .../io/encodings/iso2022/iso2022-tests.factor | 48 +- basis/io/encodings/johab/johab-tests.factor | 10 +- .../shift-jis/shift-jis-tests.factor | 22 +- basis/io/encodings/strict/strict-tests.factor | 2 +- basis/io/encodings/string/string-tests.factor | 10 +- basis/io/encodings/utf32/utf32-tests.factor | 34 +- basis/io/encodings/utf7/utf7-tests.factor | 8 +- basis/io/files/info/info-tests.factor | 8 +- basis/io/files/links/unix/unix-tests.factor | 4 +- basis/io/files/unique/unique-tests.factor | 12 +- basis/io/files/unix/unix-tests.factor | 192 ++--- basis/io/launcher/unix/unix-tests.factor | 42 +- basis/io/mmap/mmap-tests.factor | 18 +- .../monitors/recursive/recursive-tests.factor | 16 +- basis/io/pipes/pipes-tests.factor | 16 +- basis/io/ports/ports-tests.factor | 14 +- basis/io/servers/servers-tests.factor | 14 +- basis/io/sockets/icmp/icmp-tests.factor | 2 +- basis/io/sockets/secure/secure-tests.factor | 6 +- .../io/sockets/secure/unix/unix-tests.factor | 24 +- basis/io/sockets/sockets-tests.factor | 120 +-- .../standard-paths/macosx/macosx-tests.factor | 2 +- basis/io/streams/duplex/duplex-tests.factor | 8 +- basis/io/streams/limited/limited-tests.factor | 50 +- basis/io/streams/string/string-tests.factor | 36 +- .../io/streams/throwing/throwing-tests.factor | 10 +- basis/json/writer/writer-tests.factor | 6 +- .../lists/lazy/examples/examples-tests.factor | 4 +- basis/lists/lazy/lazy-tests.factor | 20 +- basis/locals/backend/backend-tests.factor | 4 +- basis/macros/expander/expander-tests.factor | 8 +- basis/math/bits/bits-tests.factor | 28 +- basis/math/bitwise/bitwise-tests.factor | 94 +-- .../combinatorics/combinatorics-tests.factor | 120 +-- basis/math/complex/complex-tests.factor | 116 +-- basis/math/floats/half/half-tests.factor | 50 +- basis/math/functions/functions-tests.factor | 340 ++++----- basis/math/intervals/intervals-tests.factor | 206 +++--- .../elimination/elimination-tests.factor | 46 +- basis/math/matrices/matrices-tests.factor | 62 +- .../partial-dispatch-tests.factor | 50 +- .../math/polynomials/polynomials-tests.factor | 64 +- basis/math/primes/erato/erato-tests.factor | 10 +- .../lucas-lehmer/lucas-lehmer-tests.factor | 16 +- .../miller-rabin/miller-rabin-tests.factor | 14 +- basis/math/primes/primes-tests.factor | 18 +- basis/math/primes/safe/safe-tests.factor | 16 +- .../math/quaternions/quaternions-tests.factor | 46 +- basis/math/ranges/ranges-tests.factor | 34 +- basis/math/ratios/ratios-tests.factor | 168 ++--- .../positioning/positioning-tests.factor | 16 +- basis/math/rectangles/rectangles-tests.factor | 14 +- basis/math/statistics/statistics-tests.factor | 102 +-- .../conversion/conversion-tests.factor | 40 +- .../vectors/simd/cords/cords-tests.factor | 2 +- basis/math/vectors/simd/simd-tests.factor | 174 ++--- basis/math/vectors/vectors-tests.factor | 32 +- basis/mime/multipart/multipart-tests.factor | 18 +- basis/mime/types/types-tests.factor | 6 +- basis/models/arrow/arrow-tests.factor | 16 +- basis/models/arrow/smart/smart-tests.factor | 2 +- basis/models/mapping/mapping-tests.factor | 14 +- basis/models/product/product-tests.factor | 18 +- basis/models/range/range-tests.factor | 32 +- .../capabilities/capabilities-tests.factor | 6 +- basis/opengl/textures/textures-tests.factor | 4 +- .../openssl/libcrypto/libcrypto-tests.factor | 6 +- basis/openssl/libssl/libssl-tests.factor | 6 +- basis/peg/ebnf/ebnf-tests.factor | 8 +- basis/persistent/deques/deques-tests.factor | 28 +- .../hashtables/hashtables-tests.factor | 58 +- basis/persistent/heaps/heaps-tests.factor | 4 +- basis/persistent/vectors/vectors-tests.factor | 34 +- basis/random/dummy/dummy-tests.factor | 4 +- .../mersenne-twister-tests.factor | 16 +- basis/random/sfmt/sfmt-tests.factor | 14 +- basis/regexp/classes/classes-tests.factor | 90 +-- .../combinators/combinators-tests.factor | 26 +- basis/regexp/minimize/minimize-tests.factor | 30 +- basis/regexp/negation/negation-tests.factor | 4 +- .../complex-components-tests.factor | 12 +- basis/sequences/complex/complex-tests.factor | 14 +- basis/sequences/cords/cords-tests.factor | 2 +- basis/sequences/deep/deep-tests.factor | 28 +- .../generalizations-tests.factor | 44 +- basis/sequences/merged/merged-tests.factor | 26 +- basis/sequences/parser/parser-tests.factor | 52 +- basis/sequences/product/product-tests.factor | 14 +- .../sequences/unrolled/unrolled-tests.factor | 34 +- basis/sorting/human/human-tests.factor | 8 +- .../sorting/insertion/insertion-tests.factor | 2 +- basis/sorting/slots/slots-tests.factor | 26 +- basis/sorting/title/title-tests.factor | 4 +- .../monotonic/monotonic-tests.factor | 30 +- .../backend/backend-tests.factor | 18 +- .../transforms/transforms-tests.factor | 18 +- basis/strings/tables/tables-tests.factor | 10 +- .../annotations/annotations-tests.factor | 32 +- basis/tools/crossref/crossref-tests.factor | 20 +- basis/tools/deploy/deploy-tests.factor | 56 +- .../destructors/destructors-tests.factor | 6 +- basis/tools/errors/errors-tests.factor | 2 +- basis/tools/files/files-tests.factor | 4 +- basis/tools/hexdump/hexdump-tests.factor | 10 +- basis/tools/memory/memory-tests.factor | 14 +- .../profiler/sampling/sampling-tests.factor | 4 +- basis/tools/scaffold/scaffold-tests.factor | 6 +- basis/tools/test/test-tests.factor | 2 +- basis/tools/time/time-tests.factor | 2 +- basis/tools/trace/trace-tests.factor | 8 +- basis/tools/walker/walker-tests.factor | 66 +- .../ui/backend/cocoa/views/views-tests.factor | 2 +- .../baseline-alignment-tests.factor | 18 +- basis/ui/commands/commands-tests.factor | 8 +- basis/ui/gadgets/borders/borders-tests.factor | 22 +- basis/ui/gadgets/buttons/buttons-tests.factor | 10 +- basis/ui/gadgets/editors/editors-tests.factor | 30 +- basis/ui/gadgets/frames/frames-tests.factor | 8 +- basis/ui/gadgets/gadgets-tests.factor | 30 +- basis/ui/gadgets/glass/glass-tests.factor | 12 +- .../grid-lines/grid-lines-tests.factor | 16 +- basis/ui/gadgets/grids/grids-tests.factor | 52 +- basis/ui/gadgets/labeled/labeled-tests.factor | 2 +- basis/ui/gadgets/labels/labels-tests.factor | 2 +- basis/ui/gadgets/packs/packs-tests.factor | 60 +- basis/ui/gadgets/panes/panes-tests.factor | 54 +- .../paragraphs/paragraphs-tests.factor | 26 +- .../presentations/presentations-tests.factor | 4 +- .../gadgets/scrollers/scrollers-tests.factor | 36 +- .../search-tables/search-tables-tests.factor | 2 +- basis/ui/gadgets/slots/slots-tests.factor | 2 +- basis/ui/gadgets/tables/tables-tests.factor | 8 +- basis/ui/gadgets/tracks/tracks-tests.factor | 20 +- basis/ui/gadgets/worlds/worlds-tests.factor | 32 +- basis/ui/operations/operations-tests.factor | 8 +- basis/ui/pens/gradient/gradient-tests.factor | 4 +- basis/ui/text/text-tests.factor | 24 +- basis/ui/tools/browser/browser-tests.factor | 2 +- .../browser/history/history-tests.factor | 24 +- .../ui/tools/inspector/inspector-tests.factor | 2 +- .../listener/history/history-tests.factor | 84 +-- basis/ui/tools/listener/listener-tests.factor | 54 +- basis/ui/traverse/traverse-tests.factor | 22 +- basis/unicode/breaks/breaks-tests.factor | 20 +- basis/unicode/case/case-tests.factor | 16 +- .../categories/categories-tests.factor | 22 +- .../unicode/collation/collation-tests.factor | 12 +- .../unicode/normalize/normalize-tests.factor | 24 +- basis/unicode/script/script-tests.factor | 4 +- basis/unix/ffi/ffi-tests.factor | 6 +- basis/unix/groups/groups-tests.factor | 40 +- basis/unix/signals/signals-tests.factor | 2 +- basis/unix/users/users-tests.factor | 40 +- basis/urls/encoding/encoding-tests.factor | 46 +- basis/vocabs/files/files-tests.factor | 2 +- .../metadata/resources/resources-tests.factor | 8 +- .../prettyprint/prettyprint-tests.factor | 16 +- .../refresh/monitor/monitor-tests.factor | 6 +- basis/vocabs/refresh/refresh-tests.factor | 2 +- basis/wrap/strings/strings-tests.factor | 26 +- basis/wrap/words/words-tests.factor | 12 +- basis/xml/syntax/syntax-tests.factor | 62 +- basis/xml/traversal/traversal-tests.factor | 22 +- basis/xml/writer/writer-tests.factor | 24 +- basis/xmode/catalog/catalog-tests.factor | 4 +- basis/xmode/code2html/code2html-tests.factor | 10 +- .../keyword-map/keyword-map-tests.factor | 16 +- basis/xmode/marker/marker-tests.factor | 60 +- basis/xmode/rules/rules-tests.factor | 6 +- extra/99-bottles/99-bottles-tests.factor | 4 +- extra/alien/data/map/map-tests.factor | 30 +- extra/alien/handles/handles-tests.factor | 8 +- extra/annotations/annotations-tests.factor | 6 +- extra/arrays/shaped/shaped-tests.factor | 10 +- extra/asn1/asn1-tests.factor | 6 +- extra/assocs/extras/extras-tests.factor | 2 +- extra/backtrack/backtrack-tests.factor | 16 +- extra/bank/bank-tests.factor | 2 +- .../regex-dna/regex-dna-tests.factor | 2 +- .../reverse-complement-tests.factor | 2 +- .../bloom-filters/bloom-filters-tests.factor | 34 +- extra/boyer-moore/boyer-moore-tests.factor | 10 +- extra/bson/bson-tests.factor | 18 +- .../build-support/build-support-tests.factor | 2 +- extra/c/lexer/lexer-tests.factor | 46 +- .../c/preprocessor/preprocessor-tests.factor | 4 +- .../holidays/canada/canada-tests.factor | 2 +- extra/calendar/holidays/us/us-tests.factor | 2 +- extra/cgi/cgi-tests.factor | 10 +- .../struct/vectored/vectored-tests.factor | 18 +- .../change-tracking-tests.factor | 4 +- extra/code-arrays/code-arrays-tests.factor | 8 +- extra/combinators/extras/extras-tests.factor | 6 +- extra/compiler/cfg/gvn/gvn-tests.factor | 686 +++++++++--------- extra/compiler/graphviz/graphviz-tests.factor | 6 +- extra/constructors/constructors-tests.factor | 18 +- extra/contributors/contributors-tests.factor | 2 +- extra/crypto/aes/aes-tests.factor | 26 +- extra/crypto/barrett/barrett-tests.factor | 2 +- .../crypto/passwd-md5/passwd-md5-tests.factor | 4 +- extra/crypto/rsa/rsa-tests.factor | 8 +- extra/crypto/xor/xor-tests.factor | 12 +- extra/ctags/ctags-tests.factor | 10 +- extra/ctags/etags/etags-tests.factor | 18 +- extra/cuda/devices/devices-tests.factor | 16 +- extra/cuda/ptx/ptx-tests.factor | 264 +++---- extra/cursors/cursors-tests.factor | 26 +- extra/decimals/decimals-tests.factor | 28 +- extra/descriptive/descriptive-tests.factor | 16 +- extra/digraphs/digraphs-tests.factor | 2 +- extra/enigma/enigma-tests.factor | 6 +- extra/euler/b-rep/b-rep-tests.factor | 28 +- .../triangulation/triangulation-tests.factor | 14 +- extra/euler/modeling/modeling-tests.factor | 30 +- extra/euler/operators/operators-tests.factor | 36 +- extra/flip-text/flip-text-tests.factor | 8 +- .../models/half-edge/half-edge-tests.factor | 16 +- extra/game/models/util/util-tests.factor | 4 +- extra/gdbm/gdbm-tests.factor | 14 +- extra/gml/gml-tests.factor | 12 +- extra/gml/viewer/viewer-tests.factor | 4 +- extra/gpu/render/render-tests.factor | 44 +- extra/gpu/shaders/shaders-tests.factor | 4 +- extra/grid-meshes/grid-meshes-tests.factor | 4 +- extra/hash-sets/numbers/numbers-tests.factor | 8 +- extra/hashcash/hashcash-tests.factor | 8 +- extra/hashtables/numbers/numbers-tests.factor | 8 +- extra/html/elements/elements-tests.factor | 2 +- .../parser/analyzer/analyzer-tests.factor | 38 +- extra/html/parser/parser-tests.factor | 44 +- .../html/parser/printer/printer-tests.factor | 16 +- extra/html/parser/utils/utils-tests.factor | 20 +- extra/id3/id3-tests.factor | 14 +- extra/images/gif/gif-tests.factor | 20 +- extra/images/viewer/viewer-tests.factor | 10 +- extra/imap/imap-tests.factor | 14 +- extra/infix/infix-tests.factor | 74 +- extra/infix/parser/parser-tests.factor | 38 +- extra/infix/tokenizer/tokenizer-tests.factor | 20 +- extra/ini-file/ini-file-tests.factor | 44 +- extra/io/binary/fast/fast-tests.factor | 12 +- extra/io/encodings/detect/detect-tests.factor | 32 +- extra/io/streams/peek/peek-tests.factor | 30 +- extra/jamshred/oint/oint-tests.factor | 10 +- extra/jamshred/tunnel/tunnel-tests.factor | 26 +- extra/koszul/koszul-tests.factor | 24 +- extra/lint/lint-tests.factor | 4 +- extra/llvm/invoker/invoker-tests.factor | 2 +- extra/llvm/jit/jit-tests.factor | 2 +- extra/llvm/types/types-tests.factor | 56 +- extra/llvm/wrappers/wrappers-tests.factor | 6 +- .../rebalancing/rebalancing-tests.factor | 4 +- extra/mason/child/child-tests.factor | 12 +- extra/mason/common/common-tests.factor | 10 +- extra/mason/email/email-tests.factor | 2 +- extra/mason/platform/platform-tests.factor | 2 +- .../mason/release/branch/branch-tests.factor | 4 +- .../affine-transforms-tests.factor | 6 +- extra/math/analysis/analysis-tests.factor | 50 +- extra/math/approx/approx-tests.factor | 4 +- .../math/blas/matrices/matrices-tests.factor | 200 ++--- extra/math/blas/vectors/vectors-tests.factor | 140 ++-- .../math/combinators/combinators-tests.factor | 12 +- extra/math/compare/compare-tests.factor | 40 +- .../continued-fractions-tests.factor | 30 +- extra/math/dual/dual-tests.factor | 20 +- extra/math/extras/extras-tests.factor | 40 +- extra/math/factorials/factorials-tests.factor | 8 +- extra/math/finance/finance-tests.factor | 20 +- .../floating-point-tests.factor | 30 +- extra/math/matrices/simd/simd-tests.factor | 56 +- .../numerical-integration-tests.factor | 10 +- extra/math/text/english/english-tests.factor | 22 +- extra/math/text/french/french-tests.factor | 38 +- extra/math/text/utils/utils-tests.factor | 2 +- extra/math/transforms/haar/haar-tests.factor | 4 +- .../homogeneous/homogeneous-tests.factor | 18 +- extra/memcached/memcached-tests.factor | 38 +- extra/memory/piles/piles-tests.factor | 8 +- extra/memory/pools/pools-tests.factor | 6 +- .../method-chains/method-chains-tests.factor | 8 +- extra/models/history/history-tests.factor | 24 +- extra/monads/monads-tests.factor | 44 +- extra/money/money-tests.factor | 30 +- extra/morse/morse-tests.factor | 28 +- extra/msxml-to-csv/msxml-to-csv-tests.factor | 2 +- .../nested-comments-tests.factor | 12 +- extra/noise/noise-tests.factor | 2 +- extra/nurbs/nurbs-tests.factor | 16 +- extra/oauth/oauth-tests.factor | 8 +- extra/opencl/ffi/ffi-tests.factor | 2 +- extra/opencl/opencl-tests.factor | 2 +- extra/pair-methods/pair-methods-tests.factor | 16 +- extra/pair-rocket/pair-rocket-tests.factor | 8 +- extra/pairs/pairs-tests.factor | 30 +- .../partial-continuations-tests.factor | 2 +- extra/path-finding/path-finding-tests.factor | 22 +- extra/pcre/ffi/ffi-tests.factor | 2 +- extra/pcre/pcre-tests.factor | 72 +- extra/pdf/units/units-tests.factor | 12 +- extra/picomath/picomath-tests.factor | 12 +- extra/poker/poker-tests.factor | 36 +- extra/pop3/pop3-tests.factor | 38 +- extra/project-euler/001/001-tests.factor | 10 +- extra/project-euler/002/002-tests.factor | 6 +- extra/project-euler/003/003-tests.factor | 2 +- extra/project-euler/004/004-tests.factor | 2 +- extra/project-euler/005/005-tests.factor | 2 +- extra/project-euler/006/006-tests.factor | 2 +- extra/project-euler/007/007-tests.factor | 2 +- extra/project-euler/008/008-tests.factor | 2 +- extra/project-euler/009/009-tests.factor | 2 +- extra/project-euler/010/010-tests.factor | 2 +- extra/project-euler/011/011-tests.factor | 2 +- extra/project-euler/012/012-tests.factor | 2 +- extra/project-euler/013/013-tests.factor | 2 +- extra/project-euler/014/014-tests.factor | 4 +- extra/project-euler/015/015-tests.factor | 2 +- extra/project-euler/016/016-tests.factor | 2 +- extra/project-euler/017/017-tests.factor | 2 +- extra/project-euler/018/018-tests.factor | 4 +- extra/project-euler/019/019-tests.factor | 4 +- extra/project-euler/020/020-tests.factor | 2 +- extra/project-euler/021/021-tests.factor | 2 +- extra/project-euler/022/022-tests.factor | 2 +- extra/project-euler/023/023-tests.factor | 2 +- extra/project-euler/024/024-tests.factor | 2 +- extra/project-euler/025/025-tests.factor | 4 +- extra/project-euler/026/026-tests.factor | 2 +- extra/project-euler/027/027-tests.factor | 2 +- extra/project-euler/028/028-tests.factor | 2 +- extra/project-euler/029/029-tests.factor | 2 +- extra/project-euler/030/030-tests.factor | 2 +- extra/project-euler/031/031-tests.factor | 2 +- extra/project-euler/032/032-tests.factor | 4 +- extra/project-euler/033/033-tests.factor | 2 +- extra/project-euler/034/034-tests.factor | 2 +- extra/project-euler/035/035-tests.factor | 2 +- extra/project-euler/036/036-tests.factor | 2 +- extra/project-euler/037/037-tests.factor | 2 +- extra/project-euler/038/038-tests.factor | 2 +- extra/project-euler/039/039-tests.factor | 2 +- extra/project-euler/040/040-tests.factor | 2 +- extra/project-euler/041/041-tests.factor | 2 +- extra/project-euler/042/042-tests.factor | 4 +- extra/project-euler/043/043-tests.factor | 4 +- extra/project-euler/044/044-tests.factor | 2 +- extra/project-euler/045/045-tests.factor | 2 +- extra/project-euler/046/046-tests.factor | 2 +- extra/project-euler/047/047-tests.factor | 4 +- extra/project-euler/048/048-tests.factor | 2 +- extra/project-euler/049/049-tests.factor | 2 +- extra/project-euler/050/050-tests.factor | 6 +- extra/project-euler/051/051-tests.factor | 2 +- extra/project-euler/052/052-tests.factor | 2 +- extra/project-euler/053/053-tests.factor | 2 +- extra/project-euler/054/054-tests.factor | 2 +- extra/project-euler/055/055-tests.factor | 2 +- extra/project-euler/056/056-tests.factor | 2 +- extra/project-euler/059/059-tests.factor | 2 +- extra/project-euler/062/062-tests.factor | 2 +- extra/project-euler/065/065-tests.factor | 2 +- extra/project-euler/067/067-tests.factor | 4 +- extra/project-euler/070/070-tests.factor | 2 +- extra/project-euler/071/071-tests.factor | 2 +- extra/project-euler/072/072-tests.factor | 2 +- extra/project-euler/073/073-tests.factor | 2 +- extra/project-euler/074/074-tests.factor | 2 +- extra/project-euler/075/075-tests.factor | 2 +- extra/project-euler/076/076-tests.factor | 2 +- extra/project-euler/079/079-tests.factor | 2 +- extra/project-euler/081/081-tests.factor | 2 +- extra/project-euler/085/085-tests.factor | 2 +- extra/project-euler/089/089-tests.factor | 2 +- extra/project-euler/092/092-tests.factor | 2 +- extra/project-euler/097/097-tests.factor | 2 +- extra/project-euler/099/099-tests.factor | 4 +- extra/project-euler/100/100-tests.factor | 2 +- extra/project-euler/102/102-tests.factor | 2 +- extra/project-euler/112/112-tests.factor | 2 +- extra/project-euler/116/116-tests.factor | 2 +- extra/project-euler/117/117-tests.factor | 2 +- extra/project-euler/124/124-tests.factor | 2 +- extra/project-euler/134/134-tests.factor | 2 +- extra/project-euler/148/148-tests.factor | 2 +- extra/project-euler/150/150-tests.factor | 2 +- extra/project-euler/151/151-tests.factor | 2 +- extra/project-euler/164/164-tests.factor | 2 +- extra/project-euler/169/169-tests.factor | 2 +- extra/project-euler/173/173-tests.factor | 2 +- extra/project-euler/175/175-tests.factor | 2 +- extra/project-euler/188/188-tests.factor | 2 +- extra/project-euler/190/190-tests.factor | 2 +- extra/project-euler/203/203-tests.factor | 4 +- extra/project-euler/206/206-tests.factor | 2 +- extra/project-euler/215/215-tests.factor | 4 +- extra/project-euler/255/255-tests.factor | 2 +- extra/project-euler/265/265-tests.factor | 2 +- .../ave-time/ave-time-tests.factor | 2 +- .../project-euler/common/common-tests.factor | 24 +- extra/python/python-tests.factor | 2 +- extra/quadtrees/quadtrees-tests.factor | 40 +- extra/qw/qw-tests.factor | 2 +- .../blum-blum-shub-tests.factor | 8 +- extra/random/cmwc/cmwc-tests.factor | 8 +- .../lagged-fibonacci-tests.factor | 4 +- .../response-parser-tests.factor | 10 +- extra/robots/robots-tests.factor | 4 +- extra/roles/roles-tests.factor | 28 +- .../y-combinator/y-combinator-tests.factor | 6 +- extra/rpn/rpn-tests.factor | 2 +- extra/sequences/abbrev/abbrev-tests.factor | 12 +- extra/sequences/extras/extras-tests.factor | 32 +- .../inserters/inserters-tests.factor | 16 +- .../sequences/modified/modified-tests.factor | 20 +- extra/sequences/n-based/n-based-tests.factor | 18 +- .../repeating/repeating-tests.factor | 14 +- extra/sequences/squish/squish-tests.factor | 2 +- extra/site-watcher/site-watcher-tests.factor | 2 +- extra/slots/syntax/syntax-tests.factor | 14 +- .../smalltalk/compiler/compiler-tests.factor | 8 +- .../compiler/lexenv/lexenv-tests.factor | 10 +- .../compiler/return/return-tests.factor | 2 +- extra/smalltalk/eval/eval-tests.factor | 16 +- extra/smalltalk/parser/parser-tests.factor | 150 ++-- extra/smalltalk/printer/printer-tests.factor | 2 +- extra/spelling/spelling-tests.factor | 10 +- extra/sudoku/sudoku-tests.factor | 2 +- extra/svg/svg-tests.factor | 16 +- extra/synth/synth-tests.factor | 4 +- extra/taxes/usa/usa-tests.factor | 60 +- extra/tetris/board/board-tests.factor | 38 +- extra/tetris/game/game-tests.factor | 24 +- extra/tetris/piece/piece-tests.factor | 18 +- extra/tnetstrings/tnetstrings-tests.factor | 2 +- extra/trees/avl/avl-tests.factor | 48 +- extra/trees/trees-tests.factor | 24 +- extra/txon/txon-tests.factor | 42 +- extra/ui/gadgets/lists/lists-tests.factor | 2 +- extra/units/imperial/imperial-tests.factor | 24 +- extra/units/reduction/reduction-tests.factor | 76 +- extra/units/si/si-tests.factor | 10 +- extra/units/units-tests.factor | 22 +- extra/usa-cities/usa-cities-tests.factor | 2 +- extra/variants/variants-tests.factor | 18 +- .../mason/backend/backend-tests.factor | 2 +- extra/wordtimer/wordtimer-tests.factor | 2 +- extra/yahoo/yahoo-tests.factor | 6 +- extra/z-algorithm/z-algorithm-tests.factor | 14 +- 579 files changed, 7256 insertions(+), 7256 deletions(-) diff --git a/basis/alien/parser/parser-tests.factor b/basis/alien/parser/parser-tests.factor index aa0223e0af..83d71e80fb 100644 --- a/basis/alien/parser/parser-tests.factor +++ b/basis/alien/parser/parser-tests.factor @@ -38,32 +38,32 @@ CONSTANT: eleven 11 FUNCTION: void* alien-parser-function-effect-test ( int *arg1, float arg2 ) ; -[ ( arg1 arg2 -- void* ) ] [ +{ ( arg1 arg2 -- void* ) } [ \ alien-parser-function-effect-test "declared-effect" word-prop ] unit-test -[ t ] [ \ alien-parser-function-effect-test inline? ] unit-test +{ t } [ \ alien-parser-function-effect-test inline? ] unit-test FUNCTION-ALIAS: (alien-parser-function-effect-test) void* alien-parser-function-effect-test ( int *arg1, float arg2 ) ; -[ ( arg1 arg2 -- void* ) ] [ +{ ( arg1 arg2 -- void* ) } [ \ (alien-parser-function-effect-test) "declared-effect" word-prop ] unit-test -[ t ] [ \ (alien-parser-function-effect-test) inline? ] unit-test +{ t } [ \ (alien-parser-function-effect-test) inline? ] unit-test CALLBACK: void* alien-parser-callback-effect-test ( int *arg1 float arg2 ) ; -[ ( arg1 arg2 -- void* ) ] [ +{ ( arg1 arg2 -- void* ) } [ \ alien-parser-callback-effect-test "callback-effect" word-prop ] unit-test -[ t ] [ \ alien-parser-callback-effect-test inline? ] unit-test +{ t } [ \ alien-parser-callback-effect-test inline? ] unit-test ! Reported by mnestic TYPEDEF: int alien-parser-test-int ! reasonably unique name... -[ "OK!" ] [ +{ "OK!" } [ [ "USE: specialized-arrays SPECIALIZED-ARRAY: alien-parser-test-int" eval( -- ) ! after restart, we end up here diff --git a/basis/alien/prettyprint/prettyprint-tests.factor b/basis/alien/prettyprint/prettyprint-tests.factor index b3ca2f0e7f..1b2eca8014 100644 --- a/basis/alien/prettyprint/prettyprint-tests.factor +++ b/basis/alien/prettyprint/prettyprint-tests.factor @@ -7,67 +7,67 @@ CONSTANT: FOO 10 FUNCTION: int function_test ( float x, int[4][FOO] y, char* z, ushort *w ) ; -[ "USING: alien.c-types alien.syntax ; +{ "USING: alien.c-types alien.syntax ; IN: alien.prettyprint.tests FUNCTION: int function_test ( float x, int[4][FOO] y, char* z, ushort* w ) ; inline -" ] [ +" } [ [ \ function_test see ] with-string-writer ] unit-test FUNCTION-ALIAS: function-test int function_test ( float x, int[4][FOO] y, char* z, ushort *w ) ; -[ "USING: alien.c-types alien.syntax ; +{ "USING: alien.c-types alien.syntax ; IN: alien.prettyprint.tests FUNCTION-ALIAS: function-test int function_test ( float x, int[4][FOO] y, char* z, ushort* w ) ; inline -" ] [ +" } [ [ \ function-test see ] with-string-writer ] unit-test TYPEDEF: c-string[ascii] string-typedef TYPEDEF: char[1][2][3] array-typedef -[ "USING: alien.c-types alien.syntax ; +{ "USING: alien.c-types alien.syntax ; IN: alien.prettyprint.tests TYPEDEF: c-string[ascii] string-typedef -" ] [ +" } [ [ \ string-typedef see ] with-string-writer ] unit-test -[ "USING: alien.c-types alien.syntax ; +{ "USING: alien.c-types alien.syntax ; IN: alien.prettyprint.tests TYPEDEF: char[1][2][3] array-typedef -" ] [ +" } [ [ \ array-typedef see ] with-string-writer ] unit-test C-TYPE: opaque-c-type -[ "USING: alien.syntax ; +{ "USING: alien.syntax ; IN: alien.prettyprint.tests C-TYPE: opaque-c-type -" ] [ +" } [ [ \ opaque-c-type see ] with-string-writer ] unit-test TYPEDEF: pointer: int pint -[ "USING: alien.c-types alien.syntax ; +{ "USING: alien.c-types alien.syntax ; IN: alien.prettyprint.tests TYPEDEF: int* pint -" ] [ +" } [ [ \ pint see ] with-string-writer ] unit-test -[ "pointer: int" ] [ pointer: int unparse ] unit-test +{ "pointer: int" } [ pointer: int unparse ] unit-test CALLBACK: void callback-test ( int x, float[4] y ) ; -[ "USING: alien.c-types alien.syntax ; +{ "USING: alien.c-types alien.syntax ; IN: alien.prettyprint.tests CALLBACK: void callback-test ( int x, float[4] y ) ; -" ] [ +" } [ [ \ callback-test see ] with-string-writer ] unit-test diff --git a/basis/bootstrap/image/image-tests.factor b/basis/bootstrap/image/image-tests.factor index c5c6460041..0c2bfb8733 100644 --- a/basis/bootstrap/image/image-tests.factor +++ b/basis/bootstrap/image/image-tests.factor @@ -2,18 +2,18 @@ USING: bootstrap.image bootstrap.image.private tools.test kernel math ; IN: bootstrap.image.tests -[ f ] [ { 1 2 3 } [ 1 2 3 ] eql? ] unit-test +{ f } [ { 1 2 3 } [ 1 2 3 ] eql? ] unit-test -[ t ] [ [ 1 2 3 ] [ 1 2 3 ] eql? ] unit-test +{ t } [ [ 1 2 3 ] [ 1 2 3 ] eql? ] unit-test -[ f ] [ [ 2drop 0 ] [ 2drop 0.0 ] eql? ] unit-test +{ f } [ [ 2drop 0 ] [ 2drop 0.0 ] eql? ] unit-test -[ t ] [ [ 2drop 0 ] [ 2drop 0 ] eql? ] unit-test +{ t } [ [ 2drop 0 ] [ 2drop 0 ] eql? ] unit-test -[ f ] [ \ + [ 2drop 0 ] eql? ] unit-test +{ f } [ \ + [ 2drop 0 ] eql? ] unit-test -[ f ] [ 3 [ 0 1 2 ] eql? ] unit-test +{ f } [ 3 [ 0 1 2 ] eql? ] unit-test -[ f ] [ 3 3.0 eql? ] unit-test +{ f } [ 3 3.0 eql? ] unit-test -[ t ] [ 4.0 4.0 eql? ] unit-test +{ t } [ 4.0 4.0 eql? ] unit-test diff --git a/basis/byte-arrays/hex/hex-tests.factor b/basis/byte-arrays/hex/hex-tests.factor index 25f15405e9..814bae4be7 100644 --- a/basis/byte-arrays/hex/hex-tests.factor +++ b/basis/byte-arrays/hex/hex-tests.factor @@ -3,8 +3,8 @@ USING: tools.test byte-arrays.hex eval ; IN: byte-arrays.hex.tests -[ B{ 16 0 8 0 } ] [ HEX{ 10 00 08 00 } ] unit-test -[ B{ 255 255 15 255 255 255 } ] [ HEX{ ffff 0fff ffff } ] unit-test +{ B{ 16 0 8 0 } } [ HEX{ 10 00 08 00 } ] unit-test +{ B{ 255 255 15 255 255 255 } } [ HEX{ ffff 0fff ffff } ] unit-test [ "HEX{ ffff fff ffff }" parse-string ] must-fail [ "HEX{ 10 00 08 0 }" parse-string ] must-fail diff --git a/basis/calendar/format/format-tests.factor b/basis/calendar/format/format-tests.factor index b1598df2fe..64f030e84f 100644 --- a/basis/calendar/format/format-tests.factor +++ b/basis/calendar/format/format-tests.factor @@ -2,61 +2,61 @@ USING: calendar.format calendar kernel math tools.test io.streams.string accessors io math.order sequences ; IN: calendar.format.tests -[ 0 ] [ +{ 0 } [ "Z" [ read1 read-rfc3339-gmt-offset ] with-string-reader duration>hours ] unit-test -[ 1 ] [ +{ 1 } [ "+01" [ read1 read-rfc3339-gmt-offset ] with-string-reader duration>hours ] unit-test -[ -1 ] [ +{ -1 } [ "-01" [ read1 read-rfc3339-gmt-offset ] with-string-reader duration>hours ] unit-test -[ -1-1/2 ] [ +{ -1-1/2 } [ "-01:30" [ read1 read-rfc3339-gmt-offset ] with-string-reader duration>hours ] unit-test -[ 1+1/2 ] [ +{ 1+1/2 } [ "+01:30" [ read1 read-rfc3339-gmt-offset ] with-string-reader duration>hours ] unit-test -[ ] [ now timestamp>rfc3339 drop ] unit-test -[ ] [ now timestamp>rfc822 drop ] unit-test +{ } [ now timestamp>rfc3339 drop ] unit-test +{ } [ now timestamp>rfc822 drop ] unit-test -[ 8/1000 -4 ] [ +{ 8/1000 -4 } [ "2008-04-19T04:56:00.008-04:00" rfc3339>timestamp [ second>> ] [ gmt-offset>> hour>> ] bi ] unit-test -[ T{ duration f 0 0 0 0 0 0 } ] [ +{ T{ duration f 0 0 0 0 0 0 } } [ "GMT" parse-rfc822-gmt-offset ] unit-test -[ T{ duration f 0 0 0 -5 0 0 } ] [ +{ T{ duration f 0 0 0 -5 0 0 } } [ "-0500" parse-rfc822-gmt-offset ] unit-test -[ T{ timestamp f 2008 4 22 14 36 12 T{ duration f 0 0 0 0 0 0 } } ] [ +{ T{ timestamp f 2008 4 22 14 36 12 T{ duration f 0 0 0 0 0 0 } } } [ "Tue, 22 Apr 2008 14:36:12 GMT" rfc822>timestamp ] unit-test -[ t ] [ now dup timestamp>rfc822 rfc822>timestamp time- 1 seconds before? ] unit-test +{ t } [ now dup timestamp>rfc822 rfc822>timestamp time- 1 seconds before? ] unit-test -[ t ] [ now dup timestamp>cookie-string cookie-string>timestamp time- 1 seconds before? ] unit-test +{ t } [ now dup timestamp>cookie-string cookie-string>timestamp time- 1 seconds before? ] unit-test -[ "Sun, 4 May 2008 07:00:00" ] [ +{ "Sun, 4 May 2008 07:00:00" } [ "Sun May 04 07:00:00 2008 GMT" cookie-string>timestamp timestamp>string ] unit-test -[ "20080504070000" ] [ +{ "20080504070000" } [ "Sun May 04 07:00:00 2008 GMT" cookie-string>timestamp timestamp>mdtm ] unit-test -[ +{ T{ timestamp f 2008 5 @@ -66,9 +66,9 @@ IN: calendar.format.tests 42+2469/20000 T{ duration f 0 0 0 -5 0 0 } } -] [ "2008-05-26T00:37:42.12345-05:00" rfc3339>timestamp ] unit-test +} [ "2008-05-26T00:37:42.12345-05:00" rfc3339>timestamp ] unit-test -[ +{ T{ timestamp { year 2008 } { month 10 } @@ -78,13 +78,13 @@ IN: calendar.format.tests { second 59 } { gmt-offset T{ duration f 0 0 0 0 0 0 } } } -] [ "Thursday, 02-Oct-2008 23:59:59 GMT" cookie-string>timestamp ] unit-test +} [ "Thursday, 02-Oct-2008 23:59:59 GMT" cookie-string>timestamp ] unit-test -[ ] +{ } [ { 2008 2009 } [ year. ] each ] unit-test -[ +{ T{ timestamp { year 2013 } { month 4 } @@ -93,11 +93,11 @@ IN: calendar.format.tests { minute 50 } { second 24 } } -] [ "2013-04-23T13:50:24" rfc3339>timestamp ] unit-test +} [ "2013-04-23T13:50:24" rfc3339>timestamp ] unit-test { "2001-12-14T21:59:43.100000-05:00" } [ "2001-12-14T21:59:43.1-05:00" rfc3339>timestamp timestamp>rfc3339 ] unit-test -[ +{ T{ timestamp { year 2001 } { month 12 } @@ -106,9 +106,9 @@ IN: calendar.format.tests { minute 59 } { second 43+1/10 } } -] [ "2001-12-15 02:59:43.1Z" rfc3339>timestamp ] unit-test +} [ "2001-12-15 02:59:43.1Z" rfc3339>timestamp ] unit-test -[ +{ T{ timestamp { year 2001 } { month 12 } @@ -117,4 +117,4 @@ IN: calendar.format.tests { minute 59 } { second 43+1/10 } } -] [ "2001-12-15 02:59:43.1Z" rfc3339>timestamp ] unit-test +} [ "2001-12-15 02:59:43.1Z" rfc3339>timestamp ] unit-test diff --git a/basis/calendar/format/macros/macros-tests.factor b/basis/calendar/format/macros/macros-tests.factor index 4ba2872b43..5c95129cfc 100644 --- a/basis/calendar/format/macros/macros-tests.factor +++ b/basis/calendar/format/macros/macros-tests.factor @@ -1,9 +1,9 @@ USING: tools.test kernel accessors ; IN: calendar.format.macros -[ 2 ] [ { [ 2 ] } attempt-all-quots ] unit-test +{ 2 } [ { [ 2 ] } attempt-all-quots ] unit-test -[ 2 ] [ { [ 1 throw ] [ 2 ] } attempt-all-quots ] unit-test +{ 2 } [ { [ 1 throw ] [ 2 ] } attempt-all-quots ] unit-test [ { [ 1 throw ] } attempt-all-quots ] [ 1 = ] must-fail-with @@ -12,4 +12,4 @@ IN: calendar.format.macros \ compiled-test-1 def>> must-infer -[ 2 ] [ compiled-test-1 ] unit-test +{ 2 } [ compiled-test-1 ] unit-test diff --git a/basis/checksums/adler-32/adler-32-tests.factor b/basis/checksums/adler-32/adler-32-tests.factor index ccee74baae..f72a302d80 100644 --- a/basis/checksums/adler-32/adler-32-tests.factor +++ b/basis/checksums/adler-32/adler-32-tests.factor @@ -1,5 +1,5 @@ USING: checksums.adler-32 checksums strings tools.test ; IN: checksums.adler-32.tests -[ 300286872 ] [ "Wikipedia" adler-32 checksum-bytes ] unit-test -[ 2679885283 ] [ 10000 CHAR: a adler-32 checksum-bytes ] unit-test +{ 300286872 } [ "Wikipedia" adler-32 checksum-bytes ] unit-test +{ 2679885283 } [ 10000 CHAR: a adler-32 checksum-bytes ] unit-test diff --git a/basis/checksums/fnv1/fnv1-tests.factor b/basis/checksums/fnv1/fnv1-tests.factor index 27c3027769..b54a289609 100644 --- a/basis/checksums/fnv1/fnv1-tests.factor +++ b/basis/checksums/fnv1/fnv1-tests.factor @@ -3,39 +3,39 @@ IN: checksums.fnv1.tests ! A few test vectors taken from http://www.isthe.com/chongo/src/fnv/test_fnv.c -[ 0x811c9dc5 ] [ "" fnv1-32 checksum-bytes ] unit-test -[ 0x811c9dc5 ] [ "" fnv1a-32 checksum-bytes ] unit-test -[ 0xcbf29ce484222325 ] [ "" fnv1-64 checksum-bytes ] unit-test -[ 0xcbf29ce484222325 ] [ "" fnv1a-64 checksum-bytes ] unit-test +{ 0x811c9dc5 } [ "" fnv1-32 checksum-bytes ] unit-test +{ 0x811c9dc5 } [ "" fnv1a-32 checksum-bytes ] unit-test +{ 0xcbf29ce484222325 } [ "" fnv1-64 checksum-bytes ] unit-test +{ 0xcbf29ce484222325 } [ "" fnv1a-64 checksum-bytes ] unit-test -[ 0x050c5d7e ] [ "a" fnv1-32 checksum-bytes ] unit-test -[ 0xe40c292c ] [ "a" fnv1a-32 checksum-bytes ] unit-test -[ 0xaf63bd4c8601b7be ] [ "a" fnv1-64 checksum-bytes ] unit-test -[ 0xaf63dc4c8601ec8c ] [ "a" fnv1a-64 checksum-bytes ] unit-test +{ 0x050c5d7e } [ "a" fnv1-32 checksum-bytes ] unit-test +{ 0xe40c292c } [ "a" fnv1a-32 checksum-bytes ] unit-test +{ 0xaf63bd4c8601b7be } [ "a" fnv1-64 checksum-bytes ] unit-test +{ 0xaf63dc4c8601ec8c } [ "a" fnv1a-64 checksum-bytes ] unit-test -[ 0x050c5d7d ] [ "b" fnv1-32 checksum-bytes ] unit-test -[ 0xe70c2de5 ] [ "b" fnv1a-32 checksum-bytes ] unit-test -[ 0xaf63bd4c8601b7bd ] [ "b" fnv1-64 checksum-bytes ] unit-test -[ 0xaf63df4c8601f1a5 ] [ "b" fnv1a-64 checksum-bytes ] unit-test +{ 0x050c5d7d } [ "b" fnv1-32 checksum-bytes ] unit-test +{ 0xe70c2de5 } [ "b" fnv1a-32 checksum-bytes ] unit-test +{ 0xaf63bd4c8601b7bd } [ "b" fnv1-64 checksum-bytes ] unit-test +{ 0xaf63df4c8601f1a5 } [ "b" fnv1a-64 checksum-bytes ] unit-test -[ 0x31f0b262 ] [ "foobar" fnv1-32 checksum-bytes ] unit-test -[ 0xbf9cf968 ] [ "foobar" fnv1a-32 checksum-bytes ] unit-test -[ 0x340d8765a4dda9c2 ] [ "foobar" fnv1-64 checksum-bytes ] unit-test -[ 0x85944171f73967e8 ] [ "foobar" fnv1a-64 checksum-bytes ] unit-test +{ 0x31f0b262 } [ "foobar" fnv1-32 checksum-bytes ] unit-test +{ 0xbf9cf968 } [ "foobar" fnv1a-32 checksum-bytes ] unit-test +{ 0x340d8765a4dda9c2 } [ "foobar" fnv1-64 checksum-bytes ] unit-test +{ 0x85944171f73967e8 } [ "foobar" fnv1a-64 checksum-bytes ] unit-test ! I couldn't find any test vectors for 128, 256, 512, or 1024 versions of FNV1 hashes. ! So, just to check that your maths works the same as my maths, here's a few samples computed on my laptop. ! So they may be right or wrong, but either way, them failing is cause for concern somewhere... -[ 3897470310 ] [ "Hello, world!" fnv1-32 checksum-bytes ] unit-test -[ 3985698964 ] [ "Hello, world!" fnv1a-32 checksum-bytes ] unit-test -[ 7285062107457560934 ] [ "Hello, world!" fnv1-64 checksum-bytes ] unit-test -[ 4094109891673226228 ] [ "Hello, world!" fnv1a-64 checksum-bytes ] unit-test -[ 281580511747867177735318995358496831158 ] [ "Hello, world!" fnv1-128 checksum-bytes ] unit-test -[ 303126633380056630368940439484674414572 ] [ "Hello, world!" fnv1a-128 checksum-bytes ] unit-test -[ 104295939182568077644846978685759236849634734810631820736486253421270219742822 ] [ "Hello, world!" fnv1-256 checksum-bytes ] unit-test -[ 9495445728692795332446740615588417456874414534608540692485745371050033741380 ] [ "Hello, world!" fnv1a-256 checksum-bytes ] unit-test -[ 3577308325596719252093726711895047340166329831006673109476042102918876665433235513101496175651226507162015890004121912850661561110326527625579463564626958 ] [ "Hello, world!" fnv1-512 checksum-bytes ] unit-test -[ 3577308325596719162840652138474318309664256091923081930027929425092517582111473988451078821416039944023089883981242376700859598441397004715365740906054208 ] [ "Hello, world!" fnv1a-512 checksum-bytes ] unit-test -[ 52692754922840008511959888105094366091401994235075816792707658326855733053286986999719949898492311786648795846192078757217437117165934438286601534984230194601365788544275827382423366672856972872132009691615382991251544423521887009322211754219117294019951276080952271766377222613325328591830596794468813260226 ] [ "Hello, world!" fnv1-1024 checksum-bytes ] unit-test -[ 52692754922840008511959888105094366091401994235075816792707658326855804920671100511873485674717442819607149127986090276849364757610838433887624184145636764448608707614141109841761957788887305179569455221243999538336208648824673027111352338809582124430199044921035232455717748500524777795242051756321605065326 ] [ "Hello, world!" fnv1a-1024 checksum-bytes ] unit-test +{ 3897470310 } [ "Hello, world!" fnv1-32 checksum-bytes ] unit-test +{ 3985698964 } [ "Hello, world!" fnv1a-32 checksum-bytes ] unit-test +{ 7285062107457560934 } [ "Hello, world!" fnv1-64 checksum-bytes ] unit-test +{ 4094109891673226228 } [ "Hello, world!" fnv1a-64 checksum-bytes ] unit-test +{ 281580511747867177735318995358496831158 } [ "Hello, world!" fnv1-128 checksum-bytes ] unit-test +{ 303126633380056630368940439484674414572 } [ "Hello, world!" fnv1a-128 checksum-bytes ] unit-test +{ 104295939182568077644846978685759236849634734810631820736486253421270219742822 } [ "Hello, world!" fnv1-256 checksum-bytes ] unit-test +{ 9495445728692795332446740615588417456874414534608540692485745371050033741380 } [ "Hello, world!" fnv1a-256 checksum-bytes ] unit-test +{ 3577308325596719252093726711895047340166329831006673109476042102918876665433235513101496175651226507162015890004121912850661561110326527625579463564626958 } [ "Hello, world!" fnv1-512 checksum-bytes ] unit-test +{ 3577308325596719162840652138474318309664256091923081930027929425092517582111473988451078821416039944023089883981242376700859598441397004715365740906054208 } [ "Hello, world!" fnv1a-512 checksum-bytes ] unit-test +{ 52692754922840008511959888105094366091401994235075816792707658326855733053286986999719949898492311786648795846192078757217437117165934438286601534984230194601365788544275827382423366672856972872132009691615382991251544423521887009322211754219117294019951276080952271766377222613325328591830596794468813260226 } [ "Hello, world!" fnv1-1024 checksum-bytes ] unit-test +{ 52692754922840008511959888105094366091401994235075816792707658326855804920671100511873485674717442819607149127986090276849364757610838433887624184145636764448608707614141109841761957788887305179569455221243999538336208648824673027111352338809582124430199044921035232455717748500524777795242051756321605065326 } [ "Hello, world!" fnv1a-1024 checksum-bytes ] unit-test diff --git a/basis/checksums/hmac/hmac-tests.factor b/basis/checksums/hmac/hmac-tests.factor index 3054a91c80..088616c442 100644 --- a/basis/checksums/hmac/hmac-tests.factor +++ b/basis/checksums/hmac/hmac-tests.factor @@ -3,45 +3,45 @@ parser checksums.hmac tools.test checksums.md5 checksums.sha checksums ; IN: checksums.hmac.tests -[ +{ "\u000092\u000094rz68\u0000bb\u00001c\u000013\u0000f4\u00008e\u0000f8\u000015\u00008b\u0000fc\u00009d" -] [ +} [ "Hi There" 16 11 md5 hmac-bytes >string ] unit-test -[ "u\u00000cx>j\u0000b0\u0000b5\u000003\u0000ea\u0000a8n1\n]\u0000b78" ] +{ "u\u00000cx>j\u0000b0\u0000b5\u000003\u0000ea\u0000a8n1\n]\u0000b78" } [ "what do ya want for nothing?" "Jefe" md5 hmac-bytes >string ] unit-test -[ +{ "V\u0000be4R\u00001d\u000014L\u000088\u0000db\u0000b8\u0000c73\u0000f0\u0000e8\u0000b3\u0000f6" -] +} [ 50 0xdd 16 0xaa md5 hmac-bytes >string ] unit-test -[ +{ "g[\u00000b:\eM\u0000dfN\u000012Hr\u0000dal/c+\u0000fe\u0000d9W\u0000e9" -] [ +} [ "Hi There" 16 11 sha1 hmac-bytes >string ] unit-test -[ +{ "\u0000ef\u0000fc\u0000dfj\u0000e5\u0000eb/\u0000a2\u0000d2t\u000016\u0000d5\u0000f1\u000084\u0000df\u00009c%\u00009a|y" -] [ +} [ "what do ya want for nothing?" "Jefe" sha1 hmac-bytes >string ] unit-test -[ +{ "\u0000d70YM\u000016~5\u0000d5\u000095o\u0000d8\0=\r\u0000b3\u0000d3\u0000f4m\u0000c7\u0000bb" -] [ +} [ 50 0xdd 16 0xaa sha1 hmac-bytes >string ] unit-test -[ "b0344c61d8db38535ca8afceaf0bf12b881dc200c9833da726e9376c2e32cff7" ] +{ "b0344c61d8db38535ca8afceaf0bf12b881dc200c9833da726e9376c2e32cff7" } [ "Hi There" 20 0xb sha-256 hmac-bytes hex-string ] unit-test -[ "167f928588c5cc2eef8e3093caa0e87c9ff566a14794aa61648d81621a2a40c6" ] +{ "167f928588c5cc2eef8e3093caa0e87c9ff566a14794aa61648d81621a2a40c6" } [ "what do ya want for nothing?" "JefeJefeJefeJefeJefeJefeJefeJefe" sha-256 hmac-bytes hex-string diff --git a/basis/checksums/interleave/interleave-tests.factor b/basis/checksums/interleave/interleave-tests.factor index 0ae836760a..7ca9ab0298 100644 --- a/basis/checksums/interleave/interleave-tests.factor +++ b/basis/checksums/interleave/interleave-tests.factor @@ -3,13 +3,13 @@ USING: tools.test checksums.interleave checksums.sha ; IN: checksums.interleave.tests -[ +{ B{ 59 155 253 205 75 163 94 115 208 42 227 92 181 19 60 232 119 65 178 131 210 48 241 230 204 216 30 156 4 215 80 84 93 206 44 1 18 128 150 153 } -] [ +} [ B{ 102 83 241 12 26 250 181 76 97 200 37 117 168 74 254 48 216 170 26 58 150 150 179 24 153 146 191 225 203 127 166 167 diff --git a/basis/checksums/internet/internet-tests.factor b/basis/checksums/internet/internet-tests.factor index e60703d5f9..fa7fe9b876 100644 --- a/basis/checksums/internet/internet-tests.factor +++ b/basis/checksums/internet/internet-tests.factor @@ -5,10 +5,10 @@ USING: checksums checksums.internet tools.test ; IN: checksums -[ B{ 255 255 } ] [ { } internet checksum-bytes ] unit-test -[ B{ 254 255 } ] [ { 1 } internet checksum-bytes ] unit-test -[ B{ 254 253 } ] [ { 1 2 } internet checksum-bytes ] unit-test -[ B{ 251 253 } ] [ { 1 2 3 } internet checksum-bytes ] unit-test +{ B{ 255 255 } } [ { } internet checksum-bytes ] unit-test +{ B{ 254 255 } } [ { 1 } internet checksum-bytes ] unit-test +{ B{ 254 253 } } [ { 1 2 } internet checksum-bytes ] unit-test +{ B{ 251 253 } } [ { 1 2 3 } internet checksum-bytes ] unit-test : test-data ( -- bytes ) B{ @@ -18,4 +18,4 @@ IN: checksums 0xf6 0xf7 } ; -[ B{ 34 13 } ] [ test-data internet checksum-bytes ] unit-test +{ B{ 34 13 } } [ test-data internet checksum-bytes ] unit-test diff --git a/basis/checksums/md5/md5-tests.factor b/basis/checksums/md5/md5-tests.factor index 0540b5cb45..13d0e9cc8b 100644 --- a/basis/checksums/md5/md5-tests.factor +++ b/basis/checksums/md5/md5-tests.factor @@ -5,38 +5,38 @@ io.streams.byte-array kernel math namespaces tools.test sequences ; IN: checksums.md5.tests -[ "d41d8cd98f00b204e9800998ecf8427e" ] [ "" >byte-array md5 checksum-bytes hex-string ] unit-test -[ "0cc175b9c0f1b6a831c399e269772661" ] [ "a" >byte-array md5 checksum-bytes hex-string ] unit-test -[ "900150983cd24fb0d6963f7d28e17f72" ] [ "abc" >byte-array md5 checksum-bytes hex-string ] unit-test -[ "f96b697d7cb7938d525a2f31aaf161d0" ] [ "message digest" >byte-array md5 checksum-bytes hex-string ] unit-test -[ "c3fcd3d76192e4007dfb496cca67e13b" ] [ "abcdefghijklmnopqrstuvwxyz" >byte-array md5 checksum-bytes hex-string ] unit-test -[ "d174ab98d277d9f5a5611c2c9f419d9f" ] [ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" >byte-array md5 checksum-bytes hex-string ] unit-test -[ "57edf4a22be3c955ac49da2e2107b67a" ] [ "12345678901234567890123456789012345678901234567890123456789012345678901234567890" >byte-array md5 checksum-bytes hex-string ] unit-test +{ "d41d8cd98f00b204e9800998ecf8427e" } [ "" >byte-array md5 checksum-bytes hex-string ] unit-test +{ "0cc175b9c0f1b6a831c399e269772661" } [ "a" >byte-array md5 checksum-bytes hex-string ] unit-test +{ "900150983cd24fb0d6963f7d28e17f72" } [ "abc" >byte-array md5 checksum-bytes hex-string ] unit-test +{ "f96b697d7cb7938d525a2f31aaf161d0" } [ "message digest" >byte-array md5 checksum-bytes hex-string ] unit-test +{ "c3fcd3d76192e4007dfb496cca67e13b" } [ "abcdefghijklmnopqrstuvwxyz" >byte-array md5 checksum-bytes hex-string ] unit-test +{ "d174ab98d277d9f5a5611c2c9f419d9f" } [ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" >byte-array md5 checksum-bytes hex-string ] unit-test +{ "57edf4a22be3c955ac49da2e2107b67a" } [ "12345678901234567890123456789012345678901234567890123456789012345678901234567890" >byte-array md5 checksum-bytes hex-string ] unit-test -[ +{ t -] [ +} [ "asdf" add-checksum-bytes [ get-checksum ] [ get-checksum ] bi = ] unit-test -[ +{ t -] [ +} [ "" add-checksum-bytes [ get-checksum ] [ get-checksum ] bi = ] unit-test -[ +{ t -] [ +} [ "asdf" binary add-checksum-stream [ get-checksum ] [ get-checksum ] bi = ] unit-test -[ +{ t -] [ +} [ { "abcd" "efg" } md5 checksum-lines length 16 = ] unit-test diff --git a/basis/checksums/openssl/openssl-tests.factor b/basis/checksums/openssl/openssl-tests.factor index 2a160e1486..3fb223caec 100644 --- a/basis/checksums/openssl/openssl-tests.factor +++ b/basis/checksums/openssl/openssl-tests.factor @@ -2,17 +2,17 @@ USING: accessors byte-arrays checksums checksums.openssl combinators.short-circuit kernel system tools.test ; IN: checksums.openssl.tests -[ +{ B{ 201 238 222 100 92 200 182 188 138 255 129 163 115 88 240 136 } -] +} [ "Hello world from the openssl binding" >byte-array "md5" checksum-bytes ] unit-test -[ +{ B{ 63 113 237 255 181 5 152 241 136 181 43 95 160 105 44 87 49 82 115 0 } -] +} [ "Hello world from the openssl binding" >byte-array "sha1" checksum-bytes @@ -25,4 +25,4 @@ IN: checksums.openssl.tests ] [ { [ unknown-digest? ] [ name>> "no such checksum" = ] } 1&& ] must-fail-with -[ ] [ image openssl-sha1 checksum-file drop ] unit-test +{ } [ image openssl-sha1 checksum-file drop ] unit-test diff --git a/basis/checksums/sha/sha-tests.factor b/basis/checksums/sha/sha-tests.factor index 14a991c117..0163513539 100644 --- a/basis/checksums/sha/sha-tests.factor +++ b/basis/checksums/sha/sha-tests.factor @@ -6,38 +6,38 @@ IN: checksums.sha.tests : test-checksum ( text identifier -- checksum ) checksum-bytes hex-string ; -[ "a9993e364706816aba3e25717850c26c9cd0d89d" ] [ "abc" sha1 checksum-bytes hex-string ] unit-test -[ "84983e441c3bd26ebaae4aa1f95129e5e54670f1" ] [ "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq" sha1 checksum-bytes hex-string ] unit-test +{ "a9993e364706816aba3e25717850c26c9cd0d89d" } [ "abc" sha1 checksum-bytes hex-string ] unit-test +{ "84983e441c3bd26ebaae4aa1f95129e5e54670f1" } [ "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq" sha1 checksum-bytes hex-string ] unit-test ! [ "34aa973cd4c4daa4f61eeb2bdbad27316534016f" ] [ 1000000 CHAR: a fill string>sha1str ] unit-test ! takes a long time... -[ "dea356a2cddd90c7a7ecedc5ebb563934f460452" ] [ "0123456701234567012345670123456701234567012345670123456701234567" +{ "dea356a2cddd90c7a7ecedc5ebb563934f460452" } [ "0123456701234567012345670123456701234567012345670123456701234567" 10 swap concat sha1 checksum-bytes hex-string ] unit-test -[ "75388b16512776cc5dba5da1fd890150b0c6455cb4f58b1952522525" ] +{ "75388b16512776cc5dba5da1fd890150b0c6455cb4f58b1952522525" } [ "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq" sha-224 test-checksum ] unit-test -[ "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" ] +{ "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" } [ "" sha-256 test-checksum ] unit-test -[ "ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad" ] +{ "ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad" } [ "abc" sha-256 test-checksum ] unit-test -[ "f7846f55cf23e14eebeab5b4e1550cad5b509e3348fbc4efa3a1413d393cb650" ] +{ "f7846f55cf23e14eebeab5b4e1550cad5b509e3348fbc4efa3a1413d393cb650" } [ "message digest" sha-256 test-checksum ] unit-test -[ "71c480df93d6ae2f1efad1447c66c9525e316218cf51fc8d9ed832f2daf18b73" ] +{ "71c480df93d6ae2f1efad1447c66c9525e316218cf51fc8d9ed832f2daf18b73" } [ "abcdefghijklmnopqrstuvwxyz" sha-256 test-checksum ] unit-test -[ "db4bfcbd4da0cd85a60c3c37d3fbd8805c77f15fc6b1fdfe614ee0a7c8fdb4c0" ] +{ "db4bfcbd4da0cd85a60c3c37d3fbd8805c77f15fc6b1fdfe614ee0a7c8fdb4c0" } [ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" sha-256 test-checksum ] unit-test -[ "f371bc4a311f2b009eef952dd83ca80e2b60026c8e935592d0f9c308453c813e" ] +{ "f371bc4a311f2b009eef952dd83ca80e2b60026c8e935592d0f9c308453c813e" } [ "12345678901234567890123456789012345678901234567890123456789012345678901234567890" sha-256 test-checksum @@ -47,23 +47,23 @@ IN: checksums.sha.tests ! [ "8e959b75dae313da8cf4f72814fc143f8f7779c6eb9f7fa17299aeadb6889018501d289e4900f7e4331b99dec4b5433ac7d329eeb6dd26545e96e55b874be909" ] ! [ "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu" sha-512 test-checksum ] unit-test -[ +{ t -] [ +} [ "asdf" binary add-checksum-stream [ get-checksum ] [ get-checksum ] bi = ] unit-test -[ +{ t -] [ +} [ "asdf" binary add-checksum-stream [ get-checksum ] [ get-checksum ] bi = ] unit-test -[ +{ t -] [ +} [ "asdf" binary add-checksum-stream [ get-checksum ] [ get-checksum ] bi = ] unit-test diff --git a/basis/classes/struct/bit-accessors/bit-accessors-tests.factor b/basis/classes/struct/bit-accessors/bit-accessors-tests.factor index 44bc90b023..8af8e76806 100644 --- a/basis/classes/struct/bit-accessors/bit-accessors-tests.factor +++ b/basis/classes/struct/bit-accessors/bit-accessors-tests.factor @@ -4,5 +4,5 @@ USING: classes.struct.bit-accessors tools.test effects kernel sequences random stack-checker ; IN: classes.struct.bit-accessors.test -[ t ] [ 20 random 20 random bit-reader infer ( alien -- n ) effect= ] unit-test -[ t ] [ 20 random 20 random bit-writer infer ( n alien -- ) effect= ] unit-test +{ t } [ 20 random 20 random bit-reader infer ( alien -- n ) effect= ] unit-test +{ t } [ 20 random 20 random bit-writer infer ( n alien -- ) effect= ] unit-test diff --git a/basis/classes/struct/struct-tests.factor b/basis/classes/struct/struct-tests.factor index 686317d0bf..703f7da8f8 100644 --- a/basis/classes/struct/struct-tests.factor +++ b/basis/classes/struct/struct-tests.factor @@ -31,13 +31,13 @@ STRUCT: struct-test-bar { w ushort initial: 0xffff } { foo struct-test-foo } ; -[ 12 ] [ struct-test-foo heap-size ] unit-test -[ 12 ] [ struct-test-foo byte-length ] unit-test -[ 16 ] [ struct-test-bar heap-size ] unit-test -[ 123 ] [ struct-test-foo y>> ] unit-test -[ 123 ] [ struct-test-bar foo>> y>> ] unit-test +{ 12 } [ struct-test-foo heap-size ] unit-test +{ 12 } [ struct-test-foo byte-length ] unit-test +{ 16 } [ struct-test-bar heap-size ] unit-test +{ 123 } [ struct-test-foo y>> ] unit-test +{ 123 } [ struct-test-bar foo>> y>> ] unit-test -[ 1 2 3 t ] [ +{ 1 2 3 t } [ 1 2 3 t struct-test-foo struct-test-bar { [ w>> ] @@ -47,111 +47,111 @@ STRUCT: struct-test-bar } cleave ] unit-test -[ 7654 ] [ S{ struct-test-foo f 98 7654 f } y>> ] unit-test -[ 7654 ] [ S{ struct-test-foo { y 7654 } } y>> ] unit-test +{ 7654 } [ S{ struct-test-foo f 98 7654 f } y>> ] unit-test +{ 7654 } [ S{ struct-test-foo { y 7654 } } y>> ] unit-test -[ { +{ { { "underlying" B{ 98 0 0 98 127 0 0 127 0 0 0 0 } } { { "x" char } 98 } { { "y" int } 0x7F00007F } { { "z" bool } f } -} ] [ +} } [ B{ 98 0 0 98 127 0 0 127 0 0 0 0 } struct-test-foo memory>struct make-mirror >alist ] unit-test -[ { { "underlying" f } } ] [ +{ { { "underlying" f } } } [ f struct-test-foo memory>struct make-mirror >alist ] unit-test -[ 55 t ] [ S{ struct-test-foo { x 55 } } make-mirror { "x" "char" } ?of ] unit-test -[ 55 t ] [ S{ struct-test-foo { y 55 } } make-mirror { "y" "int" } ?of ] unit-test -[ t t ] [ S{ struct-test-foo { z t } } make-mirror { "z" "bool" } ?of ] unit-test -[ f t ] [ S{ struct-test-foo { z f } } make-mirror { "z" "bool" } ?of ] unit-test -[ { "nonexist" "bool" } f ] [ S{ struct-test-foo } make-mirror { "nonexist" "bool" } ?of ] unit-test -[ "nonexist" f ] [ S{ struct-test-foo } make-mirror "nonexist" ?of ] unit-test -[ f t ] [ f struct-test-foo memory>struct make-mirror "underlying" ?of ] unit-test +{ 55 t } [ S{ struct-test-foo { x 55 } } make-mirror { "x" "char" } ?of ] unit-test +{ 55 t } [ S{ struct-test-foo { y 55 } } make-mirror { "y" "int" } ?of ] unit-test +{ t t } [ S{ struct-test-foo { z t } } make-mirror { "z" "bool" } ?of ] unit-test +{ f t } [ S{ struct-test-foo { z f } } make-mirror { "z" "bool" } ?of ] unit-test +{ { "nonexist" "bool" } f } [ S{ struct-test-foo } make-mirror { "nonexist" "bool" } ?of ] unit-test +{ "nonexist" f } [ S{ struct-test-foo } make-mirror "nonexist" ?of ] unit-test +{ f t } [ f struct-test-foo memory>struct make-mirror "underlying" ?of ] unit-test -[ S{ struct-test-foo { x 3 } { y 2 } { z f } } ] [ +{ S{ struct-test-foo { x 3 } { y 2 } { z f } } } [ S{ struct-test-foo { x 1 } { y 2 } { z f } } [ make-mirror [ 3 { "x" "char" } ] dip set-at ] keep ] unit-test -[ S{ struct-test-foo { x 1 } { y 5 } { z f } } ] [ +{ S{ struct-test-foo { x 1 } { y 5 } { z f } } } [ S{ struct-test-foo { x 1 } { y 2 } { z f } } [ make-mirror [ 5 { "y" "int" } ] dip set-at ] keep ] unit-test -[ S{ struct-test-foo { x 1 } { y 2 } { z t } } ] [ +{ S{ struct-test-foo { x 1 } { y 2 } { z t } } } [ S{ struct-test-foo { x 1 } { y 2 } { z f } } [ make-mirror [ t { "z" "bool" } ] dip set-at ] keep ] unit-test -[ S{ struct-test-foo { x 1 } { y 2 } { z f } } ] [ +{ S{ struct-test-foo { x 1 } { y 2 } { z f } } } [ S{ struct-test-foo { x 1 } { y 2 } { z f } } [ make-mirror [ "nonsense" "underlying" ] dip set-at ] keep ] unit-test -[ S{ struct-test-foo { x 1 } { y 2 } { z f } } ] [ +{ S{ struct-test-foo { x 1 } { y 2 } { z f } } } [ S{ struct-test-foo { x 1 } { y 2 } { z f } } [ make-mirror [ "nonsense" "nonexist" ] dip set-at ] keep ] unit-test -[ S{ struct-test-foo { x 1 } { y 2 } { z f } } ] [ +{ S{ struct-test-foo { x 1 } { y 2 } { z f } } } [ S{ struct-test-foo { x 1 } { y 2 } { z f } } [ make-mirror [ "nonsense" { "nonexist" "int" } ] dip set-at ] keep ] unit-test -[ S{ struct-test-foo { x 1 } { y 123 } { z f } } ] [ +{ S{ struct-test-foo { x 1 } { y 123 } { z f } } } [ S{ struct-test-foo { x 1 } { y 2 } { z f } } [ make-mirror { "y" "int" } swap delete-at ] keep ] unit-test -[ S{ struct-test-foo { x 0 } { y 2 } { z f } } ] [ +{ S{ struct-test-foo { x 0 } { y 2 } { z f } } } [ S{ struct-test-foo { x 1 } { y 2 } { z f } } [ make-mirror { "x" "char" } swap delete-at ] keep ] unit-test -[ S{ struct-test-foo { x 1 } { y 2 } { z f } } ] [ +{ S{ struct-test-foo { x 1 } { y 2 } { z f } } } [ S{ struct-test-foo { x 1 } { y 2 } { z f } } [ make-mirror { "nonexist" "char" } swap delete-at ] keep ] unit-test -[ S{ struct-test-foo { x 1 } { y 2 } { z f } } ] [ +{ S{ struct-test-foo { x 1 } { y 2 } { z f } } } [ S{ struct-test-foo { x 1 } { y 2 } { z f } } [ make-mirror "underlying" swap delete-at ] keep ] unit-test -[ S{ struct-test-foo { x 1 } { y 2 } { z f } } ] [ +{ S{ struct-test-foo { x 1 } { y 2 } { z f } } } [ S{ struct-test-foo { x 1 } { y 2 } { z f } } [ make-mirror "nonsense" swap delete-at ] keep ] unit-test -[ S{ struct-test-foo { x 0 } { y 123 } { z f } } ] [ +{ S{ struct-test-foo { x 0 } { y 123 } { z f } } } [ S{ struct-test-foo { x 1 } { y 2 } { z t } } [ make-mirror clear-assoc ] keep ] unit-test -[ POSTPONE: STRUCT: ] +{ POSTPONE: STRUCT: } [ struct-test-foo struct-definer-word ] unit-test UNION-STRUCT: struct-test-float-and-bits { f c:float } { bits uint } ; -[ 1.0 ] [ struct-test-float-and-bits 1.0 float>bits >>bits f>> ] unit-test -[ 4 ] [ struct-test-float-and-bits heap-size ] unit-test +{ 1.0 } [ struct-test-float-and-bits 1.0 float>bits >>bits f>> ] unit-test +{ 4 } [ struct-test-float-and-bits heap-size ] unit-test -[ 123 ] [ [ struct-test-foo malloc-struct &free y>> ] with-destructors ] unit-test +{ 123 } [ [ struct-test-foo malloc-struct &free y>> ] with-destructors ] unit-test -[ POSTPONE: UNION-STRUCT: ] +{ POSTPONE: UNION-STRUCT: } [ struct-test-float-and-bits struct-definer-word ] unit-test STRUCT: struct-test-string-ptr { x c-string } ; -[ "hello world" ] [ +{ "hello world" } [ [ struct-test-string-ptr "hello world" utf8 malloc-string &free >>x @@ -159,49 +159,49 @@ STRUCT: struct-test-string-ptr ] with-destructors ] unit-test -[ "S{ struct-test-foo { x 0 } { y 7654 } { z f } }" ] +{ "S{ struct-test-foo { x 0 } { y 7654 } { z f } }" } [ H{ { boa-tuples? f } { c-object-pointers? f } } [ struct-test-foo 7654 >>y [ pprint ] with-string-writer ] with-variables ] unit-test -[ "S@ struct-test-foo B{ 0 0 0 0 0 0 0 0 0 0 0 0 }" ] +{ "S@ struct-test-foo B{ 0 0 0 0 0 0 0 0 0 0 0 0 }" } [ H{ { c-object-pointers? t } } [ 12 struct-test-foo memory>struct [ pprint ] with-string-writer ] with-variables ] unit-test -[ "S{ struct-test-foo f 0 7654 f }" ] +{ "S{ struct-test-foo f 0 7654 f }" } [ H{ { boa-tuples? t } { c-object-pointers? f } } [ struct-test-foo 7654 >>y [ pprint ] with-string-writer ] with-variables ] unit-test -[ "S@ struct-test-foo f" ] +{ "S@ struct-test-foo f" } [ H{ { c-object-pointers? f } } [ f struct-test-foo memory>struct [ pprint ] with-string-writer ] with-variables ] unit-test -[ "USING: alien.c-types classes.struct ; +{ "USING: alien.c-types classes.struct ; IN: classes.struct.tests STRUCT: struct-test-foo { x char initial: 0 } { y int initial: 123 } { z bool } ; -" ] +" } [ [ struct-test-foo see ] with-string-writer ] unit-test -[ "USING: alien.c-types classes.struct ; +{ "USING: alien.c-types classes.struct ; IN: classes.struct.tests UNION-STRUCT: struct-test-float-and-bits { f float initial: 0.0 } { bits uint initial: 0 } ; -" ] +" } [ [ struct-test-float-and-bits see ] with-string-writer ] unit-test -[ { +{ { T{ struct-slot-spec { name "x" } { offset 0 } @@ -223,9 +223,9 @@ UNION-STRUCT: struct-test-float-and-bits { type bool } { class object } } -} ] [ struct-test-foo lookup-c-type fields>> ] unit-test +} } [ struct-test-foo lookup-c-type fields>> ] unit-test -[ { +{ { T{ struct-slot-spec { name "f" } { offset 0 } @@ -240,30 +240,30 @@ UNION-STRUCT: struct-test-float-and-bits { class $[ cell 4 = integer fixnum ? ] } { initial 0 } } -} ] [ struct-test-float-and-bits lookup-c-type fields>> ] unit-test +} } [ struct-test-float-and-bits lookup-c-type fields>> ] unit-test STRUCT: struct-test-equality-1 { x int } ; STRUCT: struct-test-equality-2 { y int } ; -[ 0 ] [ struct-test-equality-1 new hashcode ] unit-test +{ 0 } [ struct-test-equality-1 new hashcode ] unit-test -[ t ] [ +{ t } [ [ struct-test-equality-1 5 >>x struct-test-equality-1 malloc-struct &free 5 >>x = ] with-destructors ] unit-test -[ f ] [ +{ f } [ [ struct-test-equality-1 5 >>x struct-test-equality-2 malloc-struct &free 5 >>y = ] with-destructors ] unit-test -[ t ] [ +{ t } [ [ struct-test-equality-1 5 >>x struct-test-equality-1 malloc-struct &free 5 >>x @@ -276,9 +276,9 @@ STRUCT: struct-test-array-slots { y ushort[6] initial: ushort-array{ 2 3 5 7 11 13 } } { z int } ; -[ 11 ] [ struct-test-array-slots y>> 4 swap nth ] unit-test +{ 11 } [ struct-test-array-slots y>> 4 swap nth ] unit-test -[ t ] [ +{ t } [ struct-test-array-slots [ y>> [ 8 3 ] dip set-nth ] [ y>> ushort-array{ 2 3 5 8 11 13 } sequence= ] bi @@ -289,27 +289,27 @@ STRUCT: struct-test-optimization SPECIALIZED-ARRAY: struct-test-optimization -[ t ] [ [ struct-test-optimization memory>struct y>> ] { memory>struct y>> } inlined? ] unit-test -[ t ] [ +{ t } [ [ struct-test-optimization memory>struct y>> ] { memory>struct y>> } inlined? ] unit-test +{ t } [ [ 3 struct-test-optimization third y>> ] { memory>struct y>> } inlined? ] unit-test -[ t ] [ [ struct-test-optimization memory>struct y>> ] { memory>struct y>> } inlined? ] unit-test +{ t } [ [ struct-test-optimization memory>struct y>> ] { memory>struct y>> } inlined? ] unit-test -[ t ] [ +{ t } [ [ struct-test-optimization memory>struct x>> second ] { memory>struct x>> int } inlined? ] unit-test -[ f ] [ [ memory>struct y>> ] { memory>struct y>> } inlined? ] unit-test +{ f } [ [ memory>struct y>> ] { memory>struct y>> } inlined? ] unit-test -[ t ] [ +{ t } [ [ struct-test-optimization struct-test-optimization [ x>> ] bi@ ] { x>> } inlined? ] unit-test -[ ] [ +{ } [ [ struct-test-optimization specialized-array-vocab forget-vocab ] with-compilation-unit @@ -318,14 +318,14 @@ SPECIALIZED-ARRAY: struct-test-optimization ! Test cloning structs STRUCT: clone-test-struct { x int } { y char[3] } ; -[ 1 char-array{ 9 1 1 } ] [ +{ 1 char-array{ 9 1 1 } } [ clone-test-struct 1 >>x char-array{ 9 1 1 } >>y clone [ x>> ] [ y>> char >c-array ] bi ] unit-test -[ t 1 char-array{ 9 1 1 } ] [ +{ t 1 char-array{ 9 1 1 } } [ [ clone-test-struct malloc-struct &free 1 >>x char-array{ 9 1 1 } >>y @@ -338,7 +338,7 @@ STRUCT: struct-that's-a-word { x int } ; : struct-that's-a-word ( -- ) "OOPS" throw ; -[ -77 ] [ S{ struct-that's-a-word { x -77 } } clone x>> ] unit-test +{ -77 } [ S{ struct-that's-a-word { x -77 } } clone x>> ] unit-test ! Interactive parsing of struct slot definitions [ @@ -371,35 +371,35 @@ TUPLE: will-become-struct ; TUPLE: a-subclass < will-become-struct ; -[ f ] [ will-become-struct struct-class? ] unit-test +{ f } [ will-become-struct struct-class? ] unit-test -[ will-become-struct ] [ a-subclass superclass ] unit-test +{ will-become-struct } [ a-subclass superclass ] unit-test -[ ] [ "IN: classes.struct.tests USING: classes.struct alien.c-types ; STRUCT: will-become-struct { x int } ;" eval( -- ) ] unit-test +{ } [ "IN: classes.struct.tests USING: classes.struct alien.c-types ; STRUCT: will-become-struct { x int } ;" eval( -- ) ] unit-test -[ t ] [ will-become-struct struct-class? ] unit-test +{ t } [ will-become-struct struct-class? ] unit-test -[ tuple ] [ a-subclass superclass ] unit-test +{ tuple } [ a-subclass superclass ] unit-test STRUCT: bit-field-test { a uint bits: 12 } { b int bits: 2 } { c char } ; -[ S{ bit-field-test f 0 0 0 } ] [ bit-field-test ] unit-test -[ S{ bit-field-test f 1 -2 3 } ] [ bit-field-test 1 >>a 2 >>b 3 >>c ] unit-test -[ 4095 ] [ bit-field-test 8191 >>a a>> ] unit-test -[ 1 ] [ bit-field-test 1 >>b b>> ] unit-test -[ -2 ] [ bit-field-test 2 >>b b>> ] unit-test -[ 1 ] [ bit-field-test 257 >>c c>> ] unit-test -[ 3 ] [ bit-field-test heap-size ] unit-test +{ S{ bit-field-test f 0 0 0 } } [ bit-field-test ] unit-test +{ S{ bit-field-test f 1 -2 3 } } [ bit-field-test 1 >>a 2 >>b 3 >>c ] unit-test +{ 4095 } [ bit-field-test 8191 >>a a>> ] unit-test +{ 1 } [ bit-field-test 1 >>b b>> ] unit-test +{ -2 } [ bit-field-test 2 >>b b>> ] unit-test +{ 1 } [ bit-field-test 257 >>c c>> ] unit-test +{ 3 } [ bit-field-test heap-size ] unit-test STRUCT: referent { y int } ; STRUCT: referrer { x referent* } ; -[ 57 ] [ +{ 57 } [ [ referrer referent malloc-struct &free @@ -413,7 +413,7 @@ STRUCT: self-referent { x self-referent* } { y int } ; -[ 75 ] [ +{ 75 } [ [ self-referent self-referent malloc-struct &free @@ -431,7 +431,7 @@ STRUCT: forward-referent { x backward-referent* } { y int } ; -[ 41 ] [ +{ 41 } [ [ forward-referent backward-referent malloc-struct &free @@ -441,7 +441,7 @@ STRUCT: forward-referent ] with-destructors ] unit-test -[ 14 ] [ +{ 14 } [ [ backward-referent forward-referent malloc-struct &free @@ -473,7 +473,7 @@ STRUCT: struct-test-delegator { b int } ; CONSULT: struct-test-delegate struct-test-delegator del>> ; -[ S{ struct-test-delegator f S{ struct-test-delegate f 7 } 8 } ] [ +{ S{ struct-test-delegator f S{ struct-test-delegate f 7 } 8 } } [ struct-test-delegator 7 >>a 8 >>b @@ -483,7 +483,7 @@ SPECIALIZED-ARRAY: void* STRUCT: silly-array-field-test { x int*[3] } ; -[ t ] [ silly-array-field-test x>> void*-array? ] unit-test +{ t } [ silly-array-field-test x>> void*-array? ] unit-test ! Packed structs PACKED-STRUCT: packed-struct-test @@ -493,53 +493,53 @@ PACKED-STRUCT: packed-struct-test { g c:char } { h c:int } ; -[ 15 ] [ packed-struct-test heap-size ] unit-test +{ 15 } [ packed-struct-test heap-size ] unit-test -[ 0 ] [ "d" packed-struct-test offset-of ] unit-test -[ 4 ] [ "e" packed-struct-test offset-of ] unit-test -[ 6 ] [ "f" packed-struct-test offset-of ] unit-test -[ 10 ] [ "g" packed-struct-test offset-of ] unit-test -[ 11 ] [ "h" packed-struct-test offset-of ] unit-test +{ 0 } [ "d" packed-struct-test offset-of ] unit-test +{ 4 } [ "e" packed-struct-test offset-of ] unit-test +{ 6 } [ "f" packed-struct-test offset-of ] unit-test +{ 10 } [ "g" packed-struct-test offset-of ] unit-test +{ 11 } [ "h" packed-struct-test offset-of ] unit-test -[ POSTPONE: PACKED-STRUCT: ] +{ POSTPONE: PACKED-STRUCT: } [ packed-struct-test struct-definer-word ] unit-test STRUCT: struct-1 { a c:int } ; PACKED-STRUCT: struct-1-packed { a c:int } ; UNION-STRUCT: struct-1-union { a c:int } ; -[ "USING: alien.c-types classes.struct ; +{ "USING: alien.c-types classes.struct ; IN: classes.struct.tests STRUCT: struct-1 { a int initial: 0 } ; -" ] +" } [ \ struct-1 [ see ] with-string-writer ] unit-test -[ "USING: alien.c-types classes.struct ; +{ "USING: alien.c-types classes.struct ; IN: classes.struct.tests PACKED-STRUCT: struct-1-packed { a int initial: 0 } ; -" ] +" } [ \ struct-1-packed [ see ] with-string-writer ] unit-test -[ "USING: alien.c-types classes.struct ; +{ "USING: alien.c-types classes.struct ; IN: classes.struct.tests STRUCT: struct-1-union { a int initial: 0 } ; -" ] +" } [ \ struct-1-union [ see ] with-string-writer ] unit-test ! Bug #206 STRUCT: going-to-redefine { a uint } ; -[ ] [ +{ } [ "IN: classes.struct.tests TUPLE: going-to-redefine b ;" eval( -- ) ] unit-test -[ f ] [ \ going-to-redefine \ clone ?lookup-method ] unit-test -[ f ] [ \ going-to-redefine \ struct-slot-values ?lookup-method ] unit-test +{ f } [ \ going-to-redefine \ clone ?lookup-method ] unit-test +{ f } [ \ going-to-redefine \ struct-slot-values ?lookup-method ] unit-test ! Test reset-class on structs, which should forget all the accessors, clone, and struct-slot-values STRUCT: some-accessors { aaa uint } { bbb int } ; -[ ] [ [ \ some-accessors reset-class ] with-compilation-unit ] unit-test -[ f ] [ \ some-accessors \ a>> ?lookup-method ] unit-test -[ f ] [ \ some-accessors \ a<< ?lookup-method ] unit-test -[ f ] [ \ some-accessors \ b>> ?lookup-method ] unit-test -[ f ] [ \ some-accessors \ b<< ?lookup-method ] unit-test -[ f ] [ \ some-accessors \ clone ?lookup-method ] unit-test -[ f ] [ \ some-accessors \ struct-slot-values ?lookup-method ] unit-test +{ } [ [ \ some-accessors reset-class ] with-compilation-unit ] unit-test +{ f } [ \ some-accessors \ a>> ?lookup-method ] unit-test +{ f } [ \ some-accessors \ a<< ?lookup-method ] unit-test +{ f } [ \ some-accessors \ b>> ?lookup-method ] unit-test +{ f } [ \ some-accessors \ b<< ?lookup-method ] unit-test +{ f } [ \ some-accessors \ clone ?lookup-method ] unit-test +{ f } [ \ some-accessors \ struct-slot-values ?lookup-method ] unit-test << \ some-accessors forget >> diff --git a/basis/colors/constants/constants-tests.factor b/basis/colors/constants/constants-tests.factor index 2230cc992a..d13d04caa0 100644 --- a/basis/colors/constants/constants-tests.factor +++ b/basis/colors/constants/constants-tests.factor @@ -3,4 +3,4 @@ USING: tools.test colors.constants colors ; IN: colors.constants.tests -[ t ] [ COLOR: light-green rgba? ] unit-test +{ t } [ COLOR: light-green rgba? ] unit-test diff --git a/basis/colors/hex/hex-tests.factor b/basis/colors/hex/hex-tests.factor index 0ab1fd5216..1dcd53c434 100644 --- a/basis/colors/hex/hex-tests.factor +++ b/basis/colors/hex/hex-tests.factor @@ -5,8 +5,8 @@ USING: colors colors.hex tools.test ; IN: colors.hex.test -[ HEXCOLOR: 000000 ] [ 0.0 0.0 0.0 1.0 ] unit-test -[ HEXCOLOR: FFFFFF ] [ 1.0 1.0 1.0 1.0 ] unit-test -[ HEXCOLOR: abcdef ] [ "abcdef" hex>rgba ] unit-test -[ HEXCOLOR: abcdef ] [ "ABCDEF" hex>rgba ] unit-test -[ "ABCDEF" ] [ HEXCOLOR: abcdef rgba>hex ] unit-test +{ HEXCOLOR: 000000 } [ 0.0 0.0 0.0 1.0 ] unit-test +{ HEXCOLOR: FFFFFF } [ 1.0 1.0 1.0 1.0 ] unit-test +{ HEXCOLOR: abcdef } [ "abcdef" hex>rgba ] unit-test +{ HEXCOLOR: abcdef } [ "ABCDEF" hex>rgba ] unit-test +{ "ABCDEF" } [ HEXCOLOR: abcdef rgba>hex ] unit-test diff --git a/basis/colors/hsv/hsv-tests.factor b/basis/colors/hsv/hsv-tests.factor index 278906ce0e..3f6a4e75b4 100644 --- a/basis/colors/hsv/hsv-tests.factor +++ b/basis/colors/hsv/hsv-tests.factor @@ -5,24 +5,24 @@ IN: colors.hsv.tests [ 360 * ] 2dip 1 >rgba [ red>> ] [ green>> ] [ blue>> ] tri ; -[ 1/2 1/2 1/2 ] [ 0 0 1/2 hsv>rgb ] unit-test +{ 1/2 1/2 1/2 } [ 0 0 1/2 hsv>rgb ] unit-test -[ 1/2 1/4 1/4 ] [ 0 1/2 1/2 hsv>rgb ] unit-test -[ 1/3 2/9 2/9 ] [ 0 1/3 1/3 hsv>rgb ] unit-test +{ 1/2 1/4 1/4 } [ 0 1/2 1/2 hsv>rgb ] unit-test +{ 1/3 2/9 2/9 } [ 0 1/3 1/3 hsv>rgb ] unit-test -[ 24/125 1/5 4/25 ] [ 1/5 1/5 1/5 hsv>rgb ] unit-test -[ 29/180 1/6 5/36 ] [ 1/5 1/6 1/6 hsv>rgb ] unit-test +{ 24/125 1/5 4/25 } [ 1/5 1/5 1/5 hsv>rgb ] unit-test +{ 29/180 1/6 5/36 } [ 1/5 1/6 1/6 hsv>rgb ] unit-test -[ 6/25 2/5 38/125 ] [ 2/5 2/5 2/5 hsv>rgb ] unit-test -[ 8/25 4/5 64/125 ] [ 2/5 3/5 4/5 hsv>rgb ] unit-test +{ 6/25 2/5 38/125 } [ 2/5 2/5 2/5 hsv>rgb ] unit-test +{ 8/25 4/5 64/125 } [ 2/5 3/5 4/5 hsv>rgb ] unit-test -[ 6/25 48/125 3/5 ] [ 3/5 3/5 3/5 hsv>rgb ] unit-test -[ 0 0 0 ] [ 3/5 1/5 0 hsv>rgb ] unit-test +{ 6/25 48/125 3/5 } [ 3/5 3/5 3/5 hsv>rgb ] unit-test +{ 0 0 0 } [ 3/5 1/5 0 hsv>rgb ] unit-test -[ 84/125 4/25 4/5 ] [ 4/5 4/5 4/5 hsv>rgb ] unit-test -[ 7/15 1/3 1/2 ] [ 4/5 1/3 1/2 hsv>rgb ] unit-test +{ 84/125 4/25 4/5 } [ 4/5 4/5 4/5 hsv>rgb ] unit-test +{ 7/15 1/3 1/2 } [ 4/5 1/3 1/2 hsv>rgb ] unit-test -[ 5/6 5/36 5/6 ] [ 5/6 5/6 5/6 hsv>rgb ] unit-test -[ 1/6 0 1/6 ] [ 5/6 1 1/6 hsv>rgb ] unit-test +{ 5/6 5/36 5/6 } [ 5/6 5/6 5/6 hsv>rgb ] unit-test +{ 1/6 0 1/6 } [ 5/6 1 1/6 hsv>rgb ] unit-test -[ 0.5 ] [ 180 0.1 0.2 0.5 alpha>> ] unit-test +{ 0.5 } [ 180 0.1 0.2 0.5 alpha>> ] unit-test diff --git a/basis/combinators/random/random-tests.factor b/basis/combinators/random/random-tests.factor index 32f2874538..46282a3222 100644 --- a/basis/combinators/random/random-tests.factor +++ b/basis/combinators/random/random-tests.factor @@ -3,70 +3,70 @@ USING: tools.test combinators.random combinators.random.private ; IN: combinators.random.tests -[ 1 ] [ 1 [ 1 ] [ 2 ] ifp ] unit-test -[ 2 ] [ 0 [ 1 ] [ 2 ] ifp ] unit-test +{ 1 } [ 1 [ 1 ] [ 2 ] ifp ] unit-test +{ 2 } [ 0 [ 1 ] [ 2 ] ifp ] unit-test -[ 3 ] +{ 3 } [ { { 0 [ 1 ] } { 0 [ 2 ] } { 1 [ 3 ] } [ 4 ] } casep ] unit-test -[ 4 ] +{ 4 } [ { { 0 [ 1 ] } { 0 [ 2 ] } { 0 [ 3 ] } [ 4 ] } casep ] unit-test -[ 1 1 ] [ 1 { +{ 1 1 } [ 1 { { 1 [ 1 ] } { 0 [ 2 ] } { 0 [ 3 ] } [ 4 ] } casep ] unit-test -[ 1 4 ] [ 1 { +{ 1 4 } [ 1 { { 0 [ 1 ] } { 0 [ 2 ] } { 0 [ 3 ] } [ 4 ] } casep ] unit-test -[ 2 ] [ 0.7 { +{ 2 } [ 0.7 { { 0.3 [ 1 ] } { 0.5 [ 2 ] } [ 2 ] } (casep) ] unit-test -[ { { 1/3 [ 1 ] } +{ { { 1/3 [ 1 ] } { 1/3 [ 2 ] } - { 1/3 [ 3 ] } } ] + { 1/3 [ 3 ] } } } [ { [ 1 ] [ 2 ] [ 3 ] } call-random>casep ] unit-test -[ { { 1/2 [ 1 ] } +{ { { 1/2 [ 1 ] } { 1/4 [ 2 ] } - { 1/4 [ 3 ] } } ] + { 1/4 [ 3 ] } } } [ { { 1/2 [ 1 ] } { 1/2 [ 2 ] } { 1 [ 3 ] } } direct>conditional ] unit-test -[ { { 1/2 [ 1 ] } +{ { { 1/2 [ 1 ] } { 1/4 [ 2 ] } - { [ 3 ] } } ] + { [ 3 ] } } } [ { { 1/2 [ 1 ] } { 1/2 [ 2 ] } { [ 3 ] } } direct>conditional ] unit-test -[ f ] [ { { 0.6 [ 1 ] } +{ f } [ { { 0.6 [ 1 ] } { 0.6 [ 2 ] } } good-probabilities? ] unit-test -[ f ] [ { { 0.3 [ 1 ] } +{ f } [ { { 0.3 [ 1 ] } { 0.6 [ 2 ] } } good-probabilities? ] unit-test -[ f ] [ { { -0.6 [ 1 ] } +{ f } [ { { -0.6 [ 1 ] } { 1.4 [ 2 ] } } good-probabilities? ] unit-test -[ f ] [ { { -0.6 [ 1 ] } +{ f } [ { { -0.6 [ 1 ] } [ 2 ] } good-probabilities? ] unit-test -[ t ] [ { { 0.6 [ 1 ] } +{ t } [ { { 0.6 [ 1 ] } [ 2 ] } good-probabilities? ] unit-test -[ t ] [ { { 0.6 [ 1 ] } +{ t } [ { { 0.6 [ 1 ] } { 0.4 [ 2 ] } } good-probabilities? ] unit-test diff --git a/basis/combinators/short-circuit/short-circuit-tests.factor b/basis/combinators/short-circuit/short-circuit-tests.factor index a60922437f..b857a50436 100644 --- a/basis/combinators/short-circuit/short-circuit-tests.factor +++ b/basis/combinators/short-circuit/short-circuit-tests.factor @@ -1,39 +1,39 @@ USING: kernel math tools.test combinators.short-circuit accessors ; IN: combinators.short-circuit.tests -[ 3 ] [ { [ 1 ] [ 2 ] [ 3 ] } 0&& ] unit-test -[ 5 ] [ 3 { [ 0 > ] [ odd? ] [ 2 + ] } 1&& ] unit-test -[ 30 ] [ 10 20 { [ + 0 > ] [ - even? ] [ + ] } 2&& ] unit-test +{ 3 } [ { [ 1 ] [ 2 ] [ 3 ] } 0&& ] unit-test +{ 5 } [ 3 { [ 0 > ] [ odd? ] [ 2 + ] } 1&& ] unit-test +{ 30 } [ 10 20 { [ + 0 > ] [ - even? ] [ + ] } 2&& ] unit-test -[ f ] [ { [ 1 ] [ f ] [ 3 ] } 0&& ] unit-test -[ f ] [ 3 { [ 0 > ] [ even? ] [ 2 + ] } 1&& ] unit-test -[ f ] [ 10 20 { [ + 0 > ] [ - odd? ] [ + ] } 2&& ] unit-test +{ f } [ { [ 1 ] [ f ] [ 3 ] } 0&& ] unit-test +{ f } [ 3 { [ 0 > ] [ even? ] [ 2 + ] } 1&& ] unit-test +{ f } [ 10 20 { [ + 0 > ] [ - odd? ] [ + ] } 2&& ] unit-test -[ "factor" ] [ { [ 10 0 < ] [ f ] [ "factor" ] } 0|| ] unit-test -[ 11 ] [ 10 { [ odd? ] [ 100 > ] [ 1 + ] } 1|| ] unit-test -[ 30 ] [ 10 20 { [ + odd? ] [ + 100 > ] [ + ] } 2|| ] unit-test -[ f ] [ { [ 10 0 < ] [ f ] [ 0 1 = ] } 0|| ] unit-test +{ "factor" } [ { [ 10 0 < ] [ f ] [ "factor" ] } 0|| ] unit-test +{ 11 } [ 10 { [ odd? ] [ 100 > ] [ 1 + ] } 1|| ] unit-test +{ 30 } [ 10 20 { [ + odd? ] [ + 100 > ] [ + ] } 2|| ] unit-test +{ f } [ { [ 10 0 < ] [ f ] [ 0 1 = ] } 0|| ] unit-test : compiled-&& ( a -- ? ) { [ 0 > ] [ even? ] [ 2 + ] } 1&& ; -[ f ] [ 3 compiled-&& ] unit-test -[ 4 ] [ 2 compiled-&& ] unit-test +{ f } [ 3 compiled-&& ] unit-test +{ 4 } [ 2 compiled-&& ] unit-test : compiled-|| ( a b -- ? ) { [ + odd? ] [ + 100 > ] [ + ] } 2|| ; -[ 30 ] [ 10 20 compiled-|| ] unit-test -[ 2 ] [ 1 1 compiled-|| ] unit-test +{ 30 } [ 10 20 compiled-|| ] unit-test +{ 2 } [ 1 1 compiled-|| ] unit-test ! && and || should be row-polymorphic both when compiled and when interpreted : row-&& ( -- ? ) f t { [ drop dup ] } 1&& nip ; -[ f ] [ row-&& ] unit-test -[ f ] [ \ row-&& def>> call ] unit-test +{ f } [ row-&& ] unit-test +{ f } [ \ row-&& def>> call ] unit-test : row-|| ( -- ? ) f t { [ drop dup ] } 1|| nip ; -[ f ] [ row-|| ] unit-test -[ f ] [ \ row-|| def>> call ] unit-test +{ f } [ row-|| ] unit-test +{ f } [ \ row-|| def>> call ] unit-test diff --git a/basis/combinators/short-circuit/smart/smart-tests.factor b/basis/combinators/short-circuit/smart/smart-tests.factor index c8cf8ffc1b..268b8120a0 100644 --- a/basis/combinators/short-circuit/smart/smart-tests.factor +++ b/basis/combinators/short-circuit/smart/smart-tests.factor @@ -1,18 +1,18 @@ USING: kernel math tools.test combinators.short-circuit.smart ; IN: combinators.short-circuit.smart.tests -[ t ] [ { [ 1 ] [ 2 ] [ 3 ] } && 3 = ] unit-test -[ t ] [ 3 { [ 0 > ] [ odd? ] [ 2 + ] } && 5 = ] unit-test -[ t ] [ 10 20 { [ + 0 > ] [ - even? ] [ + ] } && 30 = ] unit-test +{ t } [ { [ 1 ] [ 2 ] [ 3 ] } && 3 = ] unit-test +{ t } [ 3 { [ 0 > ] [ odd? ] [ 2 + ] } && 5 = ] unit-test +{ t } [ 10 20 { [ + 0 > ] [ - even? ] [ + ] } && 30 = ] unit-test -[ f ] [ { [ 1 ] [ f ] [ 3 ] } && 3 = ] unit-test -[ f ] [ 3 { [ 0 > ] [ even? ] [ 2 + ] } && ] unit-test -[ f ] [ 10 20 { [ + 0 > ] [ - odd? ] [ + ] } && 30 = ] unit-test +{ f } [ { [ 1 ] [ f ] [ 3 ] } && 3 = ] unit-test +{ f } [ 3 { [ 0 > ] [ even? ] [ 2 + ] } && ] unit-test +{ f } [ 10 20 { [ + 0 > ] [ - odd? ] [ + ] } && 30 = ] unit-test -[ t ] [ { [ 10 0 < ] [ f ] [ "factor" ] } || "factor" = ] unit-test +{ t } [ { [ 10 0 < ] [ f ] [ "factor" ] } || "factor" = ] unit-test -[ t ] [ 10 { [ odd? ] [ 100 > ] [ 1 + ] } || 11 = ] unit-test +{ t } [ 10 { [ odd? ] [ 100 > ] [ 1 + ] } || 11 = ] unit-test -[ t ] [ 10 20 { [ + odd? ] [ + 100 > ] [ + ] } || 30 = ] unit-test +{ t } [ 10 20 { [ + odd? ] [ + 100 > ] [ + ] } || 30 = ] unit-test -[ f ] [ { [ 10 0 < ] [ f ] [ 0 1 = ] } || ] unit-test +{ f } [ { [ 10 0 < ] [ f ] [ 0 1 = ] } || ] unit-test diff --git a/basis/combinators/smart/smart-tests.factor b/basis/combinators/smart/smart-tests.factor index dd803bb2a0..33523a0154 100644 --- a/basis/combinators/smart/smart-tests.factor +++ b/basis/combinators/smart/smart-tests.factor @@ -8,33 +8,33 @@ IN: combinators.smart.tests 10 [ 1 - ] [ 1 + ] bi ; [ [ test-bi ] output>array ] must-infer -[ { 9 11 } ] [ [ test-bi ] output>array ] unit-test +{ { 9 11 } } [ [ test-bi ] output>array ] unit-test [ { 9 11 } [ + ] input> must-infer -[ { { 1 2 } { 3 4 } } ] [ nested-smart-combo-test ] unit-test +{ { { 1 2 } { 3 4 } } } [ nested-smart-combo-test ] unit-test -[ 14 ] [ [ 1 2 3 ] [ sq ] [ + ] map-reduce-outputs ] unit-test +{ 14 } [ [ 1 2 3 ] [ sq ] [ + ] map-reduce-outputs ] unit-test { 2 3 } [ [ + ] preserving ] must-infer-as @@ -58,34 +58,34 @@ IN: combinators.smart.tests : smart-if-test ( a b -- b ) [ < ] [ swap - ] [ - ] smart-if ; -[ 7 ] [ 10 3 smart-if-test ] unit-test -[ 16 ] [ 25 41 smart-if-test ] unit-test +{ 7 } [ 10 3 smart-if-test ] unit-test +{ 16 } [ 25 41 smart-if-test ] unit-test -[ { 1 2 } { 3 4 } { 5 6 } ] [ 1 2 3 4 5 6 [ 2array ] 3 smart-apply ] unit-test -[ { 1 2 3 } { 4 5 6 } ] [ 1 2 3 4 5 6 [ 3array ] 2 smart-apply ] unit-test +{ { 1 2 } { 3 4 } { 5 6 } } [ 1 2 3 4 5 6 [ 2array ] 3 smart-apply ] unit-test +{ { 1 2 3 } { 4 5 6 } } [ 1 2 3 4 5 6 [ 3array ] 2 smart-apply ] unit-test -[ 4 ] [ 2 [ even? ] [ 2 + ] smart-when ] unit-test -[ 3 ] [ 3 [ even? ] [ 2 + ] smart-when ] unit-test -[ 4 ] [ 2 [ odd? ] [ 2 + ] smart-unless ] unit-test -[ 3 ] [ 3 [ odd? ] [ 2 + ] smart-unless ] unit-test +{ 4 } [ 2 [ even? ] [ 2 + ] smart-when ] unit-test +{ 3 } [ 3 [ even? ] [ 2 + ] smart-when ] unit-test +{ 4 } [ 2 [ odd? ] [ 2 + ] smart-unless ] unit-test +{ 3 } [ 3 [ odd? ] [ 2 + ] smart-unless ] unit-test -[ 4 ] [ 2 [ even? ] [ 2 + ] smart-when* ] unit-test -[ ] [ 3 [ even? ] [ 2 + ] smart-when* ] unit-test -[ 3 ] [ 2 [ odd? ] [ 3 ] smart-unless* ] unit-test -[ 3 ] [ 3 [ odd? ] [ 5 ] smart-unless* ] unit-test +{ 4 } [ 2 [ even? ] [ 2 + ] smart-when* ] unit-test +{ } [ 3 [ even? ] [ 2 + ] smart-when* ] unit-test +{ 3 } [ 2 [ odd? ] [ 3 ] smart-unless* ] unit-test +{ 3 } [ 3 [ odd? ] [ 5 ] smart-unless* ] unit-test -[ -1 ] [ 1 2 [ + odd? ] [ - ] smart-when* ] unit-test -[ ] [ 2 2 [ + odd? ] [ ] smart-unless* ] unit-test +{ -1 } [ 1 2 [ + odd? ] [ - ] smart-when* ] unit-test +{ } [ 2 2 [ + odd? ] [ ] smart-unless* ] unit-test -[ ( -- x ) ] [ [ [ ] [ call ] curry output>array ] infer ] unit-test +{ ( -- x ) } [ [ [ ] [ call ] curry output>array ] infer ] unit-test :: map-reduce-test ( a b c -- d ) [ a b c ] [ a - ] [ b * + ] map-reduce-outputs ; -[ 10 ] [ 1 2 3 map-reduce-test ] unit-test +{ 10 } [ 1 2 3 map-reduce-test ] unit-test -[ ( x x -- x ) ] [ [ curry inputs ] infer ] unit-test +{ ( x x -- x ) } [ [ curry inputs ] infer ] unit-test -[ ( x -- x ) ] [ [ [ curry ] curry inputs ] infer ] unit-test +{ ( x -- x ) } [ [ [ curry ] curry inputs ] infer ] unit-test { 1 1 1 } [ 1 3 [ ] smart-with times ] unit-test { "BCD" } [ 1 "ABC" [ + ] smart-with map ] unit-test diff --git a/basis/compiler/cfg/alias-analysis/alias-analysis-tests.factor b/basis/compiler/cfg/alias-analysis/alias-analysis-tests.factor index 21241e6f4a..498788721e 100644 --- a/basis/compiler/cfg/alias-analysis/alias-analysis-tests.factor +++ b/basis/compiler/cfg/alias-analysis/alias-analysis-tests.factor @@ -10,13 +10,13 @@ IN: compiler.cfg.alias-analysis.tests [ f >>insn# ] map ; ! Redundant load elimination -[ +{ V{ T{ ##peek f 0 D 0 } T{ ##slot-imm f 1 0 1 0 } T{ ##copy f 2 1 any-rep } } -] [ +} [ V{ T{ ##peek f 0 D 0 } T{ ##slot-imm f 1 0 1 0 } @@ -25,14 +25,14 @@ IN: compiler.cfg.alias-analysis.tests ] unit-test ! Store-load forwarding -[ +{ V{ T{ ##peek f 0 D 0 } T{ ##peek f 1 D 1 } T{ ##set-slot-imm f 1 0 1 0 } T{ ##copy f 2 1 any-rep } } -] [ +} [ V{ T{ ##peek f 0 D 0 } T{ ##peek f 1 D 1 } @@ -42,14 +42,14 @@ IN: compiler.cfg.alias-analysis.tests ] unit-test ! Dead store elimination -[ +{ V{ T{ ##peek f 0 D 0 } T{ ##peek f 1 D 1 } T{ ##peek f 2 D 2 } T{ ##set-slot-imm f 2 0 1 0 } } -] [ +} [ V{ T{ ##peek f 0 D 0 } T{ ##peek f 1 D 1 } @@ -59,7 +59,7 @@ IN: compiler.cfg.alias-analysis.tests } test-alias-analysis ] unit-test -[ +{ V{ T{ ##peek f 0 D 0 } T{ ##peek f 1 D 1 } @@ -67,7 +67,7 @@ IN: compiler.cfg.alias-analysis.tests T{ ##peek f 3 D 3 } T{ ##set-slot-imm f 3 0 1 0 } } -] [ +} [ V{ T{ ##peek f 0 D 0 } T{ ##peek f 1 D 1 } @@ -80,12 +80,12 @@ IN: compiler.cfg.alias-analysis.tests ] unit-test ! Redundant store elimination -[ +{ V{ T{ ##peek f 0 D 0 } T{ ##slot-imm f 1 0 1 0 } } -] [ +} [ V{ T{ ##peek f 0 D 0 } T{ ##slot-imm f 1 0 1 0 } @@ -93,13 +93,13 @@ IN: compiler.cfg.alias-analysis.tests } test-alias-analysis ] unit-test -[ +{ V{ T{ ##peek f 0 D 0 } T{ ##slot-imm f 1 0 1 0 } T{ ##copy f 2 1 any-rep } } -] [ +} [ V{ T{ ##peek f 0 D 0 } T{ ##slot-imm f 1 0 1 0 } @@ -109,7 +109,7 @@ IN: compiler.cfg.alias-analysis.tests ] unit-test ! Not a redundant load -[ +{ V{ T{ ##peek f 0 D 0 } T{ ##peek f 1 D 1 } @@ -117,7 +117,7 @@ IN: compiler.cfg.alias-analysis.tests T{ ##set-slot-imm f 0 1 1 0 } T{ ##slot-imm f 2 0 1 0 } } -] [ +} [ V{ T{ ##peek f 0 D 0 } T{ ##peek f 1 D 1 } @@ -128,7 +128,7 @@ IN: compiler.cfg.alias-analysis.tests ] unit-test ! Not a redundant store -[ +{ V{ T{ ##peek f 0 D 0 } T{ ##peek f 1 D 1 } @@ -138,7 +138,7 @@ IN: compiler.cfg.alias-analysis.tests T{ ##slot-imm f 4 0 1 0 } T{ ##set-slot-imm f 3 1 1 0 } } -] [ +} [ V{ T{ ##peek f 0 D 0 } T{ ##peek f 1 D 1 } @@ -151,7 +151,7 @@ IN: compiler.cfg.alias-analysis.tests ] unit-test ! There's a redundant load, but not a redundant store -[ +{ V{ T{ ##peek f 0 D 0 } T{ ##peek f 1 D 1 } @@ -163,7 +163,7 @@ IN: compiler.cfg.alias-analysis.tests T{ ##set-slot-imm f 3 0 1 0 } T{ ##copy f 6 3 any-rep } } -] [ +} [ V{ T{ ##peek f 0 D 0 } T{ ##peek f 1 D 1 } @@ -180,7 +180,7 @@ IN: compiler.cfg.alias-analysis.tests ! Fresh allocations don't alias existing values ! Redundant load elimination -[ +{ V{ T{ ##peek f 1 D 1 } T{ ##peek f 2 D 2 } @@ -190,7 +190,7 @@ IN: compiler.cfg.alias-analysis.tests T{ ##set-slot-imm f 2 1 1 0 } T{ ##copy f 5 3 any-rep } } -] [ +} [ V{ T{ ##peek f 1 D 1 } T{ ##peek f 2 D 2 } @@ -203,7 +203,7 @@ IN: compiler.cfg.alias-analysis.tests ] unit-test ! Redundant store elimination -[ +{ V{ T{ ##peek f 1 D 1 } T{ ##peek f 2 D 2 } @@ -212,7 +212,7 @@ IN: compiler.cfg.alias-analysis.tests T{ ##slot-imm f 5 1 1 0 } T{ ##set-slot-imm f 3 4 1 0 } } -] [ +} [ V{ T{ ##peek f 1 D 1 } T{ ##peek f 2 D 2 } @@ -226,7 +226,7 @@ IN: compiler.cfg.alias-analysis.tests ! Storing a new alias class into another object means that heap-ac ! can now alias the new ac -[ +{ V{ T{ ##peek f 0 D 0 } T{ ##peek f 1 D 1 } @@ -239,7 +239,7 @@ IN: compiler.cfg.alias-analysis.tests T{ ##set-slot-imm f 1 5 1 0 } T{ ##slot-imm f 6 4 1 0 } } -] [ +} [ V{ T{ ##peek f 0 D 0 } T{ ##peek f 1 D 1 } @@ -255,13 +255,13 @@ IN: compiler.cfg.alias-analysis.tests ] unit-test ! Compares between objects which cannot alias are eliminated -[ +{ V{ T{ ##peek f 0 D 0 } T{ ##allot f 1 16 array } T{ ##load-reference f 2 f } } -] [ +} [ V{ T{ ##peek f 0 D 0 } T{ ##allot f 1 16 array } @@ -270,7 +270,7 @@ IN: compiler.cfg.alias-analysis.tests ] unit-test ! Make sure that input to ##box-displaced-alien becomes heap-ac -[ +{ V{ T{ ##allot f 1 16 byte-array } T{ ##load-reference f 2 10 } @@ -278,7 +278,7 @@ IN: compiler.cfg.alias-analysis.tests T{ ##slot-imm f 5 3 1 $[ alien type-number ] } T{ ##compare f 6 5 1 cc= } } -] [ +} [ V{ T{ ##allot f 1 16 byte-array } T{ ##load-reference f 2 10 } @@ -290,14 +290,14 @@ IN: compiler.cfg.alias-analysis.tests ! We can't make any assumptions about heap-ac between ! instructions which can call back into Factor code -[ +{ V{ T{ ##peek f 0 D 0 } T{ ##slot-imm f 1 0 1 0 } T{ ##alien-invoke f { } { } { } { } 0 0 "free" } T{ ##slot-imm f 2 0 1 0 } } -] [ +} [ V{ T{ ##peek f 0 D 0 } T{ ##slot-imm f 1 0 1 0 } @@ -306,7 +306,7 @@ IN: compiler.cfg.alias-analysis.tests } test-alias-analysis ] unit-test -[ +{ V{ T{ ##peek f 0 D 0 } T{ ##peek f 1 D 1 } @@ -314,7 +314,7 @@ IN: compiler.cfg.alias-analysis.tests T{ ##alien-invoke f { } { } { } { } 0 0 "free" } T{ ##slot-imm f 2 0 1 0 } } -] [ +} [ V{ T{ ##peek f 0 D 0 } T{ ##peek f 1 D 1 } @@ -324,7 +324,7 @@ IN: compiler.cfg.alias-analysis.tests } test-alias-analysis ] unit-test -[ +{ V{ T{ ##peek f 0 D 0 } T{ ##peek f 1 D 1 } @@ -333,7 +333,7 @@ IN: compiler.cfg.alias-analysis.tests T{ ##alien-invoke f { } { } { } { } 0 0 "free" } T{ ##set-slot-imm f 2 0 1 0 } } -] [ +} [ V{ T{ ##peek f 0 D 0 } T{ ##peek f 1 D 1 } @@ -344,14 +344,14 @@ IN: compiler.cfg.alias-analysis.tests } test-alias-analysis ] unit-test -[ +{ V{ T{ ##peek f 0 D 0 } T{ ##slot-imm f 1 0 1 0 } T{ ##alien-invoke f { } { } { } { } 0 0 "free" } T{ ##set-slot-imm f 1 0 1 0 } } -] [ +} [ V{ T{ ##peek f 0 D 0 } T{ ##slot-imm f 1 0 1 0 } @@ -362,14 +362,14 @@ IN: compiler.cfg.alias-analysis.tests ! We can't eliminate stores on any alias class across a GC-ing ! instruction -[ +{ V{ T{ ##allot f 0 } T{ ##slot-imm f 1 0 1 0 } T{ ##alien-invoke f { } { } { } { } 0 0 "free" } T{ ##copy f 2 1 any-rep } } -] [ +} [ V{ T{ ##allot f 0 } T{ ##slot-imm f 1 0 1 0 } @@ -378,7 +378,7 @@ IN: compiler.cfg.alias-analysis.tests } test-alias-analysis ] unit-test -[ +{ V{ T{ ##allot f 0 } T{ ##peek f 1 D 1 } @@ -386,7 +386,7 @@ IN: compiler.cfg.alias-analysis.tests T{ ##alien-invoke f { } { } { } { } 0 0 "free" } T{ ##copy f 2 1 any-rep } } -] [ +} [ V{ T{ ##allot f 0 } T{ ##peek f 1 D 1 } @@ -396,7 +396,7 @@ IN: compiler.cfg.alias-analysis.tests } test-alias-analysis ] unit-test -[ +{ V{ T{ ##allot f 0 } T{ ##peek f 1 D 1 } @@ -405,7 +405,7 @@ IN: compiler.cfg.alias-analysis.tests T{ ##alien-invoke f { } { } { } { } 0 0 "free" } T{ ##set-slot-imm f 2 0 1 0 } } -] [ +} [ V{ T{ ##allot f 0 } T{ ##peek f 1 D 1 } @@ -416,13 +416,13 @@ IN: compiler.cfg.alias-analysis.tests } test-alias-analysis ] unit-test -[ +{ V{ T{ ##allot f 0 } T{ ##slot-imm f 1 0 1 0 } T{ ##alien-invoke f { } { } { } { } 0 0 "free" } } -] [ +} [ V{ T{ ##allot f 0 } T{ ##slot-imm f 1 0 1 0 } @@ -433,13 +433,13 @@ IN: compiler.cfg.alias-analysis.tests ! Make sure that gc-map-insns which are also vreg-insns are ! handled properly -[ +{ V{ T{ ##allot f 0 } T{ ##alien-indirect f { } { } { { 2 double-rep 0 } } { } 0 0 "free" } T{ ##set-slot-imm f 2 0 1 0 } } -] [ +} [ V{ T{ ##allot f 0 } T{ ##alien-indirect f { } { } { { 2 double-rep 0 } } { } 0 0 "free" } diff --git a/basis/compiler/cfg/branch-splitting/branch-splitting-tests.factor b/basis/compiler/cfg/branch-splitting/branch-splitting-tests.factor index 4c29a1c613..0b15d96dd7 100644 --- a/basis/compiler/cfg/branch-splitting/branch-splitting-tests.factor +++ b/basis/compiler/cfg/branch-splitting/branch-splitting-tests.factor @@ -30,7 +30,7 @@ V{ T{ ##branch } } 4 test-bb test-diamond -[ ] [ test-branch-splitting ] unit-test +{ } [ test-branch-splitting ] unit-test V{ T{ ##branch } } 0 test-bb @@ -50,7 +50,7 @@ V{ T{ ##branch } } 5 test-bb 2 { 3 4 } edges -[ ] [ test-branch-splitting ] unit-test +{ } [ test-branch-splitting ] unit-test V{ T{ ##branch } } 0 test-bb @@ -68,7 +68,7 @@ V{ T{ ##branch } } 4 test-bb 2 4 edge -[ ] [ test-branch-splitting ] unit-test +{ } [ test-branch-splitting ] unit-test V{ T{ ##branch } } 0 test-bb @@ -80,4 +80,4 @@ V{ T{ ##branch } } 2 test-bb 1 2 edge -[ ] [ test-branch-splitting ] unit-test +{ } [ test-branch-splitting ] unit-test diff --git a/basis/compiler/cfg/builder/builder-tests.factor b/basis/compiler/cfg/builder/builder-tests.factor index 90b0c29cb0..08dca71700 100644 --- a/basis/compiler/cfg/builder/builder-tests.factor +++ b/basis/compiler/cfg/builder/builder-tests.factor @@ -167,42 +167,42 @@ IN: compiler.cfg.builder.tests { pinned-c-ptr class fixnum } \ set-alien-cell '[ _ declare _ execute ] unit-test-builder ] each -[ t ] [ [ swap ] [ ##replace? ] contains-insn? ] unit-test +{ t } [ [ swap ] [ ##replace? ] contains-insn? ] unit-test -[ f ] [ [ swap swap ] [ ##replace? ] contains-insn? ] unit-test +{ f } [ [ swap swap ] [ ##replace? ] contains-insn? ] unit-test -[ t ] [ +{ t } [ [ { fixnum byte-array fixnum } declare set-alien-unsigned-1 ] [ [ ##store-memory? ] [ ##store-memory-imm? ] bi or ] contains-insn? ] unit-test -[ t ] [ +{ t } [ [ { fixnum byte-array fixnum } declare [ dup * dup * ] 2dip set-alien-unsigned-1 ] [ [ ##store-memory? ] [ ##store-memory-imm? ] bi or ] contains-insn? ] unit-test -[ f ] [ +{ f } [ [ { byte-array fixnum } declare set-alien-unsigned-1 ] [ [ ##store-memory? ] [ ##store-memory-imm? ] bi or ] contains-insn? ] unit-test -[ t t ] [ +{ t t } [ [ { byte-array fixnum } declare alien-cell ] [ [ [ ##load-memory? ] [ ##load-memory-imm? ] bi or ] contains-insn? ] [ [ ##box-alien? ] contains-insn? ] bi ] unit-test -[ f ] [ +{ f } [ [ { byte-array integer } declare alien-cell ] [ [ ##load-memory? ] [ ##load-memory-imm? ] bi or ] contains-insn? ] unit-test -[ f ] [ +{ f } [ [ 1000 [ ] times ] [ ##peek? ] contains-insn? ] unit-test -[ f t ] [ +{ f t } [ [ { fixnum alien } declare 0 alien-cell ] [ [ ##unbox-any-c-ptr? ] contains-insn? ] [ [ ##unbox-alien? ] contains-insn? ] bi @@ -225,13 +225,13 @@ IN: compiler.cfg.builder.tests ] when ! Regression. Make sure everything is inlined correctly -[ f ] [ M\ hashtable set-at [ { [ ##call? ] [ word>> \ set-slot eq? ] } 1&& ] contains-insn? ] unit-test +{ f } [ M\ hashtable set-at [ { [ ##call? ] [ word>> \ set-slot eq? ] } 1&& ] contains-insn? ] unit-test ! Regression. Make sure branch splitting works. -[ 2 ] [ [ 1 2 ? ] [ ##return? ] count-insns ] unit-test +{ 2 } [ [ 1 2 ? ] [ ##return? ] count-insns ] unit-test ! Make sure fast union predicates don't have conditionals. -[ f ] [ +{ f } [ [ tag 1 swap fixnum-shift-fast ] [ ##compare-integer-imm-branch? ] contains-insn? ] unit-test diff --git a/basis/compiler/cfg/copy-prop/copy-prop-tests.factor b/basis/compiler/cfg/copy-prop/copy-prop-tests.factor index 2e4fd73a4d..e0d0cd40e0 100644 --- a/basis/compiler/cfg/copy-prop/copy-prop-tests.factor +++ b/basis/compiler/cfg/copy-prop/copy-prop-tests.factor @@ -53,16 +53,16 @@ V{ 3 4 edge 4 5 edge -[ ] [ test-copy-propagation ] unit-test +{ } [ test-copy-propagation ] unit-test -[ +{ V{ T{ ##replace f 0 D 0 } T{ ##replace f 4 D 1 } T{ ##replace f 4 D 2 } T{ ##branch } } -] [ 5 get instructions>> ] unit-test +} [ 5 get instructions>> ] unit-test ! Test optimistic assumption V{ @@ -96,11 +96,11 @@ V{ 2 { 2 3 } edges 3 4 edge -[ ] [ test-copy-propagation ] unit-test +{ } [ test-copy-propagation ] unit-test -[ +{ V{ T{ ##replace f 0 D 1 } T{ ##branch } } -] [ 3 get instructions>> ] unit-test +} [ 3 get instructions>> ] unit-test diff --git a/basis/compiler/cfg/dce/dce-tests.factor b/basis/compiler/cfg/dce/dce-tests.factor index 53f25a4377..5f02475898 100644 --- a/basis/compiler/cfg/dce/dce-tests.factor +++ b/basis/compiler/cfg/dce/dce-tests.factor @@ -7,61 +7,61 @@ IN: compiler.cfg.dce.tests : test-dce ( insns -- insns' ) insns>cfg dup eliminate-dead-code entry>> instructions>> ; -[ V{ +{ V{ T{ ##load-integer { dst 1 } { val 8 } } T{ ##load-integer { dst 2 } { val 16 } } T{ ##add { dst 3 } { src1 1 } { src2 2 } } T{ ##replace { src 3 } { loc D 0 } } -} ] [ V{ +} } [ V{ T{ ##load-integer { dst 1 } { val 8 } } T{ ##load-integer { dst 2 } { val 16 } } T{ ##add { dst 3 } { src1 1 } { src2 2 } } T{ ##replace { src 3 } { loc D 0 } } } test-dce ] unit-test -[ V{ } ] [ V{ +{ V{ } } [ V{ T{ ##load-integer { dst 1 } { val 8 } } T{ ##load-integer { dst 2 } { val 16 } } T{ ##add { dst 3 } { src1 1 } { src2 2 } } } test-dce ] unit-test -[ V{ } ] [ V{ +{ V{ } } [ V{ T{ ##load-integer { dst 3 } { val 8 } } T{ ##allot { dst 1 } { temp 2 } } } test-dce ] unit-test -[ V{ } ] [ V{ +{ V{ } } [ V{ T{ ##load-integer { dst 3 } { val 8 } } T{ ##allot { dst 1 } { temp 2 } } T{ ##set-slot-imm { obj 1 } { src 3 } } } test-dce ] unit-test -[ V{ +{ V{ T{ ##load-integer { dst 3 } { val 8 } } T{ ##allot { dst 1 } { temp 2 } } T{ ##set-slot-imm { obj 1 } { src 3 } } T{ ##replace { src 1 } { loc D 0 } } -} ] [ V{ +} } [ V{ T{ ##load-integer { dst 3 } { val 8 } } T{ ##allot { dst 1 } { temp 2 } } T{ ##set-slot-imm { obj 1 } { src 3 } } T{ ##replace { src 1 } { loc D 0 } } } test-dce ] unit-test -[ V{ +{ V{ T{ ##allot { dst 1 } { temp 2 } } T{ ##replace { src 1 } { loc D 0 } } -} ] [ V{ +} } [ V{ T{ ##allot { dst 1 } { temp 2 } } T{ ##replace { src 1 } { loc D 0 } } } test-dce ] unit-test -[ V{ +{ V{ T{ ##allot { dst 1 } { temp 2 } } T{ ##replace { src 1 } { loc D 0 } } T{ ##load-integer { dst 3 } { val 8 } } T{ ##set-slot-imm { obj 1 } { src 3 } } -} ] [ V{ +} } [ V{ T{ ##allot { dst 1 } { temp 2 } } T{ ##replace { src 1 } { loc D 0 } } T{ ##load-integer { dst 3 } { val 8 } } diff --git a/basis/compiler/cfg/def-use/def-use-tests.factor b/basis/compiler/cfg/def-use/def-use-tests.factor index de5bf335b6..4cdad67977 100644 --- a/basis/compiler/cfg/def-use/def-use-tests.factor +++ b/basis/compiler/cfg/def-use/def-use-tests.factor @@ -37,4 +37,4 @@ V{ 5 6 edge 1 get block>cfg 0 set -[ ] [ 0 get compute-defs ] unit-test +{ } [ 0 get compute-defs ] unit-test diff --git a/basis/compiler/cfg/dominance/dominance-tests.factor b/basis/compiler/cfg/dominance/dominance-tests.factor index 0bcdd43a7e..01d1d34752 100644 --- a/basis/compiler/cfg/dominance/dominance-tests.factor +++ b/basis/compiler/cfg/dominance/dominance-tests.factor @@ -21,22 +21,22 @@ V{ } 5 test-bb 3 4 edge 4 5 edge -[ ] [ test-dominance ] unit-test +{ } [ test-dominance ] unit-test -[ t ] [ 0 get dom-parent 0 get eq? ] unit-test -[ t ] [ 1 get dom-parent 0 get eq? ] unit-test -[ t ] [ 2 get dom-parent 0 get eq? ] unit-test -[ t ] [ 4 get dom-parent 0 get eq? ] unit-test -[ t ] [ 3 get dom-parent 1 get eq? ] unit-test -[ t ] [ 5 get dom-parent 4 get eq? ] unit-test +{ t } [ 0 get dom-parent 0 get eq? ] unit-test +{ t } [ 1 get dom-parent 0 get eq? ] unit-test +{ t } [ 2 get dom-parent 0 get eq? ] unit-test +{ t } [ 4 get dom-parent 0 get eq? ] unit-test +{ t } [ 3 get dom-parent 1 get eq? ] unit-test +{ t } [ 5 get dom-parent 4 get eq? ] unit-test -[ t ] [ 0 get dom-children 1 get 2 get 4 get 3array set= ] unit-test +{ t } [ 0 get dom-children 1 get 2 get 4 get 3array set= ] unit-test -[ t ] [ 0 get 3 get dominates? ] unit-test -[ f ] [ 3 get 4 get dominates? ] unit-test -[ f ] [ 1 get 4 get dominates? ] unit-test -[ t ] [ 4 get 5 get dominates? ] unit-test -[ f ] [ 1 get 5 get dominates? ] unit-test +{ t } [ 0 get 3 get dominates? ] unit-test +{ f } [ 3 get 4 get dominates? ] unit-test +{ f } [ 1 get 4 get dominates? ] unit-test +{ t } [ 4 get 5 get dominates? ] unit-test +{ f } [ 1 get 5 get dominates? ] unit-test ! Example from the paper V{ } 0 test-bb @@ -51,9 +51,9 @@ V{ } 4 test-bb 3 4 edge 4 3 edge -[ ] [ test-dominance ] unit-test +{ } [ test-dominance ] unit-test -[ t ] [ 0 4 [a,b] [ get dom-parent 0 get eq? ] all? ] unit-test +{ t } [ 0 4 [a,b] [ get dom-parent 0 get eq? ] all? ] unit-test ! The other example from the paper V{ } 0 test-bb @@ -70,9 +70,9 @@ V{ } 5 test-bb 4 { 5 3 } edges 3 4 edge -[ ] [ test-dominance ] unit-test +{ } [ test-dominance ] unit-test -[ t ] [ 0 5 [a,b] [ get dom-parent 0 get eq? ] all? ] unit-test +{ t } [ 0 5 [a,b] [ get dom-parent 0 get eq? ] all? ] unit-test : non-det-test ( -- cfg ) 9 iota [ V{ } clone over insns>block ] { } map>assoc dup diff --git a/basis/compiler/cfg/gc-checks/gc-checks-tests.factor b/basis/compiler/cfg/gc-checks/gc-checks-tests.factor index df8663d711..4117f4e661 100644 --- a/basis/compiler/cfg/gc-checks/gc-checks-tests.factor +++ b/basis/compiler/cfg/gc-checks/gc-checks-tests.factor @@ -59,7 +59,7 @@ IN: compiler.cfg.gc-checks.tests ] cfg-unit-test ! gc-check-offsets -[ { } ] [ +{ { } } [ V{ T{ ##inc } T{ ##peek } @@ -68,7 +68,7 @@ IN: compiler.cfg.gc-checks.tests } gc-check-offsets ] unit-test -[ { } ] [ +{ { } } [ V{ T{ ##inc } T{ ##peek } @@ -78,7 +78,7 @@ IN: compiler.cfg.gc-checks.tests } gc-check-offsets ] unit-test -[ { 0 } ] [ +{ { 0 } } [ V{ T{ ##inc } T{ ##peek } @@ -89,7 +89,7 @@ IN: compiler.cfg.gc-checks.tests } gc-check-offsets ] unit-test -[ { 0 } ] [ +{ { 0 } } [ V{ T{ ##inc } T{ ##peek } @@ -100,7 +100,7 @@ IN: compiler.cfg.gc-checks.tests } gc-check-offsets ] unit-test -[ { 0 4 } ] [ +{ { 0 4 } } [ V{ T{ ##inc } T{ ##peek } @@ -113,7 +113,7 @@ IN: compiler.cfg.gc-checks.tests } gc-check-offsets ] unit-test -[ { 3 } ] [ +{ { 3 } } [ V{ T{ ##inc } T{ ##peek } @@ -124,15 +124,15 @@ IN: compiler.cfg.gc-checks.tests } gc-check-offsets ] unit-test -[ { { "a" } } ] [ { "a" } { } split-instructions ] unit-test +{ { { "a" } } } [ { "a" } { } split-instructions ] unit-test -[ { { } { "a" } } ] [ { "a" } { 0 } split-instructions ] unit-test +{ { { } { "a" } } } [ { "a" } { 0 } split-instructions ] unit-test -[ { { "a" } { } } ] [ { "a" } { 1 } split-instructions ] unit-test +{ { { "a" } { } } } [ { "a" } { 1 } split-instructions ] unit-test -[ { { "a" } { "b" } } ] [ { "a" "b" } { 1 } split-instructions ] unit-test +{ { { "a" } { "b" } } } [ { "a" "b" } { 1 } split-instructions ] unit-test -[ { { } { "a" } { "b" "c" } } ] [ { "a" "b" "c" } { 0 1 } split-instructions ] unit-test +{ { { } { "a" } { "b" "c" } } } [ { "a" "b" "c" } { 0 1 } split-instructions ] unit-test : test-gc-checks ( -- ) H{ } clone representations set @@ -149,9 +149,9 @@ V{ 0 1 edge -[ ] [ test-gc-checks ] unit-test +{ } [ test-gc-checks ] unit-test -[ t ] [ cfg get blocks-with-gc 1 get 1array sequence= ] unit-test +{ t } [ cfg get blocks-with-gc 1 get 1array sequence= ] unit-test : gc-check? ( bb -- ? ) instructions>> @@ -167,7 +167,7 @@ V{ T{ ##branch } } = ; -[ t ] [ gc-call? ] unit-test +{ t } [ gc-call? ] unit-test reset-vreg-counter @@ -207,33 +207,33 @@ V{ 3 4 edge 4 5 edge -[ ] [ test-gc-checks ] unit-test +{ } [ test-gc-checks ] unit-test H{ { 2 tagged-rep } } representations set -[ ] [ cfg get insert-gc-checks ] unit-test +{ } [ cfg get insert-gc-checks ] unit-test -[ ] [ 1 get successors>> first successors>> first 2 set ] unit-test +{ } [ 1 get successors>> first successors>> first 2 set ] unit-test -[ 2 ] [ 2 get predecessors>> length ] unit-test +{ 2 } [ 2 get predecessors>> length ] unit-test -[ t ] [ 1 get successors>> first gc-check? ] unit-test +{ t } [ 1 get successors>> first gc-check? ] unit-test -[ 64 ] [ 1 get successors>> first instructions>> first size>> ] unit-test +{ 64 } [ 1 get successors>> first instructions>> first size>> ] unit-test -[ t ] [ 2 get predecessors>> first gc-check? ] unit-test +{ t } [ 2 get predecessors>> first gc-check? ] unit-test -[ +{ V{ T{ ##call-gc f T{ gc-map } } T{ ##branch } } -] [ 2 get predecessors>> second instructions>> ] unit-test +} [ 2 get predecessors>> second instructions>> ] unit-test ! Don't forget to invalidate RPO after inserting basic blocks! -[ 8 ] [ cfg get reverse-post-order length ] unit-test +{ 8 } [ cfg get reverse-post-order length ] unit-test ! Do the right thing with ##phi instructions V{ @@ -260,7 +260,7 @@ V{ 1 3 edge 2 3 edge -[ ] [ test-gc-checks ] unit-test +{ } [ test-gc-checks ] unit-test H{ { 1 tagged-rep } @@ -268,10 +268,10 @@ H{ { 3 tagged-rep } } representations set -[ ] [ cfg get insert-gc-checks ] unit-test -[ ] [ 1 get successors>> first successors>> first 3 set ] unit-test -[ t ] [ 2 get successors>> first instructions>> first ##phi? ] unit-test -[ 2 ] [ 3 get instructions>> length ] unit-test +{ } [ cfg get insert-gc-checks ] unit-test +{ } [ 1 get successors>> first successors>> first 3 set ] unit-test +{ t } [ 2 get successors>> first instructions>> first ##phi? ] unit-test +{ 2 } [ 3 get instructions>> length ] unit-test ! GC check in a block that is its own successor V{ @@ -292,23 +292,23 @@ V{ 0 1 edge 1 { 1 2 } edges -[ ] [ test-gc-checks ] unit-test +{ } [ test-gc-checks ] unit-test -[ ] [ cfg get insert-gc-checks ] unit-test +{ } [ cfg get insert-gc-checks ] unit-test -[ ] [ +{ } [ 0 get successors>> first predecessors>> [ first 0 get assert= ] [ second 1 get [ instructions>> ] bi@ assert= ] bi ] unit-test -[ ] [ +{ } [ 0 get successors>> first successors>> [ first 1 get [ instructions>> ] bi@ assert= ] [ second gc-call? t assert= ] bi ] unit-test -[ ] [ +{ } [ 2 get predecessors>> first predecessors>> [ first gc-check? t assert= ] [ second gc-call? t assert= ] bi @@ -338,17 +338,17 @@ V{ 2 vreg-counter set-global -[ ] [ test-gc-checks ] unit-test +{ } [ test-gc-checks ] unit-test -[ ] [ cfg get insert-gc-checks ] unit-test +{ } [ cfg get insert-gc-checks ] unit-test ! The GC check should come after the alien-invoke -[ +{ V{ T{ ##alien-invoke f "malloc" f f f f f T{ gc-map } } T{ ##check-nursery-branch f 64 cc<= 3 4 } } -] [ 0 get successors>> first instructions>> ] unit-test +} [ 0 get successors>> first instructions>> ] unit-test ! call then allot then call then allot V{ @@ -374,40 +374,40 @@ V{ 2 vreg-counter set-global -[ ] [ test-gc-checks ] unit-test +{ } [ test-gc-checks ] unit-test -[ ] [ cfg get insert-gc-checks ] unit-test +{ } [ cfg get insert-gc-checks ] unit-test -[ +{ V{ T{ ##alien-invoke f "malloc" f f f f f T{ gc-map } } T{ ##check-nursery-branch f 64 cc<= 3 4 } } -] [ +} [ 0 get successors>> first instructions>> ] unit-test -[ +{ V{ T{ ##allot f 1 64 byte-array } T{ ##alien-invoke f "malloc" f f f f f T{ gc-map } } T{ ##check-nursery-branch f 64 cc<= 5 6 } } -] [ +} [ 0 get successors>> first successors>> first instructions>> ] unit-test -[ +{ V{ T{ ##allot f 2 64 byte-array } T{ ##branch } } -] [ +} [ 0 get successors>> first successors>> first diff --git a/basis/compiler/cfg/intrinsics/simd/simd-tests.factor b/basis/compiler/cfg/intrinsics/simd/simd-tests.factor index 7f952284ab..deb92f353a 100644 --- a/basis/compiler/cfg/intrinsics/simd/simd-tests.factor +++ b/basis/compiler/cfg/intrinsics/simd/simd-tests.factor @@ -118,31 +118,31 @@ M: simple-ops-cpu %gather-vector-4-reps { int-4-rep uint-4-rep float-4-rep } ; M: simple-ops-cpu %alien-vector-reps all-reps ; ! v+ -[ { ##add-vector } ] +{ { ##add-vector } } [ simple-ops-cpu float-4-rep [ emit-simd-v+ ] test-emit ] unit-test ! v- -[ { ##sub-vector } ] +{ { ##sub-vector } } [ simple-ops-cpu float-4-rep [ emit-simd-v- ] test-emit ] unit-test ! vneg -[ { ##load-reference ##sub-vector } ] +{ { ##load-reference ##sub-vector } } [ simple-ops-cpu float-4-rep [ emit-simd-vneg ] test-emit ] unit-test -[ { ##zero-vector ##sub-vector } ] +{ { ##zero-vector ##sub-vector } } [ simple-ops-cpu int-4-rep [ emit-simd-vneg ] test-emit ] unit-test ! v* -[ { ##mul-vector } ] +{ { ##mul-vector } } [ simple-ops-cpu float-4-rep [ emit-simd-v* ] test-emit ] unit-test ! v/ -[ { ##div-vector } ] +{ { ##div-vector } } [ simple-ops-cpu float-4-rep [ emit-simd-v/ ] test-emit ] unit-test @@ -150,15 +150,15 @@ TUPLE: addsub-cpu < simple-ops-cpu ; M: addsub-cpu %add-sub-vector-reps { int-4-rep float-4-rep } ; ! v+- -[ { ##add-sub-vector } ] +{ { ##add-sub-vector } } [ addsub-cpu float-4-rep [ emit-simd-v+- ] test-emit ] unit-test -[ { ##load-reference ##xor-vector ##add-vector } ] +{ { ##load-reference ##xor-vector ##add-vector } } [ simple-ops-cpu float-4-rep [ emit-simd-v+- ] test-emit ] unit-test -[ { ##load-reference ##xor-vector ##sub-vector ##add-vector } ] +{ { ##load-reference ##xor-vector ##sub-vector ##add-vector } } [ simple-ops-cpu int-4-rep [ emit-simd-v+- ] test-emit ] unit-test @@ -168,41 +168,41 @@ M: saturating-cpu %saturated-sub-vector-reps { int-4-rep } ; M: saturating-cpu %saturated-mul-vector-reps { int-4-rep } ; ! vs+ -[ { ##add-vector } ] +{ { ##add-vector } } [ simple-ops-cpu float-4-rep [ emit-simd-vs+ ] test-emit ] unit-test -[ { ##add-vector } ] +{ { ##add-vector } } [ saturating-cpu float-4-rep [ emit-simd-vs+ ] test-emit ] unit-test -[ { ##saturated-add-vector } ] +{ { ##saturated-add-vector } } [ saturating-cpu int-4-rep [ emit-simd-vs+ ] test-emit ] unit-test ! vs- -[ { ##sub-vector } ] +{ { ##sub-vector } } [ simple-ops-cpu float-4-rep [ emit-simd-vs- ] test-emit ] unit-test -[ { ##sub-vector } ] +{ { ##sub-vector } } [ saturating-cpu float-4-rep [ emit-simd-vs- ] test-emit ] unit-test -[ { ##saturated-sub-vector } ] +{ { ##saturated-sub-vector } } [ saturating-cpu int-4-rep [ emit-simd-vs- ] test-emit ] unit-test ! vs* -[ { ##mul-vector } ] +{ { ##mul-vector } } [ simple-ops-cpu float-4-rep [ emit-simd-vs* ] test-emit ] unit-test -[ { ##mul-vector } ] +{ { ##mul-vector } } [ saturating-cpu float-4-rep [ emit-simd-vs* ] test-emit ] unit-test -[ { ##saturated-mul-vector } ] +{ { ##saturated-mul-vector } } [ saturating-cpu int-4-rep [ emit-simd-vs* ] test-emit ] unit-test @@ -217,20 +217,20 @@ M: compare-cpu %compare-vector-reps drop signed-reps ; M: compare-cpu %compare-vector-ccs nip f 2array 1array f ; ! vmin -[ { ##min-vector } ] +{ { ##min-vector } } [ minmax-cpu float-4-rep [ emit-simd-vmin ] test-emit ] unit-test -[ { ##compare-vector ##and-vector ##andn-vector ##or-vector } ] +{ { ##compare-vector ##and-vector ##andn-vector ##or-vector } } [ compare-cpu float-4-rep [ emit-simd-vmin ] test-emit ] unit-test ! vmax -[ { ##max-vector } ] +{ { ##max-vector } } [ minmax-cpu float-4-rep [ emit-simd-vmax ] test-emit ] unit-test -[ { ##compare-vector ##and-vector ##andn-vector ##or-vector } ] +{ { ##compare-vector ##and-vector ##andn-vector ##or-vector } } [ compare-cpu float-4-rep [ emit-simd-vmax ] test-emit ] unit-test @@ -243,50 +243,50 @@ M: horizontal-cpu %unpack-vector-head-reps signed-reps ; M: horizontal-cpu %unpack-vector-tail-reps signed-reps ; ! v. -[ { ##dot-vector } ] +{ { ##dot-vector } } [ dot-cpu float-4-rep [ emit-simd-v. ] test-emit ] unit-test -[ { ##mul-vector ##horizontal-add-vector ##horizontal-add-vector ##vector>scalar } ] +{ { ##mul-vector ##horizontal-add-vector ##horizontal-add-vector ##vector>scalar } } [ horizontal-cpu float-4-rep [ emit-simd-v. ] test-emit ] unit-test -[ { +{ { ##mul-vector ##merge-vector-head ##merge-vector-tail ##add-vector ##merge-vector-head ##merge-vector-tail ##add-vector ##vector>scalar -} ] +} } [ simple-ops-cpu float-4-rep [ emit-simd-v. ] test-emit ] unit-test ! vsqrt -[ { ##sqrt-vector } ] +{ { ##sqrt-vector } } [ simple-ops-cpu float-4-rep [ emit-simd-vsqrt ] test-emit ] unit-test ! sum -[ { ##horizontal-add-vector ##vector>scalar } ] +{ { ##horizontal-add-vector ##vector>scalar } } [ horizontal-cpu double-2-rep [ emit-simd-sum ] test-emit ] unit-test -[ { ##horizontal-add-vector ##horizontal-add-vector ##vector>scalar } ] +{ { ##horizontal-add-vector ##horizontal-add-vector ##vector>scalar } } [ horizontal-cpu float-4-rep [ emit-simd-sum ] test-emit ] unit-test -[ { +{ { ##unpack-vector-head ##unpack-vector-tail ##add-vector ##horizontal-add-vector ##horizontal-add-vector ##vector>scalar -} ] +} } [ horizontal-cpu short-8-rep [ emit-simd-sum ] test-emit ] unit-test -[ { +{ { ##unpack-vector-head ##unpack-vector-tail ##add-vector ##horizontal-add-vector ##horizontal-add-vector ##horizontal-add-vector ##vector>scalar -} ] +} } [ horizontal-cpu char-16-rep [ emit-simd-sum ] test-emit ] unit-test @@ -294,39 +294,39 @@ TUPLE: abs-cpu < simple-ops-cpu ; M: abs-cpu %abs-vector-reps signed-reps ; ! vabs -[ { } ] +{ { } } [ simple-ops-cpu uint-4-rep [ emit-simd-vabs ] test-emit ] unit-test -[ { ##abs-vector } ] +{ { ##abs-vector } } [ abs-cpu float-4-rep [ emit-simd-vabs ] test-emit ] unit-test -[ { ##load-reference ##andn-vector } ] +{ { ##load-reference ##andn-vector } } [ simple-ops-cpu float-4-rep [ emit-simd-vabs ] test-emit ] unit-test -[ { ##zero-vector ##sub-vector ##compare-vector ##and-vector ##andn-vector ##or-vector } ] +{ { ##zero-vector ##sub-vector ##compare-vector ##and-vector ##andn-vector ##or-vector } } [ compare-cpu int-4-rep [ emit-simd-vabs ] test-emit ] unit-test ! vand -[ { ##and-vector } ] +{ { ##and-vector } } [ simple-ops-cpu float-4-rep [ emit-simd-vand ] test-emit ] unit-test ! vandn -[ { ##andn-vector } ] +{ { ##andn-vector } } [ simple-ops-cpu float-4-rep [ emit-simd-vandn ] test-emit ] unit-test ! vor -[ { ##or-vector } ] +{ { ##or-vector } } [ simple-ops-cpu float-4-rep [ emit-simd-vor ] test-emit ] unit-test ! vxor -[ { ##xor-vector } ] +{ { ##xor-vector } } [ simple-ops-cpu float-4-rep [ emit-simd-vxor ] test-emit ] unit-test @@ -334,11 +334,11 @@ TUPLE: not-cpu < simple-ops-cpu ; M: not-cpu %not-vector-reps signed-reps ; ! vnot -[ { ##not-vector } ] +{ { ##not-vector } } [ not-cpu float-4-rep [ emit-simd-vnot ] test-emit ] unit-test -[ { ##fill-vector ##xor-vector } ] +{ { ##fill-vector ##xor-vector } } [ simple-ops-cpu float-4-rep [ emit-simd-vnot ] test-emit ] unit-test @@ -355,30 +355,30 @@ M: horizontal-shift-cpu %horizontal-shl-vector-imm-reps signed-reps ; M: horizontal-shift-cpu %horizontal-shr-vector-imm-reps signed-reps ; ! vlshift -[ { ##shl-vector-imm } ] +{ { ##shl-vector-imm } } [ shift-imm-cpu 2 int-4-rep [ emit-simd-vlshift ] test-emit-literal ] unit-test -[ { ##shl-vector } ] +{ { ##shl-vector } } [ shift-cpu int-4-rep [ emit-simd-vlshift ] test-emit ] unit-test ! vrshift -[ { ##shr-vector-imm } ] +{ { ##shr-vector-imm } } [ shift-imm-cpu 2 int-4-rep [ emit-simd-vrshift ] test-emit-literal ] unit-test -[ { ##shr-vector } ] +{ { ##shr-vector } } [ shift-cpu int-4-rep [ emit-simd-vrshift ] test-emit ] unit-test ! hlshift -[ { ##horizontal-shl-vector-imm } ] +{ { ##horizontal-shl-vector-imm } } [ horizontal-shift-cpu 2 int-4-rep [ emit-simd-hlshift ] test-emit-literal ] unit-test ! hrshift -[ { ##horizontal-shr-vector-imm } ] +{ { ##horizontal-shr-vector-imm } } [ horizontal-shift-cpu 2 int-4-rep [ emit-simd-hrshift ] test-emit-literal ] unit-test @@ -389,44 +389,44 @@ TUPLE: shuffle-cpu < simple-ops-cpu ; M: shuffle-cpu %shuffle-vector-reps signed-reps ; ! vshuffle-elements -[ { ##load-reference ##shuffle-vector } ] +{ { ##load-reference ##shuffle-vector } } [ shuffle-cpu { 0 1 2 3 } int-4-rep [ emit-simd-vshuffle-elements ] test-emit-literal ] unit-test -[ { ##shuffle-vector-imm } ] +{ { ##shuffle-vector-imm } } [ shuffle-imm-cpu { 0 1 2 3 } int-4-rep [ emit-simd-vshuffle-elements ] test-emit-literal ] unit-test ! vshuffle-bytes -[ { ##shuffle-vector } ] +{ { ##shuffle-vector } } [ shuffle-cpu int-4-rep [ emit-simd-vshuffle-bytes ] test-emit ] unit-test ! vmerge-head -[ { ##merge-vector-head } ] +{ { ##merge-vector-head } } [ simple-ops-cpu float-4-rep [ emit-simd-vmerge-head ] test-emit ] unit-test ! vmerge-tail -[ { ##merge-vector-tail } ] +{ { ##merge-vector-tail } } [ simple-ops-cpu float-4-rep [ emit-simd-vmerge-tail ] test-emit ] unit-test ! v<= etc. -[ { ##compare-vector } ] +{ { ##compare-vector } } [ compare-cpu int-4-rep [ emit-simd-v<= ] test-emit ] unit-test -[ { ##min-vector ##compare-vector } ] +{ { ##min-vector ##compare-vector } } [ minmax-cpu int-4-rep [ emit-simd-v<= ] test-emit ] unit-test -[ { ##load-reference ##xor-vector ##xor-vector ##compare-vector } ] +{ { ##load-reference ##xor-vector ##xor-vector ##compare-vector } } [ compare-cpu uint-4-rep [ emit-simd-v<= ] test-emit ] unit-test ! vany? etc. -[ { ##test-vector } ] +{ { ##test-vector } } [ simple-ops-cpu int-4-rep [ emit-simd-vany? ] test-emit ] unit-test @@ -435,30 +435,30 @@ M: convert-cpu %integer>float-vector-reps { int-4-rep } ; M: convert-cpu %float>integer-vector-reps { float-4-rep } ; ! v>float -[ { } ] +{ { } } [ convert-cpu float-4-rep [ emit-simd-v>float ] test-emit ] unit-test -[ { ##integer>float-vector } ] +{ { ##integer>float-vector } } [ convert-cpu int-4-rep [ emit-simd-v>float ] test-emit ] unit-test ! v>integer -[ { } ] +{ { } } [ convert-cpu int-4-rep [ emit-simd-v>integer ] test-emit ] unit-test -[ { ##float>integer-vector } ] +{ { ##float>integer-vector } } [ convert-cpu float-4-rep [ emit-simd-v>integer ] test-emit ] unit-test ! vpack-signed -[ { ##signed-pack-vector } ] +{ { ##signed-pack-vector } } [ simple-ops-cpu int-4-rep [ emit-simd-vpack-signed ] test-emit ] unit-test ! vpack-unsigned -[ { ##unsigned-pack-vector } ] +{ { ##unsigned-pack-vector } } [ simple-ops-cpu int-4-rep [ emit-simd-vpack-unsigned ] test-emit ] unit-test @@ -468,60 +468,60 @@ TUPLE: unpack-cpu < unpack-head-cpu ; M: unpack-cpu %unpack-vector-tail-reps all-reps ; ! vunpack-head -[ { ##unpack-vector-head } ] +{ { ##unpack-vector-head } } [ unpack-head-cpu int-4-rep [ emit-simd-vunpack-head ] test-emit ] unit-test -[ { ##zero-vector ##merge-vector-head } ] +{ { ##zero-vector ##merge-vector-head } } [ simple-ops-cpu uint-4-rep [ emit-simd-vunpack-head ] test-emit ] unit-test -[ { ##merge-vector-head ##shr-vector-imm } ] +{ { ##merge-vector-head ##shr-vector-imm } } [ shift-imm-cpu int-4-rep [ emit-simd-vunpack-head ] test-emit ] unit-test -[ { ##zero-vector ##compare-vector ##merge-vector-head } ] +{ { ##zero-vector ##compare-vector ##merge-vector-head } } [ compare-cpu int-4-rep [ emit-simd-vunpack-head ] test-emit ] unit-test ! vunpack-tail -[ { ##unpack-vector-tail } ] +{ { ##unpack-vector-tail } } [ unpack-cpu int-4-rep [ emit-simd-vunpack-tail ] test-emit ] unit-test -[ { ##tail>head-vector ##unpack-vector-head } ] +{ { ##tail>head-vector ##unpack-vector-head } } [ unpack-head-cpu int-4-rep [ emit-simd-vunpack-tail ] test-emit ] unit-test -[ { ##zero-vector ##merge-vector-tail } ] +{ { ##zero-vector ##merge-vector-tail } } [ simple-ops-cpu uint-4-rep [ emit-simd-vunpack-tail ] test-emit ] unit-test -[ { ##merge-vector-tail ##shr-vector-imm } ] +{ { ##merge-vector-tail ##shr-vector-imm } } [ shift-imm-cpu int-4-rep [ emit-simd-vunpack-tail ] test-emit ] unit-test -[ { ##zero-vector ##compare-vector ##merge-vector-tail } ] +{ { ##zero-vector ##compare-vector ##merge-vector-tail } } [ compare-cpu int-4-rep [ emit-simd-vunpack-tail ] test-emit ] unit-test ! with -[ { ##scalar>vector ##shuffle-vector-imm } ] +{ { ##scalar>vector ##shuffle-vector-imm } } [ shuffle-imm-cpu float-4-rep [ emit-simd-with ] test-emit ] unit-test ! gather-2 -[ { ##gather-vector-2 } ] +{ { ##gather-vector-2 } } [ simple-ops-cpu double-2-rep [ emit-simd-gather-2 ] test-emit ] unit-test ! gather-4 -[ { ##gather-vector-4 } ] +{ { ##gather-vector-4 } } [ simple-ops-cpu float-4-rep [ emit-simd-gather-4 ] test-emit ] unit-test ! select -[ { ##shuffle-vector-imm ##vector>scalar } ] +{ { ##shuffle-vector-imm ##vector>scalar } } [ shuffle-imm-cpu 1 float-4-rep [ emit-simd-select ] test-emit-literal ] unit-test diff --git a/basis/compiler/cfg/linear-scan/linear-scan-tests.factor b/basis/compiler/cfg/linear-scan/linear-scan-tests.factor index db0db01dbb..0fb9f050ff 100644 --- a/basis/compiler/cfg/linear-scan/linear-scan-tests.factor +++ b/basis/compiler/cfg/linear-scan/linear-scan-tests.factor @@ -42,7 +42,7 @@ V{ [ cfg set ] [ number-instructions ] [ compute-live-intervals ] tri drop ; -[ ] [ +{ } [ H{ { 1 int-rep } } representations set @@ -52,45 +52,45 @@ V{ test-live-intervals ] unit-test -[ 0 0 ] [ +{ 0 0 } [ 1 live-intervals get at [ start>> ] [ end>> ] bi ] unit-test ! Live range and interval splitting -[ +{ { T{ live-range f 1 10 } T{ live-range f 15 15 } } { T{ live-range f 16 20 } } -] [ +} [ { T{ live-range f 1 10 } T{ live-range f 15 20 } } 15 split-ranges ] unit-test -[ +{ { T{ live-range f 1 10 } T{ live-range f 15 16 } } { T{ live-range f 17 20 } } -] [ +} [ { T{ live-range f 1 10 } T{ live-range f 15 20 } } 16 split-ranges ] unit-test -[ +{ { T{ live-range f 1 10 } } { T{ live-range f 15 20 } } -] [ +} [ { T{ live-range f 1 10 } T{ live-range f 15 20 } } 12 split-ranges ] unit-test -[ +{ { T{ live-range f 1 10 } T{ live-range f 15 17 } } { T{ live-range f 18 20 } } -] [ +} [ { T{ live-range f 1 10 } T{ live-range f 15 20 } @@ -101,10 +101,10 @@ V{ { T{ live-range f 1 10 } } 0 split-ranges ] must-fail -[ +{ { T{ live-range f 0 0 } } { T{ live-range f 1 5 } } -] [ +} [ { T{ live-range f 0 5 } } 0 split-ranges ] unit-test @@ -120,7 +120,7 @@ H{ : clean-up-split ( a b -- a b ) [ dup [ [ >vector ] change-uses [ >vector ] change-ranges ] when ] bi@ ; -[ +{ T{ live-interval-state { vreg 1 } { reg-class float-regs } @@ -141,7 +141,7 @@ H{ { reload-from T{ spill-slot f 0 } } { reload-rep float-rep } } -] [ +} [ T{ live-interval-state { vreg 1 } { reg-class float-regs } @@ -153,7 +153,7 @@ H{ clean-up-split ] unit-test -[ +{ f T{ live-interval-state { vreg 2 } @@ -165,7 +165,7 @@ H{ { reload-from T{ spill-slot f 4 } } { reload-rep float-rep } } -] [ +} [ T{ live-interval-state { vreg 2 } { reg-class float-regs } @@ -177,7 +177,7 @@ H{ clean-up-split ] unit-test -[ +{ T{ live-interval-state { vreg 3 } { reg-class float-regs } @@ -189,7 +189,7 @@ H{ { spill-rep float-rep } } f -] [ +} [ T{ live-interval-state { vreg 3 } { reg-class float-regs } @@ -201,7 +201,7 @@ H{ clean-up-split ] unit-test -[ +{ T{ live-interval-state { vreg 4 } { reg-class float-regs } @@ -222,7 +222,7 @@ H{ { reload-from T{ spill-slot f 12 } } { reload-rep float-rep } } -] [ +} [ T{ live-interval-state { vreg 4 } { reg-class float-regs } @@ -235,7 +235,7 @@ H{ ] unit-test ! Don't insert reload if first usage is a def -[ +{ T{ live-interval-state { vreg 5 } { reg-class float-regs } @@ -254,7 +254,7 @@ H{ { uses V{ T{ vreg-use f 20 float-rep f } T{ vreg-use f 30 f float-rep } } } { ranges V{ T{ live-range f 20 30 } } } } -] [ +} [ T{ live-interval-state { vreg 5 } { reg-class float-regs } @@ -267,7 +267,7 @@ H{ ] unit-test ! Multiple representations -[ +{ T{ live-interval-state { vreg 6 } { reg-class float-regs } @@ -288,7 +288,7 @@ H{ { reload-from T{ spill-slot f 24 } } { reload-rep double-rep } } -] [ +} [ T{ live-interval-state { vreg 6 } { reg-class float-regs } @@ -300,7 +300,7 @@ H{ clean-up-split ] unit-test -[ +{ f T{ live-interval-state { vreg 7 } @@ -310,7 +310,7 @@ H{ { uses V{ T{ vreg-use f 8 int-rep } } } { reg-class int-regs } } -] [ +} [ T{ live-interval-state { vreg 7 } { start 4 } @@ -323,7 +323,7 @@ H{ ] unit-test ! trim-before-ranges, trim-after-ranges -[ +{ T{ live-interval-state { vreg 8 } { start 0 } @@ -344,7 +344,7 @@ H{ { reload-from T{ spill-slot f 32 } } { reload-rep int-rep } } -] [ +} [ T{ live-interval-state { vreg 8 } { start 0 } @@ -362,12 +362,12 @@ H{ { 3 int-rep } } representations set -[ +{ { 3 10 } -] [ +} [ H{ { int-regs V{ @@ -409,12 +409,12 @@ H{ spill-status ] unit-test -[ +{ { 1 1/0. } -] [ +} [ H{ { int-regs V{ @@ -450,7 +450,7 @@ H{ H{ { 1 int-rep } { 2 int-rep } } representations set -[ ] [ +{ } [ { T{ live-interval-state { vreg 1 } @@ -465,7 +465,7 @@ H{ { 1 int-rep } { 2 int-rep } } representations set check-linear-scan ] unit-test -[ ] [ +{ } [ { T{ live-interval-state { vreg 1 } @@ -488,7 +488,7 @@ H{ { 1 int-rep } { 2 int-rep } } representations set check-linear-scan ] unit-test -[ ] [ +{ } [ { T{ live-interval-state { vreg 1 } @@ -511,7 +511,7 @@ H{ { 1 int-rep } { 2 int-rep } } representations set check-linear-scan ] unit-test -[ ] [ +{ } [ { T{ live-interval-state { vreg 1 } @@ -566,7 +566,7 @@ H{ { 5 int-rep } } representations set -[ ] [ +{ } [ { T{ live-interval-state { vreg 1 } @@ -617,7 +617,7 @@ H{ ! Test spill-new code path -[ ] [ +{ } [ { T{ live-interval-state { vreg 1 } @@ -642,37 +642,37 @@ H{ check-linear-scan ] unit-test -[ f ] [ +{ f } [ T{ live-range f 0 10 } T{ live-range f 20 30 } intersect-live-range ] unit-test -[ 10 ] [ +{ 10 } [ T{ live-range f 0 10 } T{ live-range f 10 30 } intersect-live-range ] unit-test -[ 5 ] [ +{ 5 } [ T{ live-range f 0 10 } T{ live-range f 5 30 } intersect-live-range ] unit-test -[ 5 ] [ +{ 5 } [ T{ live-range f 5 30 } T{ live-range f 0 10 } intersect-live-range ] unit-test -[ 5 ] [ +{ 5 } [ T{ live-range f 5 10 } T{ live-range f 0 15 } intersect-live-range ] unit-test -[ 50 ] [ +{ 50 } [ { T{ live-range f 0 10 } T{ live-range f 20 30 } @@ -686,7 +686,7 @@ H{ intersect-live-ranges ] unit-test -[ f ] [ +{ f } [ { T{ live-range f 0 10 } T{ live-range f 20 30 } @@ -700,7 +700,7 @@ H{ intersect-live-ranges ] unit-test -[ 5 ] [ +{ 5 } [ T{ live-interval-state { start 0 } { reg-class int-regs } @@ -727,7 +727,7 @@ H{ { 4 int-rep } } representations set -[ { 0 10 } ] [ +{ { 0 10 } } [ H{ { int-regs { diff --git a/basis/compiler/cfg/linear-scan/resolve/resolve-tests.factor b/basis/compiler/cfg/linear-scan/resolve/resolve-tests.factor index 22f9cfbeeb..c72e286f0d 100644 --- a/basis/compiler/cfg/linear-scan/resolve/resolve-tests.factor +++ b/basis/compiler/cfg/linear-scan/resolve/resolve-tests.factor @@ -5,24 +5,24 @@ compiler.cfg.instructions cpu.architecture make sequences compiler.cfg.linear-scan.allocation.state ; IN: compiler.cfg.linear-scan.resolve.tests -[ +{ { { T{ location f T{ spill-slot f 0 } int-rep int-regs } T{ location f 1 int-rep int-regs } } } -] [ +} [ [ 0 1 int-rep add-mapping ] { } make ] unit-test -[ +{ { T{ ##reload { dst 1 } { rep int-rep } { src T{ spill-slot f 0 } } } } -] [ +} [ [ T{ location f T{ spill-slot f 0 } int-rep int-regs } T{ location f 1 int-rep int-regs } @@ -30,11 +30,11 @@ IN: compiler.cfg.linear-scan.resolve.tests ] { } make ] unit-test -[ +{ { T{ ##spill { src 1 } { rep int-rep } { dst T{ spill-slot f 0 } } } } -] [ +} [ [ T{ location f 1 int-rep int-regs } T{ location f T{ spill-slot f 0 } int-rep int-regs } @@ -42,11 +42,11 @@ IN: compiler.cfg.linear-scan.resolve.tests ] { } make ] unit-test -[ +{ { T{ ##copy { src 1 } { dst 2 } { rep int-rep } } } -] [ +} [ [ T{ location f 1 int-rep int-regs } T{ location f 2 int-rep int-regs } @@ -54,23 +54,23 @@ IN: compiler.cfg.linear-scan.resolve.tests ] { } make ] unit-test -[ +{ { T{ ##copy { src 1 } { dst 2 } { rep int-rep } } T{ ##branch } } -] [ +} [ { { T{ location f 1 int-rep int-regs } T{ location f 2 int-rep int-regs } } } mapping-instructions ] unit-test -[ +{ { T{ ##spill { src 0 } { rep int-rep } { dst T{ spill-slot f 0 } } } T{ ##reload { dst 0 } { rep tagged-rep } { src T{ spill-slot f 1 } } } T{ ##branch } } -] [ +} [ { { T{ location f T{ spill-slot f 1 } tagged-rep int-regs } T{ location f 0 tagged-rep int-regs } } { T{ location f 0 int-rep int-regs } T{ location f T{ spill-slot f 0 } int-rep int-regs } } @@ -78,13 +78,13 @@ IN: compiler.cfg.linear-scan.resolve.tests mapping-instructions ] unit-test -[ +{ { T{ ##spill { src 0 } { rep int-rep } { dst T{ spill-slot f 1 } } } T{ ##reload { dst 0 } { rep tagged-rep } { src T{ spill-slot f 0 } } } T{ ##branch } } -] [ +} [ { { T{ location f T{ spill-slot f 0 } tagged-rep int-regs } T{ location f 0 tagged-rep int-regs } } { T{ location f 0 int-rep int-regs } T{ location f T{ spill-slot f 1 } int-rep int-regs } } @@ -92,13 +92,13 @@ IN: compiler.cfg.linear-scan.resolve.tests mapping-instructions ] unit-test -[ +{ { T{ ##spill { src 0 } { rep int-rep } { dst T{ spill-slot f 1 } } } T{ ##reload { dst 0 } { rep tagged-rep } { src T{ spill-slot f 0 } } } T{ ##branch } } -] [ +} [ { { T{ location f 0 int-rep int-regs } T{ location f T{ spill-slot f 1 } int-rep int-regs } } { T{ location f T{ spill-slot f 0 } tagged-rep int-regs } T{ location f 0 tagged-rep int-regs } } @@ -109,7 +109,7 @@ IN: compiler.cfg.linear-scan.resolve.tests cfg new 8 >>spill-area-size cfg set init-resolve -[ t ] [ +{ t } [ { { T{ location f 0 int-rep int-regs } T{ location f 1 int-rep int-regs } } { T{ location f 1 int-rep int-regs } T{ location f 0 int-rep int-regs } } diff --git a/basis/compiler/cfg/liveness/liveness-tests.factor b/basis/compiler/cfg/liveness/liveness-tests.factor index acdc780ddb..d195e9f4e2 100644 --- a/basis/compiler/cfg/liveness/liveness-tests.factor +++ b/basis/compiler/cfg/liveness/liveness-tests.factor @@ -174,15 +174,15 @@ V{ 1 { 2 3 } edges -[ ] [ test-liveness ] unit-test +{ } [ test-liveness ] unit-test -[ +{ H{ { 1 1 } { 2 2 } { 3 3 } } -] +} [ 1 get live-in ] unit-test @@ -200,9 +200,9 @@ V{ 1 2 edge -[ ] [ test-liveness ] unit-test +{ } [ test-liveness ] unit-test -[ H{ { 0 0 } } ] [ 2 get live-in ] unit-test +{ H{ { 0 0 } } } [ 2 get live-in ] unit-test ! Regression V{ @@ -286,12 +286,12 @@ V{ 7 8 edge 8 9 edge -[ ] [ test-liveness ] unit-test +{ } [ test-liveness ] unit-test -[ H{ { 28 28 } { 29 29 } { 30 30 } { 31 31 } } ] [ 5 get live-out ] unit-test -[ H{ { 28 28 } { 29 29 } { 30 30 } } ] [ 6 get live-in ] unit-test -[ H{ { 28 28 } { 29 29 } { 31 31 } } ] [ 7 get live-in ] unit-test -[ H{ { 30 30 } } ] [ 6 get 8 get edge-live-in ] unit-test +{ H{ { 28 28 } { 29 29 } { 30 30 } { 31 31 } } } [ 5 get live-out ] unit-test +{ H{ { 28 28 } { 29 29 } { 30 30 } } } [ 6 get live-in ] unit-test +{ H{ { 28 28 } { 29 29 } { 31 31 } } } [ 7 get live-in ] unit-test +{ H{ { 30 30 } } } [ 6 get 8 get edge-live-in ] unit-test V{ T{ ##prologue } @@ -339,15 +339,15 @@ V{ 5 6 edge 6 7 edge -[ ] [ 0 get block>cfg dup cfg set compute-live-sets ] unit-test +{ } [ 0 get block>cfg dup cfg set compute-live-sets ] unit-test -[ t ] [ 0 get live-in assoc-empty? ] unit-test +{ t } [ 0 get live-in assoc-empty? ] unit-test -[ H{ { 2 2 } } ] [ 4 get live-out ] unit-test +{ H{ { 2 2 } } } [ 4 get live-out ] unit-test -[ H{ { 0 0 } } ] [ 2 get 4 get edge-live-in ] unit-test +{ H{ { 0 0 } } } [ 2 get 4 get edge-live-in ] unit-test -[ H{ { 1 1 } } ] [ 3 get 4 get edge-live-in ] unit-test +{ H{ { 1 1 } } } [ 3 get 4 get edge-live-in ] unit-test V{ @@ -378,12 +378,12 @@ H{ { 1 int-rep } } representations set -[ ] [ 0 get block>cfg dup cfg set compute-live-sets ] unit-test +{ } [ 0 get block>cfg dup cfg set compute-live-sets ] unit-test -[ V{ { 1 0 } } ] [ 1 get instructions>> 2 swap nth gc-map>> derived-roots>> ] unit-test +{ V{ { 1 0 } } } [ 1 get instructions>> 2 swap nth gc-map>> derived-roots>> ] unit-test -[ { 0 } ] [ 1 get instructions>> 2 swap nth gc-map>> gc-roots>> ] unit-test +{ { 0 } } [ 1 get instructions>> 2 swap nth gc-map>> gc-roots>> ] unit-test -[ V{ { 1 0 } } ] [ 1 get instructions>> 4 swap nth gc-map>> derived-roots>> ] unit-test +{ V{ { 1 0 } } } [ 1 get instructions>> 4 swap nth gc-map>> derived-roots>> ] unit-test -[ { 0 } ] [ 1 get instructions>> 4 swap nth gc-map>> gc-roots>> ] unit-test +{ { 0 } } [ 1 get instructions>> 4 swap nth gc-map>> gc-roots>> ] unit-test diff --git a/basis/compiler/cfg/loop-detection/loop-detection-tests.factor b/basis/compiler/cfg/loop-detection/loop-detection-tests.factor index 82b8a46975..584a4e0885 100644 --- a/basis/compiler/cfg/loop-detection/loop-detection-tests.factor +++ b/basis/compiler/cfg/loop-detection/loop-detection-tests.factor @@ -28,8 +28,8 @@ V{ } 2 test-bb : test-loop-detection ( -- ) 0 get block>cfg needs-loops ; -[ ] [ test-loop-detection ] unit-test +{ } [ test-loop-detection ] unit-test -[ 1 ] [ 0 get loop-nesting-at ] unit-test -[ 0 ] [ 1 get loop-nesting-at ] unit-test -[ 1 ] [ 2 get loop-nesting-at ] unit-test +{ 1 } [ 0 get loop-nesting-at ] unit-test +{ 0 } [ 1 get loop-nesting-at ] unit-test +{ 1 } [ 2 get loop-nesting-at ] unit-test diff --git a/basis/compiler/cfg/parallel-copy/parallel-copy-tests.factor b/basis/compiler/cfg/parallel-copy/parallel-copy-tests.factor index 1f8537531f..090dcd8c01 100644 --- a/basis/compiler/cfg/parallel-copy/parallel-copy-tests.factor +++ b/basis/compiler/cfg/parallel-copy/parallel-copy-tests.factor @@ -14,51 +14,51 @@ SYMBOL: temp H{ } test-parallel-copy ] unit-test -[ +{ { T{ ##copy f 4 2 any-rep } T{ ##copy f 2 1 any-rep } T{ ##copy f 1 4 any-rep } } -] [ +} [ H{ { 1 2 } { 2 1 } } test-parallel-copy ] unit-test -[ +{ { T{ ##copy f 1 2 any-rep } T{ ##copy f 3 4 any-rep } } -] [ +} [ H{ { 1 2 } { 3 4 } } test-parallel-copy ] unit-test -[ +{ { T{ ##copy f 1 3 any-rep } T{ ##copy f 2 1 any-rep } } -] [ +} [ H{ { 1 3 } { 2 3 } } test-parallel-copy ] unit-test -[ +{ { T{ ##copy f 4 3 any-rep } T{ ##copy f 3 2 any-rep } T{ ##copy f 2 1 any-rep } T{ ##copy f 1 4 any-rep } } -] [ +} [ { { 2 1 } { 3 2 } diff --git a/basis/compiler/cfg/representations/coalescing/coalescing-tests.factor b/basis/compiler/cfg/representations/coalescing/coalescing-tests.factor index 0edbf69627..2759ba8a0d 100644 --- a/basis/compiler/cfg/representations/coalescing/coalescing-tests.factor +++ b/basis/compiler/cfg/representations/coalescing/coalescing-tests.factor @@ -34,8 +34,8 @@ V{ 1 3 edge 2 3 edge -[ ] [ test-scc ] unit-test +{ } [ test-scc ] unit-test -[ t ] [ 0 vreg>scc 1 vreg>scc = ] unit-test -[ t ] [ 0 vreg>scc 3 vreg>scc = ] unit-test -[ f ] [ 2 vreg>scc 3 vreg>scc = ] unit-test +{ t } [ 0 vreg>scc 1 vreg>scc = ] unit-test +{ t } [ 0 vreg>scc 3 vreg>scc = ] unit-test +{ f } [ 2 vreg>scc 3 vreg>scc = ] unit-test diff --git a/basis/compiler/cfg/representations/representations-tests.factor b/basis/compiler/cfg/representations/representations-tests.factor index c88333e688..4ecc99e6b4 100644 --- a/basis/compiler/cfg/representations/representations-tests.factor +++ b/basis/compiler/cfg/representations/representations-tests.factor @@ -9,7 +9,7 @@ make ; FROM: alien.c-types => char ; IN: compiler.cfg.representations -[ { double-rep double-rep } ] [ +{ { double-rep double-rep } } [ T{ ##add-float { dst 5 } { src1 3 } @@ -17,7 +17,7 @@ IN: compiler.cfg.representations } uses-vreg-reps ] unit-test -[ { double-rep } ] [ +{ { double-rep } } [ T{ ##load-memory-imm { dst 5 } { base 3 } @@ -30,22 +30,22 @@ H{ } clone representations set 3 vreg-counter set-global -[ +{ { T{ ##allot f 2 16 float 4 } T{ ##store-memory-imm f 1 2 $[ float-offset ] double-rep f } } -] [ +} [ [ 2 1 tagged-rep double-rep emit-conversion ] { } make ] unit-test -[ +{ { T{ ##load-memory-imm f 2 1 $[ float-offset ] double-rep f } } -] [ +} [ [ 2 1 double-rep tagged-rep emit-conversion ] { } make @@ -78,9 +78,9 @@ V{ 0 1 edge 1 2 edge -[ ] [ test-representations ] unit-test +{ } [ test-representations ] unit-test -[ 1 ] [ 1 get instructions>> [ ##allot? ] count ] unit-test +{ 1 } [ 1 get instructions>> [ ##allot? ] count ] unit-test ! Don't dereference the result of a peek V{ @@ -110,14 +110,14 @@ V{ 0 1 edge 1 { 2 3 } edges -[ ] [ test-representations ] unit-test +{ } [ test-representations ] unit-test -[ +{ V{ T{ ##peek f 1 D 0 } T{ ##branch } } -] [ 1 get instructions>> ] unit-test +} [ 1 get instructions>> ] unit-test ! We cannot untag-fixnum the result of a peek if there are usages ! of it as a tagged-rep @@ -153,14 +153,14 @@ V{ 3 { 3 4 } edges 2 4 edge -[ ] [ test-representations ] unit-test +{ } [ test-representations ] unit-test -[ +{ V{ T{ ##peek f 1 D 0 } T{ ##branch } } -] [ 1 get instructions>> ] unit-test +} [ 1 get instructions>> ] unit-test ! But its ok to untag-fixnum the result of a peek if all usages use ! it as int-rep @@ -199,15 +199,15 @@ V{ 3 vreg-counter set-global -[ ] [ test-representations ] unit-test +{ } [ test-representations ] unit-test -[ +{ V{ T{ ##peek f 4 D 0 } T{ ##sar-imm f 1 4 $[ tag-bits get ] } T{ ##branch } } -] [ 1 get instructions>> ] unit-test +} [ 1 get instructions>> ] unit-test ! scalar-rep => int-rep conversion V{ @@ -231,9 +231,9 @@ V{ 0 1 edge 1 2 edge -[ ] [ test-representations ] unit-test +{ } [ test-representations ] unit-test -[ t ] [ 1 get instructions>> 4 swap nth ##scalar>integer? ] unit-test +{ t } [ 1 get instructions>> 4 swap nth ##scalar>integer? ] unit-test ! Test phi node behavior V{ @@ -267,13 +267,13 @@ V{ 2 3 edge 3 4 edge -[ ] [ test-representations ] unit-test +{ } [ test-representations ] unit-test -[ T{ ##load-tagged f 1 $[ 1 tag-fixnum ] } ] +{ T{ ##load-tagged f 1 $[ 1 tag-fixnum ] } } [ 1 get instructions>> first ] unit-test -[ T{ ##load-tagged f 2 $[ 2 tag-fixnum ] } ] +{ T{ ##load-tagged f 2 $[ 2 tag-fixnum ] } } [ 2 get instructions>> first ] unit-test @@ -311,10 +311,10 @@ V{ 2 3 edge 3 4 edge -[ ] [ test-representations ] unit-test +{ } [ test-representations ] unit-test ! Don't untag the f! -[ 2 ] [ 2 get instructions>> length ] unit-test +{ 2 } [ 2 get instructions>> length ] unit-test cpu x86.32? [ @@ -398,7 +398,7 @@ cpu x86.32? [ ! we might lose precision 5 vreg-counter set-global -[ f ] [ +{ f } [ V{ T{ ##peek f 0 D 0 } T{ ##peek f 1 D 1 } @@ -413,12 +413,12 @@ cpu x86.32? [ ] unit-test ! Converting a ##load-integer into a ##load-tagged -[ +{ V{ T{ ##load-tagged f 1 $[ 100 tag-fixnum ] } T{ ##replace f 1 D 0 } } -] [ +} [ V{ T{ ##load-integer f 1 100 } T{ ##replace f 1 D 0 } @@ -428,7 +428,7 @@ cpu x86.32? [ ! Peephole optimization if input to ##shl-imm is tagged 3 vreg-counter set-global -[ +{ V{ T{ ##peek f 1 D 0 } T{ ##sar-imm f 2 1 1 } @@ -436,7 +436,7 @@ cpu x86.32? [ T{ ##shl-imm f 3 4 $[ tag-bits get ] } T{ ##replace f 3 D 0 } } -] [ +} [ V{ T{ ##peek f 1 D 0 } T{ ##shl-imm f 2 1 3 } @@ -447,7 +447,7 @@ cpu x86.32? [ 3 vreg-counter set-global -[ +{ V{ T{ ##peek f 1 D 0 } T{ ##shl-imm f 2 1 $[ 10 tag-bits get - ] } @@ -455,7 +455,7 @@ cpu x86.32? [ T{ ##shl-imm f 3 4 $[ tag-bits get ] } T{ ##replace f 3 D 0 } } -] [ +} [ V{ T{ ##peek f 1 D 0 } T{ ##shl-imm f 2 1 10 } @@ -464,7 +464,7 @@ cpu x86.32? [ } test-peephole ] unit-test -[ +{ V{ T{ ##peek f 1 D 0 } T{ ##copy f 2 1 int-rep } @@ -472,7 +472,7 @@ cpu x86.32? [ T{ ##shl-imm f 3 5 $[ tag-bits get ] } T{ ##replace f 3 D 0 } } -] [ +} [ V{ T{ ##peek f 1 D 0 } T{ ##shl-imm f 2 1 $[ tag-bits get ] } @@ -482,13 +482,13 @@ cpu x86.32? [ ] unit-test ! Peephole optimization if output of ##shl-imm needs to be tagged -[ +{ V{ T{ ##load-integer f 1 100 } T{ ##shl-imm f 2 1 $[ 3 tag-bits get + ] } T{ ##replace f 2 D 0 } } -] [ +} [ V{ T{ ##load-integer f 1 100 } T{ ##shl-imm f 2 1 3 } @@ -498,13 +498,13 @@ cpu x86.32? [ ! Peephole optimization if both input and output of ##shl-imm ! need to be tagged -[ +{ V{ T{ ##peek f 0 D 0 } T{ ##shl-imm f 1 0 3 } T{ ##replace f 1 D 0 } } -] [ +} [ V{ T{ ##peek f 0 D 0 } T{ ##shl-imm f 1 0 3 } @@ -513,7 +513,7 @@ cpu x86.32? [ ] unit-test ! Peephole optimization if neither input nor output of ##shl-imm need to be tagged -[ +{ V{ T{ ##load-integer f 1 100 } T{ ##shl-imm f 2 1 3 } @@ -521,7 +521,7 @@ cpu x86.32? [ T{ ##load-integer f 4 100 } T{ ##store-memory f 2 3 4 0 0 int-rep char } } -] [ +} [ V{ T{ ##load-integer f 1 100 } T{ ##shl-imm f 2 1 3 } @@ -534,14 +534,14 @@ cpu x86.32? [ 6 vreg-counter set-global ! Peephole optimization if input to ##sar-imm is tagged -[ +{ V{ T{ ##peek f 1 D 0 } T{ ##sar-imm f 7 1 $[ 3 tag-bits get + ] } T{ ##shl-imm f 2 7 $[ tag-bits get ] } T{ ##replace f 2 D 0 } } -] [ +} [ V{ T{ ##peek f 1 D 0 } T{ ##sar-imm f 2 1 3 } @@ -552,14 +552,14 @@ cpu x86.32? [ 6 vreg-counter set-global ! (Lack of) peephole optimization if output of ##sar-imm needs to be tagged -[ +{ V{ T{ ##load-integer f 1 100 } T{ ##sar-imm f 7 1 3 } T{ ##shl-imm f 2 7 $[ tag-bits get ] } T{ ##replace f 2 D 0 } } -] [ +} [ V{ T{ ##load-integer f 1 100 } T{ ##sar-imm f 2 1 3 } @@ -569,7 +569,7 @@ cpu x86.32? [ ! Peephole optimization if input of ##sar-imm is tagged but output is untagged ! need to be tagged -[ +{ V{ T{ ##peek f 0 D 0 } T{ ##sar-imm f 1 0 $[ 3 tag-bits get + ] } @@ -577,7 +577,7 @@ cpu x86.32? [ T{ ##load-integer f 4 100 } T{ ##store-memory f 1 3 4 0 0 int-rep char } } -] [ +} [ V{ T{ ##peek f 0 D 0 } T{ ##sar-imm f 1 0 3 } @@ -588,7 +588,7 @@ cpu x86.32? [ ] unit-test ! Peephole optimization if neither input nor output of ##sar-imm need to be tagged -[ +{ V{ T{ ##load-integer f 1 100 } T{ ##sar-imm f 2 1 3 } @@ -596,7 +596,7 @@ cpu x86.32? [ T{ ##load-integer f 4 100 } T{ ##store-memory f 2 3 4 0 0 int-rep char } } -] [ +} [ V{ T{ ##load-integer f 1 100 } T{ ##sar-imm f 2 1 3 } @@ -606,7 +606,7 @@ cpu x86.32? [ } test-peephole ] unit-test -[ +{ V{ T{ ##load-vector f 0 B{ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 } short-8-rep } T{ ##select-vector f 1 0 0 short-8-rep } @@ -617,7 +617,7 @@ cpu x86.32? [ T{ ##load-integer f 6 100 } T{ ##store-memory f 4 5 6 0 0 int-rep char } } -] [ +} [ V{ T{ ##load-vector f 0 B{ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 } short-8-rep } T{ ##select-vector f 1 0 0 short-8-rep } @@ -632,7 +632,7 @@ cpu x86.32? [ 6 vreg-counter set-global -[ +{ V{ T{ ##load-vector f 0 B{ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 } int-4-rep } T{ ##select-vector f 1 0 0 int-4-rep } @@ -642,7 +642,7 @@ cpu x86.32? [ T{ ##shl-imm f 4 7 $[ tag-bits get ] } T{ ##replace f 4 D 0 } } -] [ +} [ V{ T{ ##load-vector f 0 B{ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 } int-4-rep } T{ ##select-vector f 1 0 0 int-4-rep } @@ -654,13 +654,13 @@ cpu x86.32? [ ] unit-test ! Tag/untag elimination -[ +{ V{ T{ ##peek f 1 D 0 } T{ ##add-imm f 2 1 $[ 100 tag-fixnum ] } T{ ##replace f 2 D 0 } } -] [ +} [ V{ T{ ##peek f 1 D 0 } T{ ##add-imm f 2 1 100 } @@ -668,14 +668,14 @@ cpu x86.32? [ } test-peephole ] unit-test -[ +{ V{ T{ ##peek f 0 D 0 } T{ ##peek f 1 D 1 } T{ ##add f 2 0 1 } T{ ##replace f 2 D 0 } } -] [ +} [ V{ T{ ##peek f 0 D 0 } T{ ##peek f 1 D 1 } @@ -721,13 +721,13 @@ cpu x86.64? [ ] when ! Tag/untag elimination for ##mul-imm -[ +{ V{ T{ ##peek f 0 D 0 } T{ ##mul-imm f 1 0 100 } T{ ##replace f 1 D 0 } } -] [ +} [ V{ T{ ##peek f 0 D 0 } T{ ##mul-imm f 1 0 100 } @@ -737,7 +737,7 @@ cpu x86.64? [ 4 vreg-counter set-global -[ +{ V{ T{ ##peek f 0 D 0 } T{ ##peek f 1 D 1 } @@ -746,7 +746,7 @@ cpu x86.64? [ T{ ##mul-imm f 3 2 $[ 100 tag-fixnum ] } T{ ##replace f 3 D 0 } } -] [ +} [ V{ T{ ##peek f 0 D 0 } T{ ##peek f 1 D 1 } @@ -757,14 +757,14 @@ cpu x86.64? [ ] unit-test ! Tag/untag elimination for ##compare-integer and ##test -[ +{ V{ T{ ##peek f 0 D 0 } T{ ##peek f 1 D 1 } T{ ##test f 2 0 1 cc= } T{ ##replace f 2 D 0 } } -] [ +} [ V{ T{ ##peek f 0 D 0 } T{ ##peek f 1 D 1 } @@ -773,14 +773,14 @@ cpu x86.64? [ } test-peephole ] unit-test -[ +{ V{ T{ ##peek f 0 D 0 } T{ ##peek f 1 D 1 } T{ ##compare-integer f 2 0 1 cc= } T{ ##replace f 2 D 0 } } -] [ +} [ V{ T{ ##peek f 0 D 0 } T{ ##peek f 1 D 1 } @@ -789,13 +789,13 @@ cpu x86.64? [ } test-peephole ] unit-test -[ +{ V{ T{ ##peek f 0 D 0 } T{ ##peek f 1 D 1 } T{ ##compare-integer-branch f 0 1 cc= } } -] [ +} [ V{ T{ ##peek f 0 D 0 } T{ ##peek f 1 D 1 } @@ -803,13 +803,13 @@ cpu x86.64? [ } test-peephole ] unit-test -[ +{ V{ T{ ##peek f 0 D 0 } T{ ##peek f 1 D 1 } T{ ##test-branch f 0 1 cc= } } -] [ +} [ V{ T{ ##peek f 0 D 0 } T{ ##peek f 1 D 1 } @@ -817,13 +817,13 @@ cpu x86.64? [ } test-peephole ] unit-test -[ +{ V{ T{ ##peek f 0 D 0 } T{ ##peek f 1 D 1 } T{ ##compare-integer-imm-branch f 0 $[ 10 tag-fixnum ] cc= } } -] [ +} [ V{ T{ ##peek f 0 D 0 } T{ ##peek f 1 D 1 } @@ -831,13 +831,13 @@ cpu x86.64? [ } test-peephole ] unit-test -[ +{ V{ T{ ##peek f 0 D 0 } T{ ##peek f 1 D 1 } T{ ##test-imm-branch f 0 $[ 10 tag-fixnum ] cc= } } -] [ +} [ V{ T{ ##peek f 0 D 0 } T{ ##peek f 1 D 1 } @@ -846,13 +846,13 @@ cpu x86.64? [ ] unit-test ! Tag/untag elimination for ##neg -[ +{ V{ T{ ##peek f 0 D 0 } T{ ##neg f 1 0 } T{ ##replace f 1 D 0 } } -] [ +} [ V{ T{ ##peek f 0 D 0 } T{ ##neg f 1 0 } @@ -862,7 +862,7 @@ cpu x86.64? [ 4 vreg-counter set-global -[ +{ V{ T{ ##peek { dst 0 } { loc D 0 } } T{ ##peek { dst 1 } { loc D 1 } } @@ -872,7 +872,7 @@ cpu x86.64? [ T{ ##mul-imm { dst 3 } { src1 2 } { src2 -16 } } T{ ##replace { src 3 } { loc D 0 } } } -] [ +} [ V{ T{ ##peek f 0 D 0 } T{ ##peek f 1 D 1 } @@ -885,14 +885,14 @@ cpu x86.64? [ ! Tag/untag elimination for ##not 2 vreg-counter set-global -[ +{ V{ T{ ##peek f 0 D 0 } T{ ##not f 3 0 } T{ ##xor-imm f 1 3 $[ tag-mask get ] } T{ ##replace f 1 D 0 } } -] [ +} [ V{ T{ ##peek f 0 D 0 } T{ ##not f 1 0 } diff --git a/basis/compiler/cfg/save-contexts/save-contexts-tests.factor b/basis/compiler/cfg/save-contexts/save-contexts-tests.factor index bc7b71d684..87ae39e580 100644 --- a/basis/compiler/cfg/save-contexts/save-contexts-tests.factor +++ b/basis/compiler/cfg/save-contexts/save-contexts-tests.factor @@ -13,12 +13,12 @@ V{ 0 get [ insert-save-context ] change-instructions drop -[ +{ V{ T{ ##add f 1 2 3 } T{ ##branch } } -] [ +} [ 0 get instructions>> ] unit-test @@ -33,7 +33,7 @@ V{ 0 get [ insert-save-context ] change-instructions drop -[ +{ V{ T{ ##inc f D 3 } T{ ##save-context f 5 6 } @@ -41,7 +41,7 @@ V{ T{ gc-map { scrub-d B{ 0 0 0 } } { scrub-r B{ } } { gc-roots { } } } } } -] [ +} [ 0 get instructions>> ] unit-test @@ -52,13 +52,13 @@ V{ 0 get [ insert-save-context ] change-instructions drop -[ +{ V{ T{ ##phi } T{ ##save-context f 7 8 } T{ ##box } } -] [ +} [ 0 get instructions>> ] unit-test diff --git a/basis/compiler/cfg/ssa/construction/construction-tests.factor b/basis/compiler/cfg/ssa/construction/construction-tests.factor index 028b9a6955..c961f217d3 100644 --- a/basis/compiler/cfg/ssa/construction/construction-tests.factor +++ b/basis/compiler/cfg/ssa/construction/construction-tests.factor @@ -72,38 +72,38 @@ V{ 1 3 edge 2 3 edge -[ ] [ test-ssa ] unit-test +{ } [ test-ssa ] unit-test -[ +{ V{ T{ ##load-integer f 1 100 } T{ ##add-imm f 2 1 50 } T{ ##add-imm f 3 2 10 } T{ ##branch } } -] [ 0 get instructions>> ] unit-test +} [ 0 get instructions>> ] unit-test -[ +{ V{ T{ ##load-integer f 4 3 } T{ ##branch } } -] [ 1 get instructions>> ] unit-test +} [ 1 get instructions>> ] unit-test -[ +{ V{ T{ ##load-integer f 5 4 } T{ ##branch } } -] [ 2 get instructions>> ] unit-test +} [ 2 get instructions>> ] unit-test -[ +{ V{ T{ ##phi f 6 H{ { 1 4 } { 2 5 } } } T{ ##replace f 6 D 0 } T{ ##return } } -] [ +} [ 3 get instructions>> clean-up-phis ] unit-test @@ -126,14 +126,14 @@ V{ } 6 test-bb 4 6 edge 5 6 edge -[ ] [ test-ssa ] unit-test +{ } [ test-ssa ] unit-test -[ +{ V{ T{ ##phi f 3 H{ { 2 1 } { 3 2 } } } T{ ##replace f 3 D 0 } } -] [ +} [ 4 get instructions>> clean-up-phis ] unit-test @@ -168,9 +168,9 @@ V{ 2 4 edge 3 4 edge -[ ] [ test-ssa ] unit-test +{ } [ test-ssa ] unit-test -[ V{ } ] [ 4 get instructions>> [ ##phi? ] filter ] unit-test +{ V{ } } [ 4 get instructions>> [ ##phi? ] filter ] unit-test ! Test 4 reset-counters @@ -217,8 +217,8 @@ V{ 5 7 edge 6 7 edge -[ ] [ test-ssa ] unit-test +{ } [ test-ssa ] unit-test -[ V{ } ] [ 5 get instructions>> [ ##phi? ] filter ] unit-test +{ V{ } } [ 5 get instructions>> [ ##phi? ] filter ] unit-test -[ V{ } ] [ 7 get instructions>> [ ##phi? ] filter ] unit-test +{ V{ } } [ 7 get instructions>> [ ##phi? ] filter ] unit-test diff --git a/basis/compiler/cfg/ssa/construction/tdmsc/tdmsc-tests.factor b/basis/compiler/cfg/ssa/construction/tdmsc/tdmsc-tests.factor index 1e12b84f27..7b6100ed69 100644 --- a/basis/compiler/cfg/ssa/construction/tdmsc/tdmsc-tests.factor +++ b/basis/compiler/cfg/ssa/construction/tdmsc/tdmsc-tests.factor @@ -22,12 +22,12 @@ V{ } 5 test-bb 3 4 edge 4 5 edge -[ ] [ test-tdmsc ] unit-test +{ } [ test-tdmsc ] unit-test -[ { 4 } ] [ 1 get 1array merge-set [ number>> ] map ] unit-test -[ { 4 } ] [ 2 get 1array merge-set [ number>> ] map ] unit-test -[ { } ] [ 0 get 1array merge-set ] unit-test -[ { } ] [ 4 get 1array merge-set ] unit-test +{ { 4 } } [ 1 get 1array merge-set [ number>> ] map ] unit-test +{ { 4 } } [ 2 get 1array merge-set [ number>> ] map ] unit-test +{ { } } [ 0 get 1array merge-set ] unit-test +{ { } } [ 4 get 1array merge-set ] unit-test V{ } 0 test-bb V{ } 1 test-bb @@ -44,9 +44,9 @@ V{ } 6 test-bb 4 6 edge 5 6 edge -[ ] [ test-tdmsc ] unit-test +{ } [ test-tdmsc ] unit-test -[ t ] [ +{ t } [ 2 get 3 get 2array merge-set 4 get 6 get 2array set= ] unit-test @@ -68,7 +68,7 @@ V{ } 7 test-bb 4 5 edge 5 2 edge -[ ] [ test-tdmsc ] unit-test +{ } [ test-tdmsc ] unit-test -[ { 2 } ] [ { 2 3 4 5 } [ get ] map merge-set [ number>> ] map ] unit-test -[ { } ] [ { 0 1 6 7 } [ get ] map merge-set ] unit-test +{ { 2 } } [ { 2 3 4 5 } [ get ] map merge-set [ number>> ] map ] unit-test +{ { } } [ { 0 1 6 7 } [ get ] map merge-set ] unit-test diff --git a/basis/compiler/cfg/ssa/interference/interference-tests.factor b/basis/compiler/cfg/ssa/interference/interference-tests.factor index 75cdf09582..0a1da4ddb3 100644 --- a/basis/compiler/cfg/ssa/interference/interference-tests.factor +++ b/basis/compiler/cfg/ssa/interference/interference-tests.factor @@ -51,22 +51,22 @@ V{ 0 1 edge -[ ] [ test-interference ] unit-test - -[ f ] [ 0 1 test-vregs-intersect? ] unit-test -[ f ] [ 1 0 test-vregs-intersect? ] unit-test -[ f ] [ 2 3 test-vregs-intersect? ] unit-test -[ f ] [ 3 2 test-vregs-intersect? ] unit-test -[ t ] [ 0 2 test-vregs-intersect? ] unit-test -[ t ] [ 2 0 test-vregs-intersect? ] unit-test -[ f ] [ 1 3 test-vregs-intersect? ] unit-test -[ f ] [ 3 1 test-vregs-intersect? ] unit-test -[ t ] [ 3 4 test-vregs-intersect? ] unit-test -[ t ] [ 4 3 test-vregs-intersect? ] unit-test -[ t ] [ 3 5 test-vregs-intersect? ] unit-test -[ t ] [ 5 3 test-vregs-intersect? ] unit-test -[ f ] [ 3 6 test-vregs-intersect? ] unit-test -[ f ] [ 6 3 test-vregs-intersect? ] unit-test +{ } [ test-interference ] unit-test + +{ f } [ 0 1 test-vregs-intersect? ] unit-test +{ f } [ 1 0 test-vregs-intersect? ] unit-test +{ f } [ 2 3 test-vregs-intersect? ] unit-test +{ f } [ 3 2 test-vregs-intersect? ] unit-test +{ t } [ 0 2 test-vregs-intersect? ] unit-test +{ t } [ 2 0 test-vregs-intersect? ] unit-test +{ f } [ 1 3 test-vregs-intersect? ] unit-test +{ f } [ 3 1 test-vregs-intersect? ] unit-test +{ t } [ 3 4 test-vregs-intersect? ] unit-test +{ t } [ 4 3 test-vregs-intersect? ] unit-test +{ t } [ 3 5 test-vregs-intersect? ] unit-test +{ t } [ 5 3 test-vregs-intersect? ] unit-test +{ f } [ 3 6 test-vregs-intersect? ] unit-test +{ f } [ 6 3 test-vregs-intersect? ] unit-test V{ T{ ##prologue } @@ -96,9 +96,9 @@ V{ 0 1 edge 1 2 edge -[ ] [ test-interference ] unit-test +{ } [ test-interference ] unit-test -[ t ] [ { 15 } { 23 13 } test-sets-interfere? nip ] unit-test +{ t } [ { 15 } { 23 13 } test-sets-interfere? nip ] unit-test V{ T{ ##prologue f } @@ -164,9 +164,9 @@ V{ 5 6 edge 7 8 edge -[ ] [ test-interference ] unit-test +{ } [ test-interference ] unit-test -[ f ] [ { 48 } { 32 35 } test-sets-interfere? nip ] unit-test +{ f } [ { 48 } { 32 35 } test-sets-interfere? nip ] unit-test TUPLE: bab ; TUPLE: gfg { x bab } ; @@ -289,20 +289,20 @@ V{ 14 15 edge 15 16 edge -[ ] [ test-interference ] unit-test +{ } [ test-interference ] unit-test -[ t ] [ 43 45 test-vregs-intersect? ] unit-test -[ f ] [ 43 45 test-vregs-interfere? ] unit-test +{ t } [ 43 45 test-vregs-intersect? ] unit-test +{ f } [ 43 45 test-vregs-interfere? ] unit-test -[ t ] [ 43 46 test-vregs-intersect? ] unit-test -[ t ] [ 43 46 test-vregs-interfere? ] unit-test +{ t } [ 43 46 test-vregs-intersect? ] unit-test +{ t } [ 43 46 test-vregs-interfere? ] unit-test -[ f ] [ 45 46 test-vregs-intersect? ] unit-test -[ f ] [ 45 46 test-vregs-interfere? ] unit-test +{ f } [ 45 46 test-vregs-intersect? ] unit-test +{ f } [ 45 46 test-vregs-interfere? ] unit-test -[ f ] [ { 43 } { 45 } test-sets-interfere? nip ] unit-test +{ f } [ { 43 } { 45 } test-sets-interfere? nip ] unit-test -[ t f ] [ +{ t f } [ { 46 } { 43 } { 45 } [ [ ] map ] tri@ sets-interfere? [ sets-interfere? nip ] dip @@ -350,14 +350,14 @@ V{ 3 2 edge 4 5 edge -[ ] [ test-interference ] unit-test +{ } [ test-interference ] unit-test -[ f f ] [ +{ f f } [ { 33 } { 21 } { 32 } [ [ ] map ] tri@ sets-interfere? [ sets-interfere? nip ] dip ] unit-test -[ f ] [ 33 21 test-vregs-intersect? ] unit-test -[ f ] [ 32 21 test-vregs-intersect? ] unit-test -[ f ] [ 32 33 test-vregs-intersect? ] unit-test +{ f } [ 33 21 test-vregs-intersect? ] unit-test +{ f } [ 32 21 test-vregs-intersect? ] unit-test +{ f } [ 32 33 test-vregs-intersect? ] unit-test diff --git a/basis/compiler/cfg/value-numbering/value-numbering-tests.factor b/basis/compiler/cfg/value-numbering/value-numbering-tests.factor index cb2753e9db..72d483d8d4 100644 --- a/basis/compiler/cfg/value-numbering/value-numbering-tests.factor +++ b/basis/compiler/cfg/value-numbering/value-numbering-tests.factor @@ -25,36 +25,36 @@ IN: compiler.cfg.value-numbering.tests ] map ; ! Folding constants together -[ +{ { T{ ##load-reference f 0 0.0 } T{ ##load-reference f 1 -0.0 } } -] [ +} [ { T{ ##load-reference f 0 0.0 } T{ ##load-reference f 1 -0.0 } } value-numbering-step ] unit-test -[ +{ { T{ ##load-reference f 0 0.0 } T{ ##copy f 1 0 any-rep } } -] [ +} [ { T{ ##load-reference f 0 0.0 } T{ ##load-reference f 1 0.0 } } value-numbering-step ] unit-test -[ +{ { T{ ##load-reference f 0 t } T{ ##copy f 1 0 any-rep } } -] [ +} [ { T{ ##load-reference f 0 t } T{ ##load-reference f 1 t } @@ -130,7 +130,7 @@ cpu x86.64? [ ] when ! Double compare elimination -[ +{ { T{ ##peek f 1 D 1 } T{ ##peek f 2 D 2 } @@ -138,7 +138,7 @@ cpu x86.64? [ T{ ##copy f 6 4 any-rep } T{ ##replace f 6 D 0 } } -] [ +} [ { T{ ##peek f 1 D 1 } T{ ##peek f 2 D 2 } @@ -148,14 +148,14 @@ cpu x86.64? [ } value-numbering-step trim-temps ] unit-test -[ +{ { T{ ##peek f 1 D 1 } T{ ##compare-imm f 2 1 16 cc= } T{ ##copy f 3 2 any-rep } T{ ##replace f 3 D 0 } } -] [ +} [ { T{ ##peek f 1 D 1 } T{ ##compare-imm f 2 1 16 cc= } @@ -164,7 +164,7 @@ cpu x86.64? [ } value-numbering-step trim-temps ] unit-test -[ +{ { T{ ##peek f 1 D 1 } T{ ##peek f 2 D 2 } @@ -172,7 +172,7 @@ cpu x86.64? [ T{ ##copy f 6 4 any-rep } T{ ##replace f 6 D 0 } } -] [ +} [ { T{ ##peek f 1 D 1 } T{ ##peek f 2 D 2 } @@ -182,7 +182,7 @@ cpu x86.64? [ } value-numbering-step trim-temps ] unit-test -[ +{ { T{ ##peek f 1 D 1 } T{ ##peek f 2 D 2 } @@ -190,7 +190,7 @@ cpu x86.64? [ T{ ##compare-integer f 6 2 1 cc/<= } T{ ##replace f 6 D 0 } } -] [ +} [ { T{ ##peek f 1 D 1 } T{ ##peek f 2 D 2 } @@ -200,14 +200,14 @@ cpu x86.64? [ } value-numbering-step trim-temps ] unit-test -[ +{ { T{ ##peek f 1 D 1 } T{ ##compare-integer-imm f 2 1 100 cc<= } T{ ##compare-integer-imm f 3 1 100 cc/<= } T{ ##replace f 3 D 0 } } -] [ +} [ { T{ ##peek f 1 D 1 } T{ ##compare-integer-imm f 2 1 100 cc<= } @@ -216,7 +216,7 @@ cpu x86.64? [ } value-numbering-step trim-temps ] unit-test -[ +{ { T{ ##peek f 8 D 0 } T{ ##peek f 9 D -1 } @@ -224,7 +224,7 @@ cpu x86.64? [ T{ ##compare-float-unordered f 14 8 9 cc/< } T{ ##replace f 14 D 0 } } -] [ +} [ { T{ ##peek f 8 D 0 } T{ ##peek f 9 D -1 } @@ -234,14 +234,14 @@ cpu x86.64? [ } value-numbering-step trim-temps ] unit-test -[ +{ { T{ ##peek f 29 D -1 } T{ ##peek f 30 D -2 } T{ ##compare f 33 29 30 cc= } T{ ##compare-branch f 29 30 cc= } } -] [ +} [ { T{ ##peek f 29 D -1 } T{ ##peek f 30 D -2 } @@ -250,14 +250,14 @@ cpu x86.64? [ } value-numbering-step trim-temps ] unit-test -[ +{ { T{ ##peek f 29 D -1 } T{ ##peek f 30 D -2 } T{ ##compare-integer f 33 29 30 cc<= } T{ ##compare-integer-branch f 29 30 cc<= } } -] [ +} [ { T{ ##peek f 29 D -1 } T{ ##peek f 30 D -2 } @@ -266,14 +266,14 @@ cpu x86.64? [ } value-numbering-step trim-temps ] unit-test -[ +{ { T{ ##peek f 29 D -1 } T{ ##peek f 30 D -2 } T{ ##test f 33 29 30 cc= } T{ ##test-branch f 29 30 cc= } } -] [ +} [ { T{ ##peek f 29 D -1 } T{ ##peek f 30 D -2 } @@ -282,13 +282,13 @@ cpu x86.64? [ } value-numbering-step trim-temps ] unit-test -[ +{ { T{ ##peek f 29 D -1 } T{ ##test-imm f 33 29 30 cc= } T{ ##test-imm-branch f 29 30 cc= } } -] [ +} [ { T{ ##peek f 29 D -1 } T{ ##test-imm f 33 29 30 cc= } @@ -296,13 +296,13 @@ cpu x86.64? [ } value-numbering-step trim-temps ] unit-test -[ +{ { T{ ##peek f 1 D -1 } T{ ##test-vector f 2 1 f float-4-rep vcc-any } T{ ##test-vector-branch f 1 f float-4-rep vcc-any } } -] [ +} [ { T{ ##peek f 1 D -1 } T{ ##test-vector f 2 1 f float-4-rep vcc-any } @@ -327,13 +327,13 @@ cpu x86.32? [ ] when ! Immediate operand fusion -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 100 } T{ ##add-imm f 2 0 100 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 100 } @@ -341,13 +341,13 @@ cpu x86.32? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 100 } T{ ##add-imm f 2 0 100 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 100 } @@ -355,13 +355,13 @@ cpu x86.32? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 100 } T{ ##add-imm f 2 0 -100 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 100 } @@ -369,25 +369,25 @@ cpu x86.32? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 0 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##sub f 1 0 0 } } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 100 } T{ ##mul-imm f 2 0 100 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 100 } @@ -395,13 +395,13 @@ cpu x86.32? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 100 } T{ ##mul-imm f 2 0 100 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 100 } @@ -409,25 +409,25 @@ cpu x86.32? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 1 D 0 } T{ ##shl-imm f 2 1 3 } } -] [ +} [ { T{ ##peek f 1 D 0 } T{ ##mul-imm f 2 1 8 } } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 -1 } T{ ##neg f 2 0 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 -1 } @@ -435,13 +435,13 @@ cpu x86.32? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 -1 } T{ ##neg f 2 0 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 -1 } @@ -449,13 +449,13 @@ cpu x86.32? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 0 } T{ ##neg f 2 0 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 0 } @@ -463,14 +463,14 @@ cpu x86.32? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 0 } T{ ##neg f 2 0 } T{ ##copy f 3 0 any-rep } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 0 } @@ -479,13 +479,13 @@ cpu x86.32? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##neg f 1 0 } T{ ##copy f 2 0 any-rep } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##neg f 1 0 } @@ -493,13 +493,13 @@ cpu x86.32? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##not f 1 0 } T{ ##copy f 2 0 any-rep } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##not f 1 0 } @@ -507,13 +507,13 @@ cpu x86.32? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 100 } T{ ##and-imm f 2 0 100 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 100 } @@ -521,13 +521,13 @@ cpu x86.32? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 100 } T{ ##and-imm f 2 0 100 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 100 } @@ -535,13 +535,13 @@ cpu x86.32? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 100 } T{ ##or-imm f 2 0 100 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 100 } @@ -549,13 +549,13 @@ cpu x86.32? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 100 } T{ ##or-imm f 2 0 100 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 100 } @@ -563,13 +563,13 @@ cpu x86.32? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 100 } T{ ##xor-imm f 2 0 100 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 100 } @@ -577,13 +577,13 @@ cpu x86.32? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 100 } T{ ##xor-imm f 2 0 100 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 100 } @@ -591,13 +591,13 @@ cpu x86.32? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 100 } T{ ##compare-imm f 2 0 100 cc= } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 100 } @@ -605,13 +605,13 @@ cpu x86.32? [ } value-numbering-step trim-temps ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 100 } T{ ##compare-integer-imm f 2 0 100 cc<= } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 100 } @@ -679,13 +679,13 @@ cpu x86.32? [ ] unit-test ] unless -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 100 } T{ ##compare-integer-imm f 2 0 100 cc>= } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 100 } @@ -693,13 +693,13 @@ cpu x86.32? [ } value-numbering-step trim-temps ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 100 } T{ ##compare-integer-imm-branch f 0 100 cc<= } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 100 } @@ -707,13 +707,13 @@ cpu x86.32? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 100 } T{ ##compare-integer-imm-branch f 0 100 cc>= } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 100 } @@ -722,13 +722,13 @@ cpu x86.32? [ ] unit-test ! Compare folding -[ +{ { T{ ##load-integer f 1 100 } T{ ##load-integer f 2 200 } T{ ##load-reference f 3 t } } -] [ +} [ { T{ ##load-integer f 1 100 } T{ ##load-integer f 2 200 } @@ -736,13 +736,13 @@ cpu x86.32? [ } value-numbering-step trim-temps ] unit-test -[ +{ { T{ ##load-integer f 1 100 } T{ ##load-integer f 2 200 } T{ ##load-reference f 3 f } } -] [ +} [ { T{ ##load-integer f 1 100 } T{ ##load-integer f 2 200 } @@ -750,25 +750,25 @@ cpu x86.32? [ } value-numbering-step trim-temps ] unit-test -[ +{ { T{ ##load-integer f 1 100 } T{ ##load-reference f 2 f } } -] [ +} [ { T{ ##load-integer f 1 100 } T{ ##compare-integer-imm f 2 1 123 cc= } } value-numbering-step trim-temps ] unit-test -[ +{ { T{ ##load-integer f 1 10 } T{ ##load-integer f 2 20 } T{ ##load-reference f 3 f } } -] [ +} [ { T{ ##load-integer f 1 10 } T{ ##load-integer f 2 20 } @@ -776,13 +776,13 @@ cpu x86.32? [ } value-numbering-step ] unit-test -[ +{ { T{ ##load-integer f 1 1 } T{ ##load-integer f 2 2 } T{ ##load-reference f 3 t } } -] [ +} [ { T{ ##load-integer f 1 1 } T{ ##load-integer f 2 2 } @@ -790,13 +790,13 @@ cpu x86.32? [ } value-numbering-step ] unit-test -[ +{ { T{ ##load-integer f 1 1 } T{ ##load-integer f 2 2 } T{ ##load-reference f 3 t } } -] [ +} [ { T{ ##load-integer f 1 1 } T{ ##load-integer f 2 2 } @@ -804,13 +804,13 @@ cpu x86.32? [ } value-numbering-step ] unit-test -[ +{ { T{ ##load-integer f 1 10 } T{ ##load-integer f 2 20 } T{ ##load-reference f 3 f } } -] [ +} [ { T{ ##load-integer f 1 10 } T{ ##load-integer f 2 20 } @@ -818,25 +818,25 @@ cpu x86.32? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-reference f 1 f } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##compare-integer f 1 0 0 cc< } } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##copy f 1 0 any-rep } T{ ##load-reference f 2 f } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##copy f 1 0 any-rep } @@ -844,108 +844,108 @@ cpu x86.32? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-reference f 1 t } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##compare-integer f 1 0 0 cc<= } } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-reference f 1 f } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##compare-integer f 1 0 0 cc> } } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-reference f 1 t } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##compare-integer f 1 0 0 cc>= } } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-reference f 1 f } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##compare-integer f 1 0 0 cc/= } } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-reference f 1 t } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##compare-integer f 1 0 0 cc= } } value-numbering-step ] unit-test -[ +{ { T{ ##load-integer f 1 10 } T{ ##load-reference f 2 t } } -] [ +} [ { T{ ##load-integer f 1 10 } T{ ##compare-imm f 2 1 10 cc= } } value-numbering-step ] unit-test -[ +{ { T{ ##load-integer f 1 10 } T{ ##load-reference f 2 f } } -] [ +} [ { T{ ##load-integer f 1 10 } T{ ##compare-imm f 2 1 20 cc= } } value-numbering-step ] unit-test -[ +{ { T{ ##load-integer f 1 10 } T{ ##load-reference f 2 t } } -] [ +} [ { T{ ##load-integer f 1 10 } T{ ##compare-imm f 2 1 100 cc/= } } value-numbering-step ] unit-test -[ +{ { T{ ##load-integer f 1 10 } T{ ##load-reference f 2 f } } -] [ +} [ { T{ ##load-integer f 1 10 } T{ ##compare-imm f 2 1 10 cc/= } @@ -1002,72 +1002,72 @@ cpu x86.32? [ ] unit-test ] when -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-reference f 1 t } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##compare f 1 0 0 cc= } } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-reference f 1 f } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##compare f 1 0 0 cc/= } } value-numbering-step ] unit-test -[ +{ { T{ ##load-integer f 1 12 } T{ ##load-reference f 3 t } } -] [ +} [ { T{ ##load-integer f 1 12 } T{ ##test-imm f 3 1 13 cc/= } } value-numbering-step ] unit-test -[ +{ { T{ ##load-integer f 1 15 } T{ ##load-reference f 3 f } } -] [ +} [ { T{ ##load-integer f 1 15 } T{ ##test-imm f 3 1 16 cc/= } } value-numbering-step ] unit-test -[ +{ { T{ ##load-integer f 1 12 } T{ ##load-reference f 3 f } } -] [ +} [ { T{ ##load-integer f 1 12 } T{ ##test-imm f 3 1 13 cc= } } value-numbering-step ] unit-test -[ +{ { T{ ##load-integer f 1 15 } T{ ##load-reference f 3 t } } -] [ +} [ { T{ ##load-integer f 1 15 } T{ ##test-imm f 3 1 16 cc= } @@ -1075,14 +1075,14 @@ cpu x86.32? [ ] unit-test ! Rewriting a ##test of an ##and into a ##test -[ +{ { T{ ##peek f 0 D 0 } T{ ##peek f 1 D 1 } T{ ##and f 2 0 1 } T{ ##test f 3 0 1 cc= } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##peek f 1 D 1 } @@ -1091,13 +1091,13 @@ cpu x86.32? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##and-imm f 2 0 12 } T{ ##test-imm f 3 0 12 cc= } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##and-imm f 2 0 12 } @@ -1106,13 +1106,13 @@ cpu x86.32? [ ] unit-test ! Rewriting ##test into ##test-imm -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 10 } T{ ##test-imm f 2 0 10 cc= } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 10 } @@ -1120,13 +1120,13 @@ cpu x86.32? [ } value-numbering-step trim-temps ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 10 } T{ ##test-imm f 2 0 10 cc= } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 10 } @@ -1134,13 +1134,13 @@ cpu x86.32? [ } value-numbering-step trim-temps ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 10 } T{ ##test-imm-branch f 0 10 cc= } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 10 } @@ -1148,13 +1148,13 @@ cpu x86.32? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 10 } T{ ##test-imm-branch f 0 10 cc= } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 10 } @@ -1162,13 +1162,13 @@ cpu x86.32? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 10 } T{ ##test-imm-branch f 0 10 cc= } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 10 } @@ -1283,7 +1283,7 @@ cpu x86? [ ] when ! Reassociation -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 100 } @@ -1291,7 +1291,7 @@ cpu x86? [ T{ ##load-integer f 3 50 } T{ ##add-imm f 4 0 150 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 100 } @@ -1301,7 +1301,7 @@ cpu x86? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 100 } @@ -1309,7 +1309,7 @@ cpu x86? [ T{ ##load-integer f 3 50 } T{ ##add-imm f 4 0 150 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 100 } @@ -1319,7 +1319,7 @@ cpu x86? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 100 } @@ -1327,7 +1327,7 @@ cpu x86? [ T{ ##load-integer f 3 50 } T{ ##add-imm f 4 0 50 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 100 } @@ -1337,7 +1337,7 @@ cpu x86? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 100 } @@ -1345,7 +1345,7 @@ cpu x86? [ T{ ##load-integer f 3 50 } T{ ##add-imm f 4 0 -150 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 100 } @@ -1355,7 +1355,7 @@ cpu x86? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 100 } @@ -1363,7 +1363,7 @@ cpu x86? [ T{ ##load-integer f 3 50 } T{ ##mul-imm f 4 0 5000 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 100 } @@ -1373,7 +1373,7 @@ cpu x86? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 100 } @@ -1381,7 +1381,7 @@ cpu x86? [ T{ ##load-integer f 3 50 } T{ ##mul-imm f 4 0 5000 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 100 } @@ -1391,7 +1391,7 @@ cpu x86? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 100 } @@ -1399,7 +1399,7 @@ cpu x86? [ T{ ##load-integer f 3 50 } T{ ##and-imm f 4 0 32 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 100 } @@ -1409,7 +1409,7 @@ cpu x86? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 100 } @@ -1417,7 +1417,7 @@ cpu x86? [ T{ ##load-integer f 3 50 } T{ ##and-imm f 4 0 32 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 100 } @@ -1427,7 +1427,7 @@ cpu x86? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 100 } @@ -1435,7 +1435,7 @@ cpu x86? [ T{ ##load-integer f 3 50 } T{ ##or-imm f 4 0 118 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 100 } @@ -1445,7 +1445,7 @@ cpu x86? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 100 } @@ -1453,7 +1453,7 @@ cpu x86? [ T{ ##load-integer f 3 50 } T{ ##or-imm f 4 0 118 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 100 } @@ -1463,7 +1463,7 @@ cpu x86? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 100 } @@ -1471,7 +1471,7 @@ cpu x86? [ T{ ##load-integer f 3 50 } T{ ##xor-imm f 4 0 86 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 100 } @@ -1481,7 +1481,7 @@ cpu x86? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 100 } @@ -1489,7 +1489,7 @@ cpu x86? [ T{ ##load-integer f 3 50 } T{ ##xor-imm f 4 0 86 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 100 } @@ -1499,14 +1499,14 @@ cpu x86? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##shl-imm f 1 0 10 } T{ ##shl-imm f 2 0 21 } T{ ##replace f 2 D 0 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##shl-imm f 1 0 10 } @@ -1515,14 +1515,14 @@ cpu x86? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##shl-imm f 1 0 10 } T{ ##shl-imm f 2 1 $[ cell-bits 1 - ] } T{ ##replace f 2 D 0 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##shl-imm f 1 0 10 } @@ -1531,14 +1531,14 @@ cpu x86? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##sar-imm f 1 0 10 } T{ ##sar-imm f 2 0 21 } T{ ##replace f 2 D 0 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##sar-imm f 1 0 10 } @@ -1547,14 +1547,14 @@ cpu x86? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##sar-imm f 1 0 10 } T{ ##sar-imm f 2 1 $[ cell-bits 1 - ] } T{ ##replace f 2 D 0 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##sar-imm f 1 0 10 } @@ -1563,14 +1563,14 @@ cpu x86? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##shr-imm f 1 0 10 } T{ ##shr-imm f 2 0 21 } T{ ##replace f 2 D 0 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##shr-imm f 1 0 10 } @@ -1579,14 +1579,14 @@ cpu x86? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##shr-imm f 1 0 10 } T{ ##shr-imm f 2 1 $[ cell-bits 1 - ] } T{ ##replace f 2 D 0 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##shr-imm f 1 0 10 } @@ -1595,14 +1595,14 @@ cpu x86? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##shr-imm f 1 0 10 } T{ ##sar-imm f 2 1 11 } T{ ##replace f 2 D 0 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##shr-imm f 1 0 10 } @@ -1614,7 +1614,7 @@ cpu x86? [ ! Distributive law 2 vreg-counter set-global -[ +{ { T{ ##peek f 0 D 0 } T{ ##add-imm f 1 0 10 } @@ -1622,7 +1622,7 @@ cpu x86? [ T{ ##add-imm f 2 3 40 } T{ ##replace f 2 D 0 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##add-imm f 1 0 10 } @@ -1631,7 +1631,7 @@ cpu x86? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##add-imm f 1 0 10 } @@ -1639,7 +1639,7 @@ cpu x86? [ T{ ##add-imm f 2 4 30 } T{ ##replace f 2 D 0 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##add-imm f 1 0 10 } @@ -1648,7 +1648,7 @@ cpu x86? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##add-imm f 1 0 -10 } @@ -1656,7 +1656,7 @@ cpu x86? [ T{ ##add-imm f 2 5 -40 } T{ ##replace f 2 D 0 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##sub-imm f 1 0 10 } @@ -1665,7 +1665,7 @@ cpu x86? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##add-imm f 1 0 -10 } @@ -1673,7 +1673,7 @@ cpu x86? [ T{ ##add-imm f 2 6 -30 } T{ ##replace f 2 D 0 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##sub-imm f 1 0 10 } @@ -1683,14 +1683,14 @@ cpu x86? [ ] unit-test ! Simplification -[ +{ { T{ ##peek f 0 D 0 } T{ ##peek f 1 D 1 } T{ ##copy f 3 0 any-rep } T{ ##replace f 3 D 0 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##peek f 1 D 1 } @@ -1699,14 +1699,14 @@ cpu x86? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##peek f 1 D 1 } T{ ##copy f 3 0 any-rep } T{ ##replace f 3 D 0 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##peek f 1 D 1 } @@ -1715,14 +1715,14 @@ cpu x86? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##peek f 1 D 1 } T{ ##copy f 3 0 any-rep } T{ ##replace f 3 D 0 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##peek f 1 D 1 } @@ -1731,25 +1731,25 @@ cpu x86? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 0 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##and-imm f 1 0 0 } } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##copy f 1 0 any-rep } T{ ##replace f 1 D 0 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##and-imm f 1 0 -1 } @@ -1757,13 +1757,13 @@ cpu x86? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##copy f 1 0 any-rep } T{ ##replace f 1 D 0 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##and f 1 0 0 } @@ -1771,13 +1771,13 @@ cpu x86? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##copy f 1 0 any-rep } T{ ##replace f 1 D 0 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##or-imm f 1 0 0 } @@ -1785,25 +1785,25 @@ cpu x86? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 -1 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##or-imm f 1 0 -1 } } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##copy f 1 0 any-rep } T{ ##replace f 1 D 0 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##or f 1 0 0 } @@ -1811,13 +1811,13 @@ cpu x86? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##copy f 1 0 any-rep } T{ ##replace f 1 D 0 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##xor-imm f 1 0 0 } @@ -1825,13 +1825,13 @@ cpu x86? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##not f 1 0 } T{ ##replace f 1 D 0 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##xor-imm f 1 0 -1 } @@ -1839,25 +1839,25 @@ cpu x86? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 0 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##xor f 1 0 0 } } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##copy f 2 0 any-rep } T{ ##replace f 2 D 0 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##mul-imm f 2 0 1 } @@ -1865,13 +1865,13 @@ cpu x86? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##copy f 2 0 any-rep } T{ ##replace f 2 D 0 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##shl-imm f 2 0 0 } @@ -1879,13 +1879,13 @@ cpu x86? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##copy f 2 0 any-rep } T{ ##replace f 2 D 0 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##shr-imm f 2 0 0 } @@ -1893,13 +1893,13 @@ cpu x86? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##copy f 2 0 any-rep } T{ ##replace f 2 D 0 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##sar-imm f 2 0 0 } @@ -1908,14 +1908,14 @@ cpu x86? [ ] unit-test ! Constant folding -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 1 } T{ ##load-integer f 2 3 } T{ ##load-integer f 3 4 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 1 } @@ -1924,14 +1924,14 @@ cpu x86? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 1 } T{ ##load-integer f 2 3 } T{ ##load-integer f 3 -2 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 1 } @@ -1940,14 +1940,14 @@ cpu x86? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 2 } T{ ##load-integer f 2 3 } T{ ##load-integer f 3 6 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 2 } @@ -1956,14 +1956,14 @@ cpu x86? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 2 } T{ ##load-integer f 2 1 } T{ ##load-integer f 3 0 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 2 } @@ -1972,14 +1972,14 @@ cpu x86? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 2 } T{ ##load-integer f 2 1 } T{ ##load-integer f 3 3 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 2 } @@ -1988,14 +1988,14 @@ cpu x86? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 2 } T{ ##load-integer f 2 3 } T{ ##load-integer f 3 1 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 2 } @@ -2004,13 +2004,13 @@ cpu x86? [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 1 } T{ ##load-integer f 3 8 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 1 } @@ -2034,13 +2034,13 @@ cell 8 = [ ] unit-test ] when -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 -8 } T{ ##load-integer f 3 -4 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 -8 } @@ -2099,13 +2099,13 @@ cell 8 = [ ] unless ] when -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 1 } T{ ##load-integer f 2 -1 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 1 } @@ -2113,13 +2113,13 @@ cell 8 = [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 1 } T{ ##load-integer f 2 -2 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##load-integer f 1 1 } @@ -2128,13 +2128,13 @@ cell 8 = [ ] unit-test ! ##tagged>integer constant folding -[ +{ { T{ ##load-reference f 1 f } T{ ##load-integer f 2 $[ \ f type-number ] } T{ ##copy f 3 2 any-rep } } -] [ +} [ { T{ ##load-reference f 1 f } T{ ##tagged>integer f 2 1 } @@ -2142,13 +2142,13 @@ cell 8 = [ } value-numbering-step ] unit-test -[ +{ { T{ ##load-integer f 1 100 } T{ ##load-integer f 2 $[ 100 tag-fixnum ] } T{ ##load-integer f 3 $[ 100 tag-fixnum 1 + ] } } -] [ +} [ { T{ ##load-integer f 1 100 } T{ ##tagged>integer f 2 1 } @@ -2157,14 +2157,14 @@ cell 8 = [ ] unit-test ! Alien boxing and unboxing -[ +{ { T{ ##peek f 0 D 0 } T{ ##box-alien f 1 0 } T{ ##copy f 2 0 any-rep } T{ ##replace f 2 D 0 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##box-alien f 1 0 } @@ -2173,14 +2173,14 @@ cell 8 = [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##box-alien f 1 0 } T{ ##copy f 2 0 any-rep } T{ ##replace f 2 D 0 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##box-alien f 1 0 } @@ -2189,14 +2189,14 @@ cell 8 = [ } value-numbering-step ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-integer f 2 0 } T{ ##copy f 1 0 any-rep } T{ ##replace f 1 D 0 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##load-integer f 2 0 } @@ -2207,7 +2207,7 @@ cell 8 = [ 3 vreg-counter set-global -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-integer f 2 16 } @@ -2215,7 +2215,7 @@ cell 8 = [ T{ ##unbox-any-c-ptr f 4 0 } T{ ##add-imm f 3 4 16 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##load-integer f 2 16 } @@ -2226,7 +2226,7 @@ cell 8 = [ 4 vreg-counter set-global -[ +{ { T{ ##box-alien f 0 1 } T{ ##load-integer f 2 16 } @@ -2234,7 +2234,7 @@ cell 8 = [ T{ ##copy f 5 1 any-rep } T{ ##add-imm f 4 5 16 } } -] [ +} [ { T{ ##box-alien f 0 1 } T{ ##load-integer f 2 16 } @@ -2245,14 +2245,14 @@ cell 8 = [ 3 vreg-counter set-global -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-integer f 2 0 } T{ ##copy f 3 0 any-rep } T{ ##replace f 3 D 1 } } -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##load-integer f 2 0 } @@ -2262,59 +2262,59 @@ cell 8 = [ ] unit-test ! Various SIMD simplifications -[ +{ { T{ ##vector>scalar f 1 0 float-4-rep } T{ ##copy f 2 0 any-rep } } -] [ +} [ { T{ ##vector>scalar f 1 0 float-4-rep } T{ ##scalar>vector f 2 1 float-4-rep } } value-numbering-step ] unit-test -[ +{ { T{ ##copy f 1 0 any-rep } } -] [ +} [ { T{ ##shuffle-vector-imm f 1 0 { 0 1 2 3 } float-4-rep } } value-numbering-step ] unit-test -[ +{ { T{ ##shuffle-vector-imm f 1 0 { 1 2 3 0 } float-4-rep } T{ ##shuffle-vector-imm f 2 0 { 0 2 3 1 } float-4-rep } } -] [ +} [ { T{ ##shuffle-vector-imm f 1 0 { 1 2 3 0 } float-4-rep } T{ ##shuffle-vector-imm f 2 1 { 3 1 2 0 } float-4-rep } } value-numbering-step ] unit-test -[ +{ { T{ ##shuffle-vector-imm f 1 0 { 1 2 3 0 } float-4-rep } T{ ##shuffle-vector-imm f 2 1 { 1 0 } double-2-rep } } -] [ +} [ { T{ ##shuffle-vector-imm f 1 0 { 1 2 3 0 } float-4-rep } T{ ##shuffle-vector-imm f 2 1 { 1 0 } double-2-rep } } value-numbering-step ] unit-test -[ +{ { T{ ##load-integer f 0 55 } T{ ##load-reference f 1 B{ 55 0 0 0 55 0 0 0 55 0 0 0 55 0 0 0 } } T{ ##load-reference f 2 B{ 55 0 0 0 55 0 0 0 55 0 0 0 55 0 0 0 } } } -] [ +} [ { T{ ##load-integer f 0 55 } T{ ##scalar>vector f 1 0 int-4-rep } @@ -2322,13 +2322,13 @@ cell 8 = [ } value-numbering-step ] unit-test -[ +{ { T{ ##load-reference f 0 1.25 } T{ ##load-reference f 1 B{ 0 0 160 63 0 0 160 63 0 0 160 63 0 0 160 63 } } T{ ##load-reference f 2 B{ 0 0 160 63 0 0 160 63 0 0 160 63 0 0 160 63 } } } -] [ +} [ { T{ ##load-reference f 0 1.25 } T{ ##scalar>vector f 1 0 float-4-rep } @@ -2336,13 +2336,13 @@ cell 8 = [ } value-numbering-step ] unit-test -[ +{ { T{ ##load-reference f 0 1.25 } T{ ##load-reference f 1 B{ 0 0 160 63 0 0 160 63 0 0 160 63 0 0 160 63 } } T{ ##load-reference f 2 B{ 0 0 160 63 0 0 160 63 0 0 160 63 0 0 160 63 } } } -] [ +} [ { T{ ##load-reference f 0 1.25 } T{ ##scalar>vector f 1 0 float-4-rep } @@ -2350,14 +2350,14 @@ cell 8 = [ } value-numbering-step ] unit-test -[ +{ { T{ ##load-integer f 0 55 } T{ ##load-reference f 1 B{ 55 0 55 0 55 0 55 0 55 0 55 0 55 0 55 0 } } T{ ##load-reference f 2 B{ 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 } } T{ ##load-reference f 3 B{ 0 55 0 55 0 55 0 55 0 55 0 55 0 55 0 55 } } } -] [ +} [ { T{ ##load-integer f 0 55 } T{ ##scalar>vector f 1 0 short-8-rep } @@ -2366,13 +2366,13 @@ cell 8 = [ } value-numbering-step ] unit-test -[ +{ { T{ ##load-reference f 0 1.25 } T{ ##load-reference f 2 3.75 } T{ ##load-reference f 4 B{ 0 0 0 0 0 0 244 63 0 0 0 0 0 0 14 64 } } } -] [ +} [ { T{ ##load-reference f 0 1.25 } T{ ##load-reference f 2 3.75 } @@ -2380,13 +2380,13 @@ cell 8 = [ } value-numbering-step ] unit-test -[ +{ { T{ ##load-integer f 0 125 } T{ ##load-integer f 2 375 } T{ ##load-reference f 4 B{ 125 0 0 0 0 0 0 0 119 1 0 0 0 0 0 0 } } } -] [ +} [ { T{ ##load-integer f 0 125 } T{ ##load-integer f 2 375 } @@ -2394,7 +2394,7 @@ cell 8 = [ } value-numbering-step ] unit-test -[ +{ { T{ ##load-reference f 0 1.25 } T{ ##load-reference f 1 2.50 } @@ -2402,7 +2402,7 @@ cell 8 = [ T{ ##load-reference f 3 5.00 } T{ ##load-reference f 4 B{ 0 0 160 63 0 0 32 64 0 0 112 64 0 0 160 64 } } } -] [ +} [ { T{ ##load-reference f 0 1.25 } T{ ##load-reference f 1 2.50 } @@ -2412,7 +2412,7 @@ cell 8 = [ } value-numbering-step ] unit-test -[ +{ { T{ ##load-integer f 0 125 } T{ ##load-integer f 1 250 } @@ -2420,7 +2420,7 @@ cell 8 = [ T{ ##load-integer f 3 500 } T{ ##load-reference f 4 B{ 125 0 0 0 250 0 0 0 119 1 0 0 244 1 0 0 } } } -] [ +} [ { T{ ##load-integer f 0 125 } T{ ##load-integer f 1 250 } @@ -2430,11 +2430,11 @@ cell 8 = [ } value-numbering-step ] unit-test -[ +{ { T{ ##zero-vector f 2 float-4-rep } } -] [ +} [ { T{ ##xor-vector f 2 1 1 float-4-rep } } value-numbering-step @@ -2442,13 +2442,13 @@ cell 8 = [ ! NOT x AND y => x ANDN y -[ +{ { T{ ##fill-vector f 3 float-4-rep } T{ ##xor-vector f 4 0 3 float-4-rep } T{ ##andn-vector f 5 0 1 float-4-rep } } -] [ +} [ { T{ ##fill-vector f 3 float-4-rep } T{ ##xor-vector f 4 0 3 float-4-rep } @@ -2456,12 +2456,12 @@ cell 8 = [ } value-numbering-step ] unit-test -[ +{ { T{ ##not-vector f 4 0 float-4-rep } T{ ##andn-vector f 5 0 1 float-4-rep } } -] [ +} [ { T{ ##not-vector f 4 0 float-4-rep } T{ ##and-vector f 5 4 1 float-4-rep } @@ -2470,13 +2470,13 @@ cell 8 = [ ! x AND NOT y => y ANDN x -[ +{ { T{ ##fill-vector f 3 float-4-rep } T{ ##xor-vector f 4 0 3 float-4-rep } T{ ##andn-vector f 5 0 1 float-4-rep } } -] [ +} [ { T{ ##fill-vector f 3 float-4-rep } T{ ##xor-vector f 4 0 3 float-4-rep } @@ -2484,12 +2484,12 @@ cell 8 = [ } value-numbering-step ] unit-test -[ +{ { T{ ##not-vector f 4 0 float-4-rep } T{ ##andn-vector f 5 0 1 float-4-rep } } -] [ +} [ { T{ ##not-vector f 4 0 float-4-rep } T{ ##and-vector f 5 1 4 float-4-rep } @@ -2498,13 +2498,13 @@ cell 8 = [ ! NOT x ANDN y => x AND y -[ +{ { T{ ##fill-vector f 3 float-4-rep } T{ ##xor-vector f 4 0 3 float-4-rep } T{ ##and-vector f 5 0 1 float-4-rep } } -] [ +} [ { T{ ##fill-vector f 3 float-4-rep } T{ ##xor-vector f 4 0 3 float-4-rep } @@ -2512,12 +2512,12 @@ cell 8 = [ } value-numbering-step ] unit-test -[ +{ { T{ ##not-vector f 4 0 float-4-rep } T{ ##and-vector f 5 0 1 float-4-rep } } -] [ +} [ { T{ ##not-vector f 4 0 float-4-rep } T{ ##andn-vector f 5 4 1 float-4-rep } @@ -2526,7 +2526,7 @@ cell 8 = [ ! AND <=> ANDN -[ +{ { T{ ##fill-vector f 3 float-4-rep } T{ ##xor-vector f 4 0 3 float-4-rep } @@ -2534,7 +2534,7 @@ cell 8 = [ T{ ##and-vector f 6 0 2 float-4-rep } T{ ##or-vector f 7 5 6 float-4-rep } } -] [ +} [ { T{ ##fill-vector f 3 float-4-rep } T{ ##xor-vector f 4 0 3 float-4-rep } @@ -2544,14 +2544,14 @@ cell 8 = [ } value-numbering-step ] unit-test -[ +{ { T{ ##not-vector f 4 0 float-4-rep } T{ ##andn-vector f 5 0 1 float-4-rep } T{ ##and-vector f 6 0 2 float-4-rep } T{ ##or-vector f 7 5 6 float-4-rep } } -] [ +} [ { T{ ##not-vector f 4 0 float-4-rep } T{ ##and-vector f 5 4 1 float-4-rep } @@ -2566,14 +2566,14 @@ cell 8 = [ [ V{ 0 1 } clone >>successors basic-block set value-numbering-step ] keep successors>> first ; -[ +{ { T{ ##load-integer f 1 1 } T{ ##load-integer f 2 2 } T{ ##branch } } 1 -] [ +} [ { T{ ##load-integer f 1 1 } T{ ##load-integer f 2 2 } @@ -2581,14 +2581,14 @@ cell 8 = [ } test-branch-folding ] unit-test -[ +{ { T{ ##load-integer f 1 1 } T{ ##load-integer f 2 2 } T{ ##branch } } 0 -] [ +} [ { T{ ##load-integer f 1 1 } T{ ##load-integer f 2 2 } @@ -2596,14 +2596,14 @@ cell 8 = [ } test-branch-folding ] unit-test -[ +{ { T{ ##load-integer f 1 1 } T{ ##load-integer f 2 2 } T{ ##branch } } 0 -] [ +} [ { T{ ##load-integer f 1 1 } T{ ##load-integer f 2 2 } @@ -2611,14 +2611,14 @@ cell 8 = [ } test-branch-folding ] unit-test -[ +{ { T{ ##load-integer f 1 1 } T{ ##load-integer f 2 2 } T{ ##branch } } 1 -] [ +} [ { T{ ##load-integer f 1 1 } T{ ##load-integer f 2 2 } @@ -2626,92 +2626,92 @@ cell 8 = [ } test-branch-folding ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##branch } } 1 -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##compare-integer-branch f 0 0 cc< } } test-branch-folding ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##branch } } 0 -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##compare-integer-branch f 0 0 cc<= } } test-branch-folding ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##branch } } 1 -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##compare-integer-branch f 0 0 cc> } } test-branch-folding ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##branch } } 0 -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##compare-integer-branch f 0 0 cc>= } } test-branch-folding ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##branch } } 0 -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##compare-integer-branch f 0 0 cc= } } test-branch-folding ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##branch } } 1 -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##compare-integer-branch f 0 0 cc/= } } test-branch-folding ] unit-test -[ +{ { T{ ##peek f 0 D 0 } T{ ##load-reference f 1 t } T{ ##branch } } 0 -] [ +} [ { T{ ##peek f 0 D 0 } T{ ##compare f 1 0 0 cc<= } @@ -2745,18 +2745,18 @@ V{ test-diamond -[ ] [ +{ } [ 0 get block>cfg dup cfg set [ value-numbering ] [ select-representations ] [ destruct-ssa ] tri ] unit-test -[ 1 ] [ 1 get successors>> length ] unit-test +{ 1 } [ 1 get successors>> length ] unit-test -[ t ] [ 1 get successors>> first 3 get eq? ] unit-test +{ t } [ 1 get successors>> first 3 get eq? ] unit-test -[ 2 ] [ 4 get instructions>> length ] unit-test +{ 2 } [ 4 get instructions>> length ] unit-test V{ T{ ##peek f 0 D 0 } @@ -2785,14 +2785,14 @@ V{ test-diamond -[ ] [ +{ } [ 0 get block>cfg { value-numbering eliminate-dead-code } apply-passes ] unit-test -[ t ] [ 1 get successors>> first 3 get eq? ] unit-test +{ t } [ 1 get successors>> first 3 get eq? ] unit-test -[ 1 ] [ 3 get instructions>> first inputs>> assoc-size ] unit-test +{ 1 } [ 3 get instructions>> first inputs>> assoc-size ] unit-test V{ T{ ##prologue } T{ ##branch } } 0 test-bb @@ -2852,12 +2852,12 @@ V{ 2 3 edge 4 5 edge -[ ] [ +{ } [ 0 get block>cfg { value-numbering eliminate-dead-code } apply-passes ] unit-test -[ f ] [ 1 get instructions>> [ ##peek? ] any? ] unit-test +{ f } [ 1 get instructions>> [ ##peek? ] any? ] unit-test ! Slot addressing optimization cpu x86? [ @@ -2881,14 +2881,14 @@ cpu x86? [ ! Alien addressing optimization ! Base offset fusion on ##load/store-memory-imm -[ +{ V{ T{ ##peek f 1 D 0 } T{ ##tagged>integer f 2 1 } T{ ##add-imm f 3 2 10 } T{ ##load-memory-imm f 4 2 10 int-rep c:uchar } } -] [ +} [ V{ T{ ##peek f 1 D 0 } T{ ##tagged>integer f 2 1 } @@ -2897,7 +2897,7 @@ cpu x86? [ } value-numbering-step ] unit-test -[ +{ V{ T{ ##peek f 0 D 0 } T{ ##peek f 1 D 1 } @@ -2906,7 +2906,7 @@ cpu x86? [ T{ ##add-imm f 4 3 10 } T{ ##store-memory-imm f 2 3 10 int-rep c:uchar } } -] [ +} [ V{ T{ ##peek f 0 D 0 } T{ ##peek f 1 D 1 } @@ -2918,7 +2918,7 @@ cpu x86? [ ] unit-test ! Displacement fusion on ##load/store-memory-imm -[ +{ V{ T{ ##peek f 0 D 0 } T{ ##peek f 1 D 1 } @@ -2927,7 +2927,7 @@ cpu x86? [ T{ ##add f 4 2 3 } T{ ##load-memory f 5 2 3 0 0 int-rep c:uchar } } -] [ +} [ V{ T{ ##peek f 0 D 0 } T{ ##peek f 1 D 1 } @@ -2938,7 +2938,7 @@ cpu x86? [ } value-numbering-step ] unit-test -[ +{ V{ T{ ##peek f 0 D 0 } T{ ##peek f 1 D 1 } @@ -2947,7 +2947,7 @@ cpu x86? [ T{ ##add f 4 2 3 } T{ ##store-memory f 5 2 3 0 0 int-rep c:uchar } } -] [ +} [ V{ T{ ##peek f 0 D 0 } T{ ##peek f 1 D 1 } @@ -3026,7 +3026,7 @@ cpu x86? ! Displacement offset fusion should not occur on ! ##load/store-memory with non-zero scale -[ ] [ +{ } [ V{ T{ ##peek f 0 D 0 } T{ ##peek f 1 D 1 } diff --git a/basis/compiler/cfg/write-barrier/write-barrier-tests.factor b/basis/compiler/cfg/write-barrier/write-barrier-tests.factor index b11ffa8716..87e53ad609 100644 --- a/basis/compiler/cfg/write-barrier/write-barrier-tests.factor +++ b/basis/compiler/cfg/write-barrier/write-barrier-tests.factor @@ -3,13 +3,13 @@ tools.test ; IN: compiler.cfg.write-barrier.tests ! Do need a write barrier on a random store. -[ +{ V{ T{ ##peek f 1 } T{ ##set-slot f 2 1 3 } T{ ##write-barrier f 1 3 } } -] [ +} [ V{ T{ ##peek f 1 } T{ ##set-slot f 2 1 3 } @@ -17,13 +17,13 @@ IN: compiler.cfg.write-barrier.tests } write-barriers-step ] unit-test -[ +{ V{ T{ ##peek f 1 } T{ ##set-slot-imm f 2 1 } T{ ##write-barrier-imm f 1 } } -] [ +} [ V{ T{ ##peek f 1 } T{ ##set-slot-imm f 2 1 } @@ -32,12 +32,12 @@ IN: compiler.cfg.write-barrier.tests ] unit-test ! Don't need a write barrier on freshly allocated objects. -[ +{ V{ T{ ##allot f 1 } T{ ##set-slot f 2 1 3 } } -] [ +} [ V{ T{ ##allot f 1 } T{ ##set-slot f 2 1 3 } @@ -45,12 +45,12 @@ IN: compiler.cfg.write-barrier.tests } write-barriers-step ] unit-test -[ +{ V{ T{ ##allot f 1 } T{ ##set-slot-imm f 2 1 } } -] [ +} [ V{ T{ ##allot f 1 } T{ ##set-slot-imm f 2 1 } @@ -60,14 +60,14 @@ IN: compiler.cfg.write-barrier.tests ! Do need a write barrier if there's a subroutine call between ! the allocation and the store. -[ +{ V{ T{ ##allot f 1 } T{ ##box } T{ ##set-slot f 2 1 3 } T{ ##write-barrier f 1 3 } } -] [ +} [ V{ T{ ##allot f 1 } T{ ##box } @@ -76,14 +76,14 @@ IN: compiler.cfg.write-barrier.tests } write-barriers-step ] unit-test -[ +{ V{ T{ ##allot f 1 } T{ ##box } T{ ##set-slot-imm f 2 1 } T{ ##write-barrier-imm f 1 } } -] [ +} [ V{ T{ ##allot f 1 } T{ ##box } @@ -93,13 +93,13 @@ IN: compiler.cfg.write-barrier.tests ] unit-test ! ##copy instructions -[ +{ V{ T{ ##copy f 2 1 } T{ ##set-slot-imm f 3 1 } T{ ##write-barrier-imm f 2 } } -] [ +} [ V{ T{ ##copy f 2 1 } T{ ##set-slot-imm f 3 1 } @@ -107,13 +107,13 @@ IN: compiler.cfg.write-barrier.tests } write-barriers-step ] unit-test -[ +{ V{ T{ ##copy f 2 1 } T{ ##set-slot-imm f 3 2 } T{ ##write-barrier-imm f 1 } } -] [ +} [ V{ T{ ##copy f 2 1 } T{ ##set-slot-imm f 3 2 } @@ -121,14 +121,14 @@ IN: compiler.cfg.write-barrier.tests } write-barriers-step ] unit-test -[ +{ V{ T{ ##copy f 2 1 } T{ ##copy f 3 2 } T{ ##set-slot-imm f 3 1 } T{ ##write-barrier-imm f 2 } } -] [ +} [ V{ T{ ##copy f 2 1 } T{ ##copy f 3 2 } @@ -137,14 +137,14 @@ IN: compiler.cfg.write-barrier.tests } write-barriers-step ] unit-test -[ +{ V{ T{ ##copy f 2 1 } T{ ##copy f 3 2 } T{ ##set-slot-imm f 4 1 } T{ ##write-barrier-imm f 3 } } -] [ +} [ V{ T{ ##copy f 2 1 } T{ ##copy f 3 2 } diff --git a/basis/compiler/codegen/codegen-tests.factor b/basis/compiler/codegen/codegen-tests.factor index c81164bff2..94514f0184 100644 --- a/basis/compiler/codegen/codegen-tests.factor +++ b/basis/compiler/codegen/codegen-tests.factor @@ -3,11 +3,11 @@ compiler.codegen.relocation tools.test cpu.architecture math kernel make compiler.constants words ; IN: compiler.codegen.tests -[ ] [ [ ] with-fixup drop ] unit-test -[ ] [ [ \ + %call ] with-fixup drop ] unit-test +{ } [ [ ] with-fixup drop ] unit-test +{ } [ [ \ + %call ] with-fixup drop ] unit-test -[ ] [ [