]> gitweb.factorcode.org Git - factor.git/commitdiff
factor: ?if to ?if-old
authorDoug Coleman <doug.coleman@gmail.com>
Tue, 14 Feb 2023 06:20:05 +0000 (00:20 -0600)
committerDoug Coleman <doug.coleman@gmail.com>
Sun, 26 Feb 2023 23:11:04 +0000 (17:11 -0600)
74 files changed:
basis/classes/struct/struct.factor
basis/cocoa/pasteboard/pasteboard.factor
basis/compiler/cfg/intrinsics/misc/misc.factor
basis/compiler/cfg/value-numbering/value-numbering.factor
basis/compiler/tree/propagation/simple/simple.factor
basis/concurrency/messaging/messaging.factor
basis/core-foundation/bundles/bundles.factor
basis/cpu/ppc/ppc.factor
basis/cpu/x86/x86.factor
basis/editors/editors.factor
basis/fixups/fixups.factor
basis/furnace/asides/asides.factor
basis/furnace/utilities/utilities.factor
basis/gobject-introspection/ffi/ffi.factor
basis/help/html/html.factor
basis/help/vocabs/vocabs.factor
basis/html/templates/chloe/chloe.factor
basis/html/templates/chloe/compiler/compiler.factor
basis/html/templates/chloe/syntax/syntax.factor
basis/http/server/static/static.factor
basis/interpolate/interpolate.factor
basis/io/encodings/gb18030/gb18030.factor
basis/io/sockets/secure/openssl/openssl.factor
basis/ip-parser/ip-parser.factor
basis/json/json.factor
basis/match/match.factor
basis/math/partial-dispatch/partial-dispatch.factor
basis/peg/peg.factor
basis/persistent/vectors/vectors.factor
basis/regexp/parser/parser.factor
basis/specialized-arrays/specialized-arrays.factor
basis/stack-checker/backend/backend.factor
basis/tools/completion/completion.factor
basis/tools/deploy/backend/backend.factor
basis/ui/backend/cocoa/views/views.factor
basis/ui/gadgets/gadgets.factor
basis/ui/pixel-formats/pixel-formats.factor
basis/ui/tools/listener/listener.factor
basis/unicode/case/case.factor
basis/unicode/data/data.factor
basis/unicode/normalize/normalize.factor
basis/vocabs/generated/generated.factor
basis/vocabs/metadata/metadata.factor
basis/vocabs/refresh/refresh.factor
basis/xml/entities/entities.factor
basis/xml/name/name.factor
basis/xml/tokenize/tokenize.factor
basis/xmode/keyword-map/keyword-map.factor
basis/xmode/marker/marker.factor
basis/xmode/marker/state/state.factor
core/classes/tuple/tuple.factor
core/combinators/combinators-docs.factor
core/continuations/continuations.factor
core/generic/generic.factor
core/generic/math/math.factor
core/generic/single/single.factor
core/kernel/kernel-docs.factor
core/kernel/kernel-tests.factor
core/kernel/kernel.factor
core/memoize/memoize.factor
core/parser/parser.factor
core/strings/strings.factor
core/vocabs/loader/loader.factor
core/vocabs/parser/parser.factor
extra/compiler/cfg/gvn/gvn.factor
extra/gml/runtime/runtime.factor
extra/math/matrices/elimination/elimination.factor
extra/money/money.factor
extra/multi-methods/multi-methods.factor
extra/pairs/pairs.factor
extra/reports/noise/noise.factor
extra/rosetta-code/probabilistic-choice/probabilistic-choice.factor
extra/smalltalk/parser/parser.factor
misc/vim/syntax/factor/generated.vim

index 300f4fd69e108e32bec58e8f5b7e9be5d6d3ee02..96f44afcfb936eeae8d9b4d3c141898893e49182 100644 (file)
@@ -65,7 +65,7 @@ M: struct >c-ptr
 <PRIVATE
 
 : init-struct ( class with-prototype: ( prototype -- alien ) sans-prototype: ( class -- alien ) -- alien )
-    '[ [ struct-prototype ] _ _ ??if ] keep memory>struct ; inline
+    '[ dup struct-prototype _ _ ?if-old ] keep memory>struct ; inline
 
 PRIVATE>
 
index c4e54c2266d61c68da3f614a91335f673633d65d..6deebbe3e6767b27bb07c30765c633988698d5f5 100644 (file)
@@ -28,7 +28,7 @@ CONSTANT: NSStringPboardType "NSStringPboardType"
 
 : ?pasteboard-string ( pboard error -- str/f )
     over pasteboard-string? [
-        swap pasteboard-string [ ] [ pasteboard-error ] ?if
+        swap pasteboard-string [ ] [ pasteboard-error ] ?if-old
     ] [
         nip pasteboard-error
     ] if ;
index 76603d5bfbbfcf967b41786fdee1a06b56b8f343..892cbd58ff4d51d4974eaaac493b1b56179860ad 100644 (file)
@@ -15,26 +15,26 @@ IN: compiler.cfg.intrinsics.misc
     [ [ cc= ^^compare-integer ] binary-op ] [ [ cc= ^^compare ] binary-op ] if ;
 
 : emit-special-object ( block node -- block' )
-    [ node-input-infos first literal>> ] [
+    dup node-input-infos first literal>> [
         ds-drop
         vm-special-object-offset ^^vm-field
         ds-push
-    ] [ emit-primitive ] ??if ;
+    ] [ emit-primitive ] ?if-old ;
 
 : emit-set-special-object ( block node -- block' )
-    [ node-input-infos second literal>> ] [
+    dup node-input-infos second literal>> [
         ds-drop
         [ ds-pop ] dip vm-special-object-offset ##set-vm-field,
-    ] [ emit-primitive ] ??if ;
+    ] [ emit-primitive ] ?if-old ;
 
 : context-object-offset ( n -- n )
     cells "context-objects" context offset-of + ;
 
 : emit-context-object ( block node -- block' )
-    [ node-input-infos first literal>> ] [
+    dup node-input-infos first literal>> [
         "ctx" vm offset-of ^^vm-field
         ds-drop swap context-object-offset cell /i 0 ^^slot-imm ds-push
-    ] [ emit-primitive ] ??if ;
+    ] [ emit-primitive ] ?if-old ;
 
 : emit-identity-hashcode ( -- )
     [
index 168024412b6e9279258f48884860caa46e99c53e..bf945f8a2b9b9539cb260e6aa70151dee53d3383 100644 (file)
@@ -30,17 +30,16 @@ GENERIC: process-instruction ( insn -- insn' )
     insn ;
 
 : check-redundancy ( insn -- insn' )
-    dup >expr
-    [ exprs>vns get at ]
-    [ redundant-instruction ] [ useful-instruction ] ??if ;
+    dup >expr dup exprs>vns get at
+    [ redundant-instruction ] [ useful-instruction ] ?if-old ;
 
 M: insn process-instruction
-    [ rewrite ] [ process-instruction ] ?when ;
+    dup rewrite [ process-instruction ] [ ] ?if-old ;
 
 M: foldable-insn process-instruction
-    [ rewrite ]
+    dup rewrite
     [ process-instruction ]
-    [ dup defs-vregs length 1 = [ check-redundancy ] when ] ??if ;
+    [ dup defs-vregs length 1 = [ check-redundancy ] when ] ?if-old ;
 
 M: ##copy process-instruction
     dup [ src>> vreg>vn ] [ dst>> ] bi set-vn ;
index b03d48403265f85991afa195e4ddb7853a3f18d4..7209408d3c07d92d59e01b0f4fdd0cbd6eddee8a 100644 (file)
@@ -103,7 +103,7 @@ ERROR: invalid-outputs #call infos ;
 
 : default-output-value-infos ( #call word -- infos )
     "default-output-classes" word-prop
-    [ class-infos ] [ out-d>> length object-info <repetition> ] ?if ;
+    [ class-infos ] [ out-d>> length object-info <repetition> ] ?if-old ;
 
 : output-value-infos ( #call word -- infos )
     {
index 78aa6e003f6732dd3c8ece5d68e00f2625c98650..8c3323851c344e9466bef4075930a7ca6754fa02 100644 (file)
@@ -9,9 +9,9 @@ GENERIC: send ( message thread -- )
 GENERIC: mailbox-of ( thread -- mailbox )
 
 M: thread mailbox-of
-    [ mailbox>> ]
+    dup mailbox>>
     [ { mailbox } declare ]
-    [ <mailbox> [ >>mailbox drop ] keep ] ??if ; inline
+    [ <mailbox> [ >>mailbox drop ] keep ] ?if-old ; inline
 
 M: thread send
     mailbox-of mailbox-put ;
index 24b54f9752c519342aacd0c6d202995c0face7ae..2bb62cdedaafb858f1eaa2ae6bfff3dc169dc075 100644 (file)
@@ -18,4 +18,4 @@ FUNCTION: Boolean CFBundleLoadExecutable ( CFBundleRef bundle )
 : load-framework ( name -- )
     [ <CFBundle> ]
     [ CFBundleLoadExecutable drop ]
-    [ "Cannot load bundle named " prepend throw ] ??if ;
+    [ "Cannot load bundle named " prepend throw ] ?if ;
index 4bfc26a5b6c70c465eaf0906751594c7d0ab6003..7a5e3a3ad6042229b7aa07557ce0c5ad16a3517a 100644 (file)
@@ -717,7 +717,7 @@ M: ppc.32 %load-memory-imm
             { float-rep  [ LFS ] }
             { double-rep [ LFD ] }
         } case
-    ] ?if ;
+    ] ?if-old ;
 
 M: ppc.64 %load-memory-imm
     [
@@ -738,7 +738,7 @@ M: ppc.64 %load-memory-imm
             { float-rep  [ [ scratch-reg ] dip LI scratch-reg LFSX ] }
             { double-rep [ [ scratch-reg ] dip LI scratch-reg LFDX ] }
         } case
-    ] ?if ;
+    ] ?if-old ;
 
 
 M: ppc.32 %load-memory
@@ -759,7 +759,7 @@ M: ppc.32 %load-memory
             { float-rep  [ LFSX ] }
             { double-rep [ LFDX ] }
         } case
-    ] ?if ;
+    ] ?if-old ;
 
 M: ppc.64 %load-memory
     [ [ 0 assert= ] bi@ ] 2dip
@@ -781,7 +781,7 @@ M: ppc.64 %load-memory
             { float-rep  [ LFSX ] }
             { double-rep [ LFDX ] }
         } case
