]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/fixups/fixups.factor
core: subseq-index? -> subseq-of?
[factor.git] / basis / fixups / fixups.factor
index 6cefa92290fd3996e88ed47e850cbeb3084d21b5..d2d069497add65fe5ba0547c655750f9e46749e0 100644 (file)
@@ -1,16 +1,17 @@
 ! Copyright (C) 2021 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors assocs continuations kernel sequences
-vocabs vocabs.parser ;
+USING: accessors assocs classes.tuple continuations kernel sequences
+slots.private vocabs vocabs.parser ;
 IN: fixups
 
 CONSTANT: vocab-renames {
     { "math.intervals" { "intervals" "0.99" } }
     { "math.ranges" { "ranges" "0.99" } }
-    { "unicode.collation" { "unicode" "0.99" } }
 }
 
 CONSTANT: word-renames {
+    { "32bit?" { "layouts:32-bit?" "0.99" } }
+    { "64bit?" { "layouts:64-bit?" "0.99" } }
     { "lines" { "io:read-lines" "0.99" } }
     { "words" { "splitting:split-words" "0.99" } }
     { "contents" { "io:read-contents" "0.99" } }
@@ -26,6 +27,8 @@ CONSTANT: word-renames {
     { "[0,b]" { "ranges:[0..b]" "0.99" } }
     { "[1,b)" { "ranges:[1..b)" "0.99" } }
     { "[1,b]" { "ranges:[1..b]" "0.99" } }
+    { "assoc-combine" { "assocs:assoc-union-all" "0.99" } }
+    { "assoc-refine" { "assocs:assoc-intersect-all" "0.99" } }
     { "assoc-merge" { "assocs.extras:assoc-collect" "0.99" } }
     { "assoc-merge!" { "assocs.extras:assoc-collect!" "0.99" } }
     { "peek-from" { "modern.html:peek1-from" "0.99" } }
@@ -36,6 +39,16 @@ CONSTANT: word-renames {
     { "read-json-objects" { "json.reader:read-json" "0.99" } }
     { "init-namespaces" { "namespaces:init-namestack" "0.99" } }
     { "iota" { "sequences:<iota>" ".98" } }
+    { "git-checkout-existing-branch" { "git-checkout-existing" "0.99" } }
+    { "git-checkout-existing-branch*" { "git-checkout-existing*" "0.99" } }
+    { "tags" { "chloe-tags" "0.99" } }
+    { "(each)" { "sequence-operator" "0.99" } }
+    { "(each-integer)" { "each-integer-from" "0.99" } }
+    { "(find-integer)" { "find-integer-from" "0.99" } }
+    { "(all-integers?)" { "all-integers-from?" "0.99" } }
+    { "short" { "index-or-length" "0.99" } }
+    { "map-integers" { "map-integers-as" "0.99" } }
+    { "deep-subseq?" { "deep-subseq-of?" "0.99" } }
 }
 
 : compute-assoc-fixups ( continuation name assoc -- seq )
@@ -53,12 +66,13 @@ CONSTANT: word-renames {
 GENERIC: compute-fixups ( continuation error -- seq )
 
 M: object compute-fixups
-    [ error>> compute-fixups ] [ 3drop { } ] recover ;
+    "error" over ?offset-of-slot
+    [ slot compute-fixups ] [ 2drop { } ] if* ;
 
 M: f compute-fixups 2drop { } ;
 
 M: no-vocab compute-fixups
-    name>> vocab-renames compute-assoc-fixups ;
+    [ name>> vocab-renames compute-assoc-fixups ] [ drop { } ] if* ;
 
 M: no-word-error compute-fixups
-    name>> word-renames compute-assoc-fixups ;
+    [ name>> word-renames compute-assoc-fixups ] [ drop { } ] if* ;