-    ] ?if ;
+    ] ?if-old ;
 
 
 M: ppc.32 %store-memory-imm
@@ -800,7 +800,7 @@ M: ppc.32 %store-memory-imm
             { float-rep  [ STFS ] }
             { double-rep [ STFD ] }
         } case
-    ] ?if ;
+    ] ?if-old ;
 
 M: ppc.64 %store-memory-imm
     [
@@ -820,7 +820,7 @@ M: ppc.64 %store-memory-imm
             { float-rep  [ [ scratch-reg ] dip LI scratch-reg STFSX ] }
             { double-rep [ [ scratch-reg ] dip LI scratch-reg STFDX ] }
         } case
-    ] ?if ;
+    ] ?if-old ;
 
 M: ppc.32 %store-memory
     [ [ 0 assert= ] bi@ ] 2dip
@@ -839,7 +839,7 @@ M: ppc.32 %store-memory
             { float-rep  [ STFSX ] }
             { double-rep [ STFDX ] }
         } case
-    ] ?if ;
+    ] ?if-old ;
 
 M: ppc.64 %store-memory
     [ [ 0 assert= ] bi@ ] 2dip
@@ -860,7 +860,7 @@ M: ppc.64 %store-memory
             { float-rep  [ STFSX ] }
             { double-rep [ STFDX ] }
         } case
-    ] ?if ;
+    ] ?if-old ;
 
 M:: ppc %allot ( dst size class nursery-ptr -- )
     ! dst = vm->nursery.here;
index b16c833644db0abc81cc501c6fff812bd82b0192..431a6156e9504fc48c83220e960667f31866cd55 100644 (file)
@@ -409,7 +409,7 @@ M: x86 %convert-integer
             { c:int    [ 32 %alien-signed-getter ] }
             { c:uint   [ 32 [ 2drop ] %alien-integer-getter ] }
         } case
-    ] [ nipd %copy ] ?if ;
+    ] [ nipd %copy ] ?if-old ;
 
 M: x86 %load-memory
     (%memory) (%load-memory) ;
@@ -427,7 +427,7 @@ M: x86 %load-memory-imm
             { c:int    [ 32 %alien-integer-setter ] }
             { c:uint   [ 32 %alien-integer-setter ] }
         } case
-    ] [ [ nip swap ] dip %copy ] ?if ;
+    ] [ [ nip swap ] dip %copy ] ?if-old ;
 
 M: x86 %store-memory
     (%memory) (%store-memory) ;
index 72a3ae758ecf621dbfc11e5c4ed169a2d2582ce1..466dfc4baa0ec401d87cc4d7ec3affbd5f1e854e 100644 (file)
@@ -104,7 +104,7 @@ PRIVATE>
 GENERIC: edit ( object -- )
 
 M: object edit
-    [ where ] [ first2 edit-location ] [ cannot-find-source ] ??if ;
+    [ where ] [ first2 edit-location ] [ cannot-find-source ] ?if ;
 
 M: string edit edit-vocab ;
 
index 9c47f8708bd3891a2d9e12edbcf74bfea0d8ac29..72a3d6b4895dc7b0f7ca3935ddabd142f5dfe9b6 100644 (file)
@@ -63,6 +63,7 @@ CONSTANT: word-renames {
     { "count*" { "percent-of" "0.99" } }
     { "more?" { "deref?" "0.99" } }
     { "plox" { "?transmute" "0.99" } }
+    { "?if" { "?if-old" "0.99" } }
 }
 
 : compute-assoc-fixups ( continuation name assoc -- seq )
index caec27c0d0f93a3f54586ba2c120e6d4b0668953..4a4d5460cdecdb3d5707f806f415746bef7c9b01 100644 (file)
@@ -82,7 +82,7 @@ ERROR: end-aside-in-get-error ;
 
 : end-aside ( default -- response )
     [ drop aside-id get aside-id off get-aside ]
-    [ move-on ] [ <redirect> ] ??if ;
+    [ move-on ] [ <redirect> ] ?if ;
 
 M: asides link-attr
     drop
index db44ad3572e0d52cb031022380bfdaaf947e48a2..35544ae67e66ac4185eaaac5684cf747791a5b42 100644 (file)
@@ -32,7 +32,7 @@ ERROR: no-such-responder responder ;
 : base-path ( string -- seq )
     dup responder-nesting get
     [ second class-of superclasses-of [ name>> = ] with any? ] with find nip
-    [ first ] [ no-such-responder ] ?if ;
+    [ first ] [ no-such-responder ] ?if-old ;
 
 : resolve-base-path ( string -- string' )
     "$" ?head [
index 85c110e51f151aaeeb5db309891c1d34e47cace6..7d444f32bb05072735ed167ad99a87cecd891bb2 100644 (file)
@@ -313,8 +313,8 @@ M: array-type field-type>c-type type>c-type ;
 : defer-boxeds ( boxeds -- )
     [
         [
-            dup find-existing-boxed-type
-            [ ] [ c-type>> defer-c-type ] ?if
+            [ find-existing-boxed-type ]
+            [ c-type>> defer-c-type ] ?unless
         ]
         [ name>> qualified-name ] bi
         boxed-info new swap register-type
index f39aa2b46083466c8ab06c00647569f0296a6e99..426ef60fea581fcfff1d1122601843b7c803ad6b 100644 (file)
@@ -15,21 +15,23 @@ IN: help.html
 
 : escape-char ( ch -- )
     dup ascii? [
-        dup H{
-            { CHAR: \" "__quo__" }
-            { CHAR: * "__star__" }
-            { CHAR: : "__colon__" }
-            { CHAR: < "__lt__" }
-            { CHAR: > "__gt__" }
-            { CHAR: ? "__que__" }
-            { CHAR: \\ "__back__" }
-            { CHAR: | "__pipe__" }
-            { CHAR: / "__slash__" }
-            { CHAR: , "__comma__" }
-            { CHAR: @ "__at__" }
-            { CHAR: # "__hash__" }
-            { CHAR: % "__percent__" }
-        } at [ % ] [ , ] ?if
+        [
+            H{
+                { CHAR: \" "__quo__" }
+                { CHAR: * "__star__" }
+                { CHAR: : "__colon__" }
+                { CHAR: < "__lt__" }
+                { CHAR: > "__gt__" }
+                { CHAR: ? "__que__" }
+                { CHAR: \\ "__back__" }
+                { CHAR: | "__pipe__" }
+                { CHAR: / "__slash__" }
+                { CHAR: , "__comma__" }
+                { CHAR: @ "__at__" }
+                { CHAR: # "__hash__" }
+                { CHAR: % "__percent__" }
+            } at
+        ] [ % ] [ , ] ?if
     ] [ number>string "__" "__" surround % ] if ;
 
 : escape-filename ( string -- filename )
index a4ade54c9dfb13fb40bf7e06530f4b25c65f9e43..701de5c769dd7d13825962ae76b4c3efda2bc5ae 100644 (file)
@@ -56,7 +56,7 @@ C: <vocab-author> vocab-author
 
 : describe-help ( vocab -- )
     [
-        dup vocab-help
+        [ vocab-help ]
         [ "Documentation" $heading ($link) ]
         [ "Summary" $heading vocab-summary print-element ]
         ?if
index 0cffd9cc1ae2155ece4bd0d7fd82e55bfcd44e9d..c89eedc77b43a9734e21d103dc200766e798d60f 100644 (file)
@@ -27,7 +27,7 @@ CHLOE: write-title
 CHLOE: style
     [ "include" optional-attr ]
     [ utf8 file-contents [ add-style ] [code-with] ]
-    [ compile-children>string [ add-style ] [code] ] ??if ;
+    [ compile-children>string [ add-style ] [code] ] ?if ;
 
 CHLOE: write-style
     drop [
@@ -38,7 +38,7 @@ CHLOE: write-style
 CHLOE: script
     [ "include" optional-attr ]
     [ utf8 file-contents [ add-script ] [code-with] ]
-    [ compile-children>string [ add-script ] [code] ] ??if ;
+    [ compile-children>string [ add-script ] [code] ] ?if ;
 
 CHLOE: write-script
     drop [
index 5a1a9f49cabb8a412d465b765d741abfe29e720a..cf316d5013fd965555123fe1e528c37991ca8019 100644 (file)
@@ -121,7 +121,7 @@ ERROR: unknown-chloe-tag tag ;
     [ chloe-tags get at ]
     [ call( tag -- ) ]
     [ unknown-chloe-tag ]
-    ??if ;
+    ?if ;
 
 : compile-string ( string -- )
     string-context? get [ escape-string ] unless [write] ;
index f760f8632e1d21d725700f8137ac25e445fbd7b2..d0e49d581a3e8ddb3c000e5d52bf8306cef7bc8f 100644 (file)
@@ -22,7 +22,7 @@ XML-NS: chloe-name http://factorcode.org/chloe/1.0
 
 : required-attr ( tag name -- value )
     [ nip ] [ chloe-name attr ] 2bi
-    [ ] [ " attribute is required" append throw ] ?if ;
+    [ ] [ " attribute is required" append throw ] ?if-old ;
 
 : optional-attr ( tag name -- value )
     chloe-name attr ;
index 38ca7a3513b50de864f5828f6d6baffb13f8b41f..eba595ebf7d9180b0d685f91ebfff09a14fd7ed7 100644 (file)
@@ -53,7 +53,7 @@ TUPLE: file-responder root hook special index-names allow-listings ;
 : serve-file ( filename -- response )
     dup mime-type
     dup file-responder get special>> at
-    [ call( filename -- response ) ] [ serve-static ] ?if ;
+    [ call( filename -- response ) ] [ serve-static ] ?if-old ;
 
 \ serve-file NOTICE add-input-logging
 
@@ -165,7 +165,7 @@ TUPLE: file-responder root hook special index-names allow-listings ;
 : serve-directory ( filename -- response )
     url get path>> "/" tail? [
         dup
-        find-index [ serve-file ] [ list-directory ] ?if
+        find-index [ serve-file ] [ list-directory ] ?if-old
     ] [
         drop
         url get clone [ "/" append ] change-path <permanent-redirect>
index 40934b0f8e06bbf354e0b79246d186b097edcec0..1c08e878fa4f1c46bb90cedfe2c0a80c0a97cd2c 100644 (file)
@@ -23,7 +23,7 @@ TUPLE: anon-var ;
                 [
                     >string dup string>number
                     [ 1 + stack-var boa ]
-                    [ [ anon-var new ] [ named-var boa ] if-empty ] ?if ,
+                    [ [ anon-var new ] [ named-var boa ] if-empty ] ?if-old ,
                 ]
                 [ (parse-interpolate) ] bi*
             ] when*
@@ -77,7 +77,7 @@ MACRO: interpolate ( str -- quot )
     [ interpolate ] with-string-writer ; inline
 
 : interpolate-locals-quot ( str -- quot )
-    [ dup search [ [ ] ] [ [ get ] ] ?if ] (interpolate-quot) ;
+    [ dup search [ [ ] ] [ [ get ] ] ?if-old ] (interpolate-quot) ;
 
 MACRO: interpolate-locals ( str -- quot )
     interpolate-locals-quot ;
index 4d44f7c8b570ebd9780c61e8c2f2ea8e869bb967..5bec155f975d6cc563dc92227c566fdc35115ef9 100644 (file)
@@ -95,8 +95,7 @@ ascii <file-reader> xml>gb-data
 
 M: gb18030 encode-char
     drop [
-        dup mapping get-global at
-        [ ] [ lookup-range ] ?if
+        [ mapping get-global at ] [ lookup-range ] ?unless
     ] dip stream-write ;
 
 : second-byte? ( ch -- ? ) ! of a double-byte character
@@ -114,7 +113,7 @@ M: gb18030 encode-char
         linear dup gb>u get-global interval-at [
             [ bfirst>> - ] [ ufirst>> ] bi +
         ] [ drop replacement-char ] if*
-    ] ?if ;
+    ] ?if-old ;
 
 : four-byte ( stream byte1 byte2 -- char )
     rot 2 swap stream-read dup last-bytes?
index 94b0521f2396ea366246b6261e8fbd643ad96cc3..9295ace348d82608e4df7a6c953d9af24aa76b70 100644 (file)
@@ -383,8 +383,8 @@ M: ssl-handle drain
     [ handle>> ] dip
     [
         '[
-            _ dup get-session
-            [ resume-session ] [ begin-session ] ?if
+            _
+            [ get-session ] [ resume-session ] [ begin-session ] ?if
         ] with-timeout
     ] [ drop t >>connected drop ] 2bi ;
 
index 46a936200517b5b4f7059c95135fa1867aa0e488..b5332758dbe4d371ae83d04d15dbade6f4b05f5c 100644 (file)
@@ -20,7 +20,7 @@ ERROR: bad-ipv4-component string ;
 
 : ipv4-component ( str -- n )
     dup dup octal? [ oct> ] [ string>number ] if
-    [ ] [ bad-ipv4-component ] ?if ;
+    [ ] [ bad-ipv4-component ] ?if-old ;
 
 : split-ipv4 ( str -- array )
     "." split [ ipv4-component ] map ;
@@ -63,7 +63,7 @@ ERROR: more-than-8-components ;
 <PRIVATE
 
 : ipv6-component ( str -- n )
-    dup hex> [ ] [ bad-ipv6-component ] ?if ;
+    dup hex> [ ] [ bad-ipv6-component ] ?if-old ;
 
 : split-ipv6 ( string -- seq )
     ":" split CHAR: . over last member? [ unclip-last ] [ f ] if
index 2ac5bdaed4993ebb2e891cba74c65ddd08eda3a1..d98c481abc6b6a05181132a63a404365d809d918 100644 (file)
@@ -39,7 +39,7 @@ SYMBOL: json-depth
             { "Infinity" [ 1/0. ] }
             { "-Infinity" [ -1/0. ] }
             { "NaN" [ 0/0. ] }
-            [ dup string>number [ ] [ not-a-json-number ] ?if ]
+            [ dup string>number [ ] [ not-a-json-number ] ?if-old ]
         } case
     ] dip ;
 
index 35bbcaaf90c1a26dbdb03be6d85ab6d05b60fa1c..8fcb303851d7bb33c3c45faa5c33d154965968fc 100644 (file)
@@ -55,7 +55,7 @@ MACRO: match-cond ( assoc -- quot )
         first2
         [ [ dupd match ] curry ] dip
         [ with-variables ] curry rot
-        [ ?if ] 2curry append
+        [ ?if-old ] 2curry append
     ] reduce ;
 
 GENERIC: replace-patterns ( object -- result )
@@ -76,7 +76,7 @@ M: tuple replace-patterns tuple>array replace-patterns >tuple ;
         2drop f f
     ] [
         2dup length head over match
-        [ swap ?rest ] [ [ rest ] dip (match-first) ] ?if
+        [ swap ?rest ] [ [ rest ] dip (match-first) ] ?if-old
     ] if ;
 
 : match-first ( seq pattern-seq -- bindings )
index 32017e0916edfacefc57645583e2028343bb7007..6c0a58bf29b4f12c8fcb05ab8ba9d712811a6b55 100644 (file)
@@ -17,10 +17,10 @@ ERROR: bad-integer-op word ;
 
 M: word integer-op-input-classes
     dup "input-classes" word-prop
-    [ ] [ bad-integer-op ] ?if ;
+    [ ] [ bad-integer-op ] ?if-old ;
 
 : generic-variant ( op -- generic-op/f )
-    dup "derived-from" word-prop [ first ] [ ] ?if ;
+    dup "derived-from" word-prop [ first ] [ ] ?if-old ;
 
 : no-overflow-variant ( op -- fast-op )
     H{
index 84af2824d91cf945d172dfb5d36436d5099413d7..b5f8899fb2a994306e4b4fe8f052d97885aafb00 100644 (file)
@@ -585,7 +585,7 @@ SYNTAX: PEG:
                 def call compile :> compiled-def
                 word [
                     dup compiled-def compiled-parse
-                    [ ast>> ] [ word parse-failed ] ?if
+                    [ ast>> ] [ word parse-failed ] ?if-old
                 ] effect define-declared
             ] with-compilation-unit
         ] append!
index b0aba0590ba07a506a9f10f9a2cedfa93c4dd676..7215d03af3fc375a021476ae8b32c6cd914fab13 100644 (file)
@@ -73,7 +73,7 @@ M: persistent-vector nth-unsafe
         new-child
     ] [
         [ nip ] 2keep children>> last (ppush-new-tail)
-        [ swap new-child ] [ swap node-set-last f ] ?if
+        [ swap new-child ] [ swap node-set-last f ] ?if-old
     ] if ;
 
 : do-expansion ( pvec root expansion/f -- pvec )
index 07944f2ad0024d4f1cb75fa71803337b8a9d670d..2f446633c6b99c8e7525b0f05aee3bf6f591dedc 100644 (file)
@@ -44,13 +44,13 @@ MEMO: simple-category-table ( -- table )
         { [ "script=" ?head ] [
             dup simple-script-table at
             [ <script-class> ]
-            [ "script=" prepend bad-class ] ?if
+            [ "script=" prepend bad-class ] ?if-old
         ] }
         [ bad-class ]
     } cond ;
 
 : unicode-class ( name -- class )
-    dup parse-unicode-class [ ] [ bad-class ] ?if ;
+    dup parse-unicode-class [ ] [ bad-class ] ?if-old ;
 
 : name>class ( name -- class )
     >string simple {
@@ -106,7 +106,7 @@ MEMO: simple-category-table ( -- table )
 ERROR: nonexistent-option name ;
 
 : ch>option ( ch -- singleton )
-    dup options-assoc at [ ] [ nonexistent-option ] ?if ;
+    dup options-assoc at [ ] [ nonexistent-option ] ?if-old ;
 
 : option>ch ( option -- string )
     options-assoc value-at ;
index a772473ce80bb817ed81fa59e42e2c440765acc6..88268bc43a9e6f0add2197dae51cfdd4e7a01a1f 100644 (file)
@@ -136,35 +136,35 @@ ERROR: specialized-array-vocab-not-loaded c-type ;
 M: c-type-word c-array-constructor
     underlying-type
     dup [ name>> "<" "-array>" surround ] [ specialized-array-vocab ] bi lookup-word
-    [ ] [ specialized-array-vocab-not-loaded ] ?if ; foldable
+    [ ] [ specialized-array-vocab-not-loaded ] ?if-old ; foldable
 
 M: pointer c-array-constructor drop void* c-array-constructor ;
 
 M: c-type-word c-(array)-constructor
     underlying-type
     dup [ name>> "(" "-array)" surround ] [ specialized-array-vocab ] bi lookup-word
-    [ ] [ specialized-array-vocab-not-loaded ] ?if ; foldable
+    [ ] [ specialized-array-vocab-not-loaded ] ?if-old ; foldable
 
 M: pointer c-(array)-constructor drop void* c-(array)-constructor ;
 
 M: c-type-word c-direct-array-constructor
     underlying-type
     dup [ name>> "<direct-" "-array>" surround ] [ specialized-array-vocab ] bi lookup-word
-    [ ] [ specialized-array-vocab-not-loaded ] ?if ; foldable
+    [ ] [ specialized-array-vocab-not-loaded ] ?if-old ; foldable
 
 M: pointer c-direct-array-constructor drop void* c-direct-array-constructor ;
 
 M: c-type-word c-array-type
     underlying-type
     dup [ name>> "-array" append ] [ specialized-array-vocab ] bi lookup-word
-    [ ] [ specialized-array-vocab-not-loaded ] ?if ; foldable
+    [ ] [ specialized-array-vocab-not-loaded ] ?if-old ; foldable
 
 M: pointer c-array-type drop void* c-array-type ;
 
 M: c-type-word c-array-type?
     underlying-type
     dup [ name>> "-array?" append ] [ specialized-array-vocab ] bi lookup-word
-    [ ] [ specialized-array-vocab-not-loaded ] ?if ; foldable
+    [ ] [ specialized-array-vocab-not-loaded ] ?if-old ; foldable
 
 M: pointer c-array-type? drop void* c-array-type? ;
 
index 038f98e0a6aee92832efb86a435ae2f00eca5e25..d300ee6efaf056765160fcf681c25caebda1c364 100644 (file)
@@ -140,7 +140,7 @@ M: object apply-object push-literal ;
     meta-d clone #return, ;
 
 : required-stack-effect ( word -- effect )
-    dup stack-effect [ ] [ missing-effect ] ?if ;
+    dup stack-effect [ ] [ missing-effect ] ?if-old ;
 
 : with-infer ( quot -- effect visitor )
     [
index 668850af8b98da563f26aae163c380c98f9ed822..4fa5d241c1bbfdbc1af6e39e1f26a06d2b2610fd 100644 (file)
@@ -143,7 +143,7 @@ PRIVATE>
     ] if ;
 
 : chop-; ( seq -- seq' )
-    { ";" } split1-last [ ] [ ] ?if ;
+    { ";" } split1-last [ ] [ ] ?if-old ;
 
 : complete-vocab-list? ( tokens -- ? )
     chop-; 1 index-or-length head* "USING:" swap member? ;
index 385bc797cc92c9b4ddca549264e3f89441d43110..bf5f1732c55f30e45aeca31f842548e4fc847cd5 100644 (file)
@@ -22,7 +22,7 @@ ERROR: can't-deploy-library-file library ;
 : copy-library ( dir library -- )
     dup find-library*
     [ tuck file-name append-path copy-file ]
-    [ can't-deploy-library-file ] ?if ;
+    [ can't-deploy-library-file ] ?if-old ;
 
 : copy-libraries ( manifest name dir -- )
     append-path swap libraries>> [ copy-library ] with each ;
index abc995b0c3aec64802b58257861049fbd30efdac..9cb48c22ecd87065a22a7c648cbb155eec7ffbcd 100644 (file)
@@ -77,7 +77,7 @@ CONSTANT: key-codes
 
 : key-code ( event -- string ? )
     dup -> keyCode key-codes at
-    [ t ] [ -> charactersIgnoringModifiers CF>string f ] ?if ;
+    [ t ] [ -> charactersIgnoringModifiers CF>string f ] ?if-old ;
 
 : event-modifiers ( event -- modifiers )
     -> modifierFlags modifiers modifier ;
index 5c549ad252a3a4d4727a3bfe029c436843bef699..6259ff6a6ef4ea75eff5f420d190aaf4a45f3f40 100644 (file)
@@ -87,7 +87,7 @@ M: gadget contains-point?
 : pick-up ( point gadget -- child/f )
     2dup [ dup point>rect ] dip children-on
     [ contains-point? ] with find-last nip
-    [ [ loc>> v- ] [ pick-up ] bi ] [ nip ] ?if ;
+    [ [ loc>> v- ] [ pick-up ] bi ] [ nip ] ?if-old ;
 
 : max-dims ( seq -- dim )
     [ 0 0 ] dip [ first2 swapd [ max ] 2bi@ ] each 2array ;
index 03b77a1ecb65368ca57cea7b6f3c704cde77a6bf..954828094b5d97b8635bd7b424d594c14be6aa1d 100644 (file)
@@ -53,7 +53,7 @@ TUPLE: pixel-format < disposable world handle ;
     2dup (make-pixel-format)
     [ pixel-format new-disposable swap >>handle swap >>world ]
     [ invalid-pixel-format-attributes ]
-    ?if ;
+    ?if-old ;
 
 M: pixel-format dispose*
     [ (free-pixel-format) ] [ f >>handle drop ] bi ;
index 5dbca42dad347740c63b1a7c1e9f291b37fc5b84..c8bea074786d0298c0c4c0833d23b681b708f11a 100644 (file)
@@ -365,7 +365,7 @@ M: object accept-completion-hook 2drop ;
 M: interactor stream-read-quot
     dup interactor-yield dup array? [
         over interactor-finish try-parse
-        [ ] [ stream-read-quot ] ?if
+        [ ] [ stream-read-quot ] ?if-old
     ] [ nip ] if ;
 
 : interactor-operation ( gesture interactor -- ? )
index 83073fc798409a46c641489b5d45838a93c32b44..a40703e55f50e99339e48dabf385ebfdf1dc5c51 100644 (file)
@@ -72,7 +72,7 @@ CATEGORY-NOT: (uncased) Lu Ll Lt Lm Mn Me ;
     string [
         dup special-case
         [ string-quot call out push-all ]
-        [ char-quot call out push ] ?if
+        [ char-quot call out push ] ?if-old
     ] each out "" like ; inline
 
 : locale>lower ( string -- string' )
index b0950c794bc4a81e476947036b0d71c1a067ef62..4e879690b951ba2259a7ddd5fe2fe7a1bef48d3a 100644 (file)
@@ -67,7 +67,7 @@ PRIVATE>
         [ drop 26 ] [
             0xE0100 0xE01EF between?  5 29 ?
         ] if
-    ] ?if ; inline
+    ] ?if-old ; inline
 
 : category ( char -- category )
     category-num categories nth ;
@@ -89,7 +89,7 @@ PRIVATE>
 : (chain-decomposed) ( hash value -- newvalue )
     [
         2dup of
-        [ (chain-decomposed) ] [ 1array nip ] ?if
+        [ (chain-decomposed) ] [ 1array nip ] ?if-old
     ] with map concat ;
 
 : chain-decomposed ( hash -- newhash )
index 279b22ebcecdecfbbf50bcbb9468d3acc070e745..2ad79ef360289ca8f862e0f63b2f439df895ef1f 100644 (file)
@@ -27,7 +27,7 @@ CONSTANT: final-count 28
 
 ! These numbers come from UAX 29
 : initial? ( ch -- ? )
-    dup 0x1100 0x1159 ?between? [ ] [ 0x115F = ] ?if ; inline
+    dup 0x1100 0x1159 ?between? [ ] [ 0x115F = ] ?if-old ; inline
 : medial? ( ch -- ? ) 0x1160 0x11A2 ?between? ; inline
 : final? ( ch -- ? ) 0x11A8 0x11F9 ?between? ; inline
 
@@ -71,7 +71,7 @@ CONSTANT: final-count 28
     string [
         >fixnum dup ascii? [ out push ] [
             dup hangul? [ hangul>jamo out push-all ]
-            [ dup quot call [ out push-all ] [ out push ] ?if ] if
+            [ dup quot call [ out push-all ] [ out push ] ?if-old ] if
         ] if
     ] each
     out "" like dup reorder ; inline
index f7227b52c9954dc8aa36cfba16f0cca87ff14c52..8403f90fd66746f299147e5b85ae548bf91c55cd 100644 (file)
@@ -10,4 +10,4 @@ IN: vocabs.generated
                 [ _ with-current-vocab ] [ ] [ forget-vocab ] cleanup
             ] with-compilation-unit
         ] keep
-    ] ?if ; inline
+    ] ?if-old ; inline
index 975a2d51a054da92b0d4698e24a0517a90a0c0ac..a02729238bff0118636fcb515f678191d9b6f4ba 100644 (file)
@@ -26,7 +26,7 @@ MEMO: vocab-file-lines ( vocab name -- lines/f )
     dupd vocab-file-path [
         swap [ ?delete-file ] [ swap utf8 set-file-lines ] if-empty
         \ vocab-file-lines reset-memoized
-    ] [ vocab-name no-vocab ] ?if ;
+    ] [ vocab-name no-vocab ] ?if-old ;
 
 : vocab-resources-path ( vocab -- path/f )
     "resources.txt" vocab-file-path ;
index 722668aa69f33d341dc11e7bfdfccf80545b3ec8..73833a8c37dfd0c46c3b7541f10ba925f632cf47 100644 (file)
@@ -17,7 +17,7 @@ IN: vocabs.refresh
         ] if
     ] [
         file-exists?
-    ] ??if ;
+    ] ?if ;
 
 SYMBOL: changed-vocabs
 
index 674fc10fbb811f153195c4c813cf8ed7d455fd2d..6afe33ee70ae7a33958ba74c60fdb45a265fb747 100644 (file)
@@ -20,7 +20,7 @@ CONSTANT: quoted-entities-out
 
 : escape-string-by ( str table -- escaped )
     ! Convert <, >, &, ' and " to HTML entities.
-    [ '[ [ _ at ] [ % ] [ , ] ??if ] each ] "" make ;
+    [ '[ [ _ at ] [ % ] [ , ] ?if ] each ] "" make ;
 
 : escape-string ( str -- newstr )
     entities-out escape-string-by ;
index 1a9677b5ab6addf136599108f37822003ea171ab..1c9c0dac3a39ae4d36d3ece2df62e8ca032bcdda 100644 (file)
@@ -74,7 +74,7 @@ SYMBOL: ns-stack
     ] [ drop f ] if* ;
 
 : interpret-name ( str -- name )
-    dup prefixed-name [ ] [ <simple-name> ] ?if ;
+    dup prefixed-name [ ] [ <simple-name> ] ?if-old ;
 
 PRIVATE>
 
index 1d5beec95f26988fe49ddffabab2f9b620430283..500ee7a0aa9c49773ede0555efdfedf286618269 100644 (file)
@@ -112,8 +112,10 @@ HINTS: next* { spot } ;
 ! Suddenly XML-specific
 
 : parse-named-entity ( accum string -- )
-    dup entities at [ swap push ] [
-        dup extra-entities get at
+    [ entities at ]
+    [ swap push ]
+    [
+        [ extra-entities get at ]
         [ swap push-all ] [ no-entity ] ?if
     ] ?if ;
 
@@ -127,7 +129,7 @@ HINTS: next* { spot } ;
 
 : parse-pe ( accum -- )
     take-; dup pe-table get at
-    [ swap push-all ] [ no-entity ] ?if ;
+    [ swap push-all ] [ no-entity ] ?if-old ;
 
 :: (parse-char) ( quot: ( ch -- ? ) accum spot -- )
     spot char>> :> char
index 83842d8d8a132c0488245c05f9b6562ba4ff5b0c..da5545b698b77c44c6eb6c8c787209848080ad76 100644 (file)
@@ -37,6 +37,6 @@ M: keyword-map >alist
     dup no-word-sep>> [ ] [
         dup (keyword-map-no-word-sep) >>no-word-sep
         keyword-map-no-word-sep*
-    ] ?if ;
+    ] ?if-old ;
 
 INSTANCE: keyword-map assoc
index 4ab78c88d5d2ad04a46298478a964ee585efa61c..1799fa48a61617269a91140d01022c9be5c313df 100644 (file)
@@ -51,7 +51,7 @@ IN: xmode.marker
 
 : mark-token ( -- )
     current-keyword
-    dup mark-number [ ] [ mark-keyword ] ?if
+    [ mark-number ] [ mark-keyword ] ?unless
     [ prev-token, ] when* ;
 
 : current-char ( -- char )
@@ -202,7 +202,7 @@ GENERIC: handle-rule-end ( match-count rule -- )
     in-rule-set>> escape-rule>> [ ] [
         parent>> in-rule-set>>
         dup [ escape-rule>> ] when
-    ] ?if ;
+    ] ?if-old ;
 
 : check-escape-rule ( rule -- ? )
     escape-rule>> [ find-escape-rule ] unless*
index d2d3a9f8e4a49709475187cc2db685a39af8cda6..90b634e074de754b254401b7f5dc694bc6734a81 100644 (file)
@@ -39,7 +39,7 @@ SYMBOLS: line last-offset position context
 
 : init-token-marker ( main prev-context line -- )
     line set
-    [ ] [ f <line-context> ] ?if context set
+    [ ] [ f <line-context> ] ?if-old context set
     0 position set
     0 last-offset set
     0 whitespace-end set
index 6643d18cf493537156d4c042b937b6b172c62b91..154f502da5bfd5e9df1ecc81d56853d3b08799d0 100644 (file)
@@ -390,7 +390,7 @@ M: tuple equal? over tuple? [ tuple= ] [ 2drop f ] if ;
 M: tuple hashcode* [ tuple-hashcode ] recursive-hashcode ;
 
 M: tuple-class new
-    dup "prototype" word-prop [ (clone) ] [ tuple-layout <tuple> ] ?if ;
+    dup "prototype" word-prop [ (clone) ] [ tuple-layout <tuple> ] ?if-old ;
 
 M: tuple-class boa
     [ "boa-check" word-prop [ call ] when* ]
index 404d31bb56cc37c49777bace18889388329cf48b..de9cf9adbf5094bce4a1c8299507559a7c7c0489 100644 (file)
@@ -170,7 +170,7 @@ ARTICLE: "conditionals" "Conditional combinators"
 "Forms abstracting a common stack shuffle pattern:"
 { $subsections if* when* unless* }
 "Another form abstracting a common stack shuffle pattern:"
-{ $subsections ?if }
+{ $subsections ?if-old }
 "Sometimes instead of branching, you just need to pick one of two values:"
 { $subsections ? }
 "Two combinators which abstract out nested chains of " { $link if } ":"
index e192f47bfd927a7f1e28520843af12b7d99828e3..2df10575262b960bbd94049c3898d90f582e16ef 100644 (file)
@@ -59,7 +59,7 @@ C: <continuation> continuation
 PRIVATE>
 
 : ifcc ( capture restore -- )
-    [ dummy-1 current-continuation ] 2dip [ dummy-2 ] prepose ?if ; inline
+    [ dummy-1 current-continuation ] 2dip [ dummy-2 ] prepose ?if-old ; inline
 
 : callcc0 ( quot -- ) [ drop ] ifcc ; inline
 
index 5c559158d51c634520d3f579e9e763b87dd4dec2..f4eb15d0dd184436b7ab915148df568ee4c098f8 100644 (file)
@@ -87,7 +87,7 @@ GENERIC: next-method-quot* ( class generic combination -- quot )
 ERROR: no-next-method method ;
 
 : (call-next-method) ( method -- )
-    dup next-method-quot [ call ] [ no-next-method ] ?if ;
+    dup next-method-quot [ call ] [ no-next-method ] ?if-old ;
 
 ERROR: check-method-error class generic ;
 
index 795561c30ed61929084c8719b9af53361eda0ada..5be93afc4cf8e5bfaf35f378e0fe6e26165f2ba8 100644 (file)
@@ -48,7 +48,7 @@ ERROR: no-math-method left right generic ;
 : (math-method) ( generic class -- quot )
     over ?lookup-method
     [ 1quotation ]
-    [ default-math-method ] ?if ;
+    [ default-math-method ] ?if-old ;
 
 PRIVATE>
 
index 4f5943660792bab03b2e1aab55d57e1243c986d7..103394bc3964e246f61dd98553015c703d828463 100644 (file)
@@ -77,7 +77,7 @@ C: <predicate-engine> predicate-engine
 
 : push-method ( method class atomic assoc -- )
     dupd [
-        [ ] [ H{ } clone <predicate-engine> ] ?if
+        [ ] [ H{ } clone <predicate-engine> ] ?if-old
         [ methods>> set-at ] keep
     ] change-at ;
 
index e1369f94e36c418ddabc8764acab7db5f116a6ec..aba338a960025c68f52318e008c5e0a681fbbb95 100644 (file)
@@ -716,7 +716,7 @@ HELP: unless*
 "The following two lines are equivalent:"
 { $code "X [ Y ] unless*" "X dup [ ] [ drop Y ] if" } } ;
 
-HELP: ?if
+HELP: ?if-old
 { $values { "default" object } { "cond" "a generalized boolean" } { "true" { $quotation ( ..a cond -- ..b ) } } { "false" { $quotation ( ..a default -- ..b ) } } }
 { $description "If the condition is " { $link f } ", the " { $snippet "false" } " quotation is called with the " { $snippet "default" } " value on the stack. Otherwise, the " { $snippet "true" } " quotation is called with the condition on the stack." }
 { $notes
index af3be9b066ff308583df136c537f06f002d5be66..2e048014ab203e6d2710fe6dbe42e8e7bc4e280b 100644 (file)
@@ -113,8 +113,8 @@ IN: kernel.tests
 { 0 } [ f [ 0 ] unless* ] unit-test
 { t } [ t [ "Hello" ] unless* ] unit-test
 
-{ "2\n" } [ [ 1 2 [ . ] [ sq . ] ?if ] with-string-writer ] unit-test
-{ "9\n" } [ [ 3 f [ . ] [ sq . ] ?if ] with-string-writer ] unit-test
+{ "2\n" } [ [ 1 2 [ . ] [ sq . ] ?if-old ] with-string-writer ] unit-test
+{ "9\n" } [ [ 3 f [ . ] [ sq . ] ?if-old ] with-string-writer ] unit-test
 
 { f } [ f (clone) ] unit-test
 { -123 } [ -123 (clone) ] unit-test
index 8bd569adba9a57ed2f53efcba002a71cce2ef647..8c1fe8af65f2baccdb27f8adc3112b22cb056d69 100644 (file)
@@ -111,7 +111,8 @@ DEFER: if
 : ?transmute ( obj/f quot -- obj' ) dupd when ; inline
 
 ! Default
-: ?if ( ..a obj cond true: ( ..a cond -- ..b ) false: ( ..a default -- ..b ) -- ..b )
+
+: ?if-old ( ..a obj cond true: ( ..a cond -- ..b ) false: ( ..a default -- ..b ) -- ..b )
     pick [ drop [ drop ] 2dip call ] [ 2nip call ] if ; inline
 
 : ?when ( ..a obj cond: ( ..a obj -- obj/f ) true: ( ..a cond -- ..b ) -- ..b )
@@ -123,6 +124,9 @@ DEFER: if
 : ??if ( ..a obj cond: ( ..a obj -- obj/f ) true: ( ..a cond -- ..b ) false: ( ..a default -- ..b ) -- ..b )
     [ transmute* ] 2dip if ; inline
 
+: ?if ( ..a obj cond true: ( ..a cond -- ..b ) false: ( ..a default -- ..b ) -- ..b )
+    [ transmute* ] 2dip if ; inline
+
 ! Dippers.
 ! Not declared inline because the compiler special-cases them
 
index 2966f5fe437a54ff2a086ccb0267ad1abc84c519..5eccc9d7dcb4528b1ae10af046bf171d6b1966f4 100644 (file)
@@ -45,7 +45,7 @@ IN: memoize
     out>> [
         packer '[
             _ dup first-unsafe
-            [ ] [ @ @ [ 0 rot set-nth-unsafe ] keep ] ?if
+            [ ] [ @ @ [ 0 rot set-nth-unsafe ] keep ] ?if-old
         ]
     ] keep unpacker compose ;
 
index 581548dac4832282f7a6cee62215ce4e3fd2321f..50dcb3b3d3c9b97f287cf5d62684ddeac4be5a77 100644 (file)
@@ -34,7 +34,7 @@ SYMBOL: auto-use?
 : private? ( word -- ? ) vocabulary>> ".private" tail? ;
 
 : use-first-word? ( words -- ? )
-    [ length 1 = ] [ ?first dup [ private? not ] [ ] ?if ] bi and
+    [ length 1 = ] [ ?first dup [ private? not ] [ ] ?if-old ] bi and
     auto-use? get and ;
 
 ! True branch is a singleton public word with no name conflicts
@@ -46,7 +46,7 @@ SYMBOL: auto-use?
     no-word-restarted ;
 
 : parse-word ( string -- word )
-    dup search [ ] [ no-word ] ?if ;
+    dup search [ ] [ no-word ] ?if-old ;
 
 ERROR: number-expected ;
 
@@ -54,12 +54,11 @@ ERROR: number-expected ;
     string>number [ number-expected ] unless* ;
 
 : parse-datum ( string -- word/number )
-    dup search [ ] [
-        dup string>number [ ] [ no-word ] ?if
-    ] ?if ;
+    [ search ]
+    [ [ string>number ] [ no-word ] ?unless ] ?unless ;
 
 : ?scan-datum ( -- word/number/f )
-    ?scan-token dup [ parse-datum ] when ;
+    ?scan-token [ parse-datum ] ?transmute ;
 
 : scan-datum ( -- word/number )
     ?scan-datum [ \ word throw-unexpected-eof ] unless* ;
index 5fe6fce1d99da76f75ea0bfb68355f45a4be15e8..b577aca722afc1667945e4ed58cf5c2bce7c5e94 100644 (file)
@@ -71,7 +71,7 @@ M: string equal?
 M: string hashcode*
     nip
     dup string-hashcode
-    [ ] [ dup rehash-string string-hashcode ] ?if ;
+    [ ] [ dup rehash-string string-hashcode ] ?if-old ;
 
 M: string length
     length>> ; inline
index a4921ae0ed270ac37ab9789baf3c9ac59ad73682..113ed9a4a24b280f0008f7d9286b27b2a9aef245 100644 (file)
@@ -148,13 +148,13 @@ PRIVATE>
     ] when* require ;
 
 : run ( vocab -- )
-    [ load-vocab vocab-main ]
-    [ execute( -- ) ]
+    dup load-vocab vocab-main [
+        execute( -- ) ]
     [
         "The " write vocab-name write
         " vocabulary does not define an entry point." print
         "To define one, refer to \\ MAIN: help" print
-    ] ??if ;
+    ] ?if-old ;
 
 <PRIVATE
 
index 43137631d999b5f70b49ac66aa32f2305ac0329b..9d7f929180b8190c967beebe0c7fa71db322aca0 100644 (file)
@@ -169,7 +169,7 @@ TUPLE: rename word vocab words ;
 : <rename> ( word vocab new-name -- rename )
     [
         2dup load-vocab words>> dupd at
-        [ ] [ swap no-word-in-vocab ] ?if
+        [ ] [ swap no-word-in-vocab ] ?if-old
     ] dip associate rename boa ;
 
 : add-renamed-word ( word vocab new-name -- )
index a38f64a8cbb7a5ad7f795f9c5ed4d5a23be12cf1..e5f5ca6a0e77ae32668ba177a904629574dbfbc1 100644 (file)
@@ -10,7 +10,7 @@ IN: compiler.cfg.gvn
 
 GENERIC: simplify ( insn -- insn' )
 
-M: insn simplify [ rewrite ] [ simplify ] [ dup >avail-insn-uses ] ??if ;
+M: insn simplify [ rewrite ] [ simplify ] [ dup >avail-insn-uses ] ?if ;
 M: array simplify [ simplify ] map ;
 M: ##copy simplify ;
 
@@ -39,7 +39,7 @@ M: ##copy value-number [ src>> vreg>vn ] [ dst>> ] bi set-vn ;
 : check-redundancy ( insn -- )
     dup >expr
     [ exprs>vns get at ]
-    [ redundant-instruction ] [ useful-instruction ] ??if ;
+    [ redundant-instruction ] [ useful-instruction ] ?if ;
 
 M: ##phi value-number
     dup inputs>> values [ vreg>vn ] map sift
index bad5ac53578b716711a6653c9df666cf75aaae57..6803d110603bc048d4d7afb75a1ca2a5a0ad8837 100644 (file)
@@ -59,7 +59,7 @@ ERROR: unbound-name { name gml-name } ;
 
 : lookup-name ( name gml -- value )
     dupd dictionary-stack>> assoc-stack
-    [ ] [ unbound-name ] ?if ; inline
+    [ ] [ unbound-name ] ?if-old ; inline
 
 GENERIC: exec-proc ( registers gml proc -- registers gml )
 
index 6bdf20fbae73a99e2b6125bd1b936b71fb561f33..c41c82e5a6765ae50dcda46f4a1da7e6f11c98d0 100644 (file)
@@ -21,7 +21,7 @@ SYMBOL: matrix
 : cols ( -- n ) 0 nth-row length ;
 
 : skip ( i seq quot -- n )
-    over [ find-from drop ] dip swap [ ] [ length ] ?if ; inline
+    over [ find-from drop ] dip swap [ ] [ length ] ?if-old ; inline
 
 : first-col ( row# -- n )
     ! First non-zero column
index b98bdeb246582e137bc2cb0030db092c0c7508b0..9ad15759380cd418e0c5ef287012d47df18b7c31 100644 (file)
@@ -28,7 +28,7 @@ ERROR: not-an-integer x ;
 : parse-decimal ( str -- ratio )
     split-decimal [ [ "0" ] when-empty ] bi@
     [
-        [ string>number ] [ ] [ not-an-integer ] ??if ] bi@
+        [ [ string>number ] [ not-an-integer ] ?unless ] bi@
     ] keep length 10^ / + swap [ neg ] when ;
 
 SYNTAX: DECIMAL: scan-token parse-decimal suffix! ;
index 83324d456f6ef09ae993b0cbed126fe7b31f29d0..cb0e3b2100feb8f17bcf1a53a925515e55c59db2 100644 (file)
@@ -254,7 +254,7 @@ PREDICATE: method-spec < array
     unclip generic? [ [ class? ] all? ] dip and ;
 
 syntax:M: method-spec where
-    dup unclip method [ ] [ first ] ?if where ;
+    dup unclip method [ ] [ first ] ?if-old where ;
 
 syntax:M: method-spec set-where
     unclip method set-where ;
index 2a1974201a7c33029bd301be34ceecd6b904b1d9..c09be4d895906afaf80a1757889ee3fac02008b9 100644 (file)
@@ -9,7 +9,7 @@ TUPLE: pair value key hash ;
     f pair boa ; inline
 
 : if-hash ( pair true-quot false-quot -- )
-    [ dup hash>> ] 2dip ?if ; inline
+    [ dup hash>> ] 2dip ?if-old ; inline
 
 M: pair assoc-size
     [ assoc-size 1 + ] [ drop 1 ] if-hash ; inline
index 9dccb37a3e0c07674dd68b8217899b415826c181..61155161386f2a23f248649f4ecc5ea9d80c3d53 100644 (file)
@@ -35,7 +35,7 @@ IN: reports.noise
         { unless 1/4 }
         { when* 1/3 }
         { unless* 1/3 }
-        { ?if 1/2 }
+        { ?if-old 1/2 }
         { cond 1/2 }
         { case 1/2 }
         { keep 1 }
index 18e3fec1031cd68d2ca1e15823108f8559261188..bdc58c9865c39bcbd7a37836f920802f3d68a1af 100644 (file)
@@ -41,7 +41,7 @@ MACRO: case-probas ( data -- quot )
     [ first2 [ 1quotation ] dip [ swap 2array ] when* ] map 1quotation ;
 
 : expected ( data name -- float )
-    dupd of [ ] [ values sift sum 1 swap - ] ?if ;
+    dupd of [ ] [ values sift sum 1 swap - ] ?if-old ;
 
 : generate ( # case-probas -- seq )
     H{ } clone [
index 549b82696a1cf005362336eba6f8138f2c48b71e..d55fe07d3350529561597eb5b5531966584a9ca2 100644 (file)
@@ -12,7 +12,7 @@ IN: smalltalk.parser
 ERROR: bad-number str ;
 
 : check-number ( str -- n )
-    >string [ string>number ] [ ] [ bad-number ] ??if ;
+    >string [ string>number ] [ bad-number ] ?unless ;
 
 EBNF: parse-smalltalk [=[
 
index 46e5d744fd8adeb5d64dfb1d127e802975fc4a0b..82e5e6b151c2eddb382a8080f3f34d2bccfded25 100644 (file)
@@ -34,7 +34,7 @@ SynKeywordFactorWord factorWord_io_encodings | syn keyword factorWord_io_encodin
 SynKeywordFactorWord factorWord_io_encodings_binary | syn keyword factorWord_io_encodings_binary contained binary binary?
 SynKeywordFactorWord factorWord_io_encodings_utf8 | syn keyword factorWord_io_encodings_utf8 contained >utf8-index code-point-length code-point-offsets utf8 utf8-index> utf8?
 SynKeywordFactorWord factorWord_io_files | syn keyword factorWord_io_files contained (file-appender) (file-reader) (file-writer) +input+ +output+ +retry+ <file-appender> <file-reader> <file-writer> change-file-contents change-file-lines drain file-contents file-exists? file-lines file-reader file-reader? file-writer file-writer? init-resource-path refill set-file-contents set-file-lines wait-for-fd with-file-appender with-file-reader with-file-writer
-SynKeywordFactorWord factorWord_kernel | syn keyword factorWord_kernel contained (clone) -roll -rot -rotd 2bi 2bi* 2bi@ 2curry 2dip 2drop 2dup 2keep 2keepd 2nip 2nipd 2over 2tri 2tri* 2tri@ 2with 3bi 3curry 3dip 3drop 3dup 3keep 3nip 3nipd 3tri 4dip 4drop 4dup 4keep 4nip 5drop 5nip <wrapper> = >boolean ? ?if and assert assert= assert? bi bi* bi-curry bi-curry* bi-curry@ bi@ boa boolean boolean? both? build call callstack callstack>array callstack? clear clone compose composed composed? curried curried? curry die dip do drop dup dupd either? eq? equal? execute get-callstack get-datastack get-retainstack hashcode hashcode* identity-hashcode identity-tuple identity-tuple? if if* keep keepd keepdd loop most negate new nip nipd not null object or over overd pick pickd prepose reach roll rot rotd same? spin swap swapd throw tri tri* tri-curry tri-curry* tri-curry@ tri@ tuck tuple tuple? unless unless* until when when* while while* with withd wrapper wrapper? xor
+SynKeywordFactorWord factorWord_kernel | syn keyword factorWord_kernel contained (clone) -roll -rot -rotd 2bi 2bi* 2bi@ 2curry 2dip 2drop 2dup 2keep 2keepd 2nip 2nipd 2over 2tri 2tri* 2tri@ 2with 3bi 3curry 3dip 3drop 3dup 3keep 3nip 3nipd 3tri 4dip 4drop 4dup 4keep 4nip 5drop 5nip <wrapper> = >boolean ? ?when ?unless ?if ?if-old and assert assert= assert? bi bi* bi-curry bi-curry* bi-curry@ bi@ boa boolean boolean? both? build call callstack callstack>array callstack? clear clone compose composed composed? curried curried? curry die dip do drop dup dupd either? eq? equal? execute get-callstack get-datastack get-retainstack hashcode hashcode* identity-hashcode identity-tuple identity-tuple? if if* keep keepd keepdd loop most negate new nip nipd not null object or over overd pick pickd prepose reach roll rot rotd same? spin swap swapd throw tri tri* tri-curry tri-curry* tri-curry@ tri@ tuck tuple tuple? unless unless* until when when* while while* with withd wrapper wrapper? xor
 SynKeywordFactorWord factorWord_layouts | syn keyword factorWord_layouts contained (first-bignum) (fixnum-bits) (max-array-capacity) 32-bit? 64-bit? bootstrap-cell bootstrap-cell-bits bootstrap-cells bootstrap-first-bignum bootstrap-fixnum-bits bootstrap-max-array-capacity bootstrap-most-negative-fixnum bootstrap-most-positive-fixnum cell cell-bits cells data-alignment first-bignum fixnum-bits hashcode-shift header-bits immediate immediate? leaf-stack-frame-size max-array-capacity mega-cache-size most-negative-fixnum most-positive-fixnum num-types tag-bits tag-fixnum tag-header tag-mask type-number type-numbers untag-fixnum
 SynKeywordFactorWord factorWord_make | syn keyword factorWord_make contained % %% , ,+ ,, building make
 SynKeywordFactorWord factorWord_math | syn keyword factorWord_math contained * + - / /f /i /mod 2/ 2^ < <= <fp-nan> > >= >bignum >fixnum >float >fraction >integer >rect ?1+ abs align all-integers-from? all-integers? bignum bignum? bit? bitand bitnot bitor bits>double bits>float bitxor complex complex? denominator double>bits each-integer each-integer-from even? find-integer find-integer-from find-last-integer fixnum fixnum? float float>bits float? fp-bitwise= fp-infinity? fp-nan-payload fp-nan? fp-qnan? fp-sign fp-snan? fp-special? gcd if-zero imaginary-part integer integer>fixnum integer>fixnum-strict integer? log2 log2-expects-positive log2-expects-positive? mod neg neg? next-float next-power-of-2 number number= number? numerator odd? power-of-2? prev-float ratio ratio? rational rational? real real-part real? recip rect> recursive-hashcode rem sgn shift simple-gcd sq times u< u<= u> u>= unless-zero unordered? until-zero when-zero zero?