]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/fixups/fixups.factor
mason: fix build duration during runs
[factor.git] / basis / fixups / fixups.factor
index ba2312d708d011f8dbce25fc2e2781fb22675306..21cad6c9eb002162c04786533e3c4221c71fe27e 100644 (file)
@@ -1,12 +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 ;
+! See https://factorcode.org/license.txt for BSD license.
+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" } }
+    { "sorting.slots" { "sorting.specification" "0.99" } }
+    { "json.reader" { "json" "0.99" } }
+    { "json.writer" { "json" "0.99" } }
+    { "math.trig" { "math.functions" "0.100" } }
+    { "math.functions.integer-logs" { "math.functions" "0.100" } }
 }
 
 CONSTANT: word-renames {
@@ -27,6 +32,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" } }
@@ -34,13 +41,45 @@ CONSTANT: word-renames {
     { "substitute" { "regexp.classes:(substitute)" "0.99" } }
     { "combine" { "sets:union-all" "0.99" } }
     { "refine" { "sets:intersect-all" "0.99" } }
-    { "read-json-objects" { "json.reader:read-json" "0.99" } }
+    { "read-json-objects" { "json: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" } }
+    { "overtomorrow" { "overmorrow" "0.99" } }
+    { "INITIALIZE:" { "INITIALIZED-SYMBOL:" "0.99" } }
+    { "natural-sort" { "sort" "0.99" } }
+    { "sort-by-with" { "sort-with-spec-by" "0.99" } }
+    { "sort-keys-by" { "sort-keys-with-spec" "0.99" } }
+    { "sort-values-by" { "sort-values-with-spec" "0.99" } }
+    { "compare-slots" { "compare-with-spec" "0.99" } }
+    { "natural-sort!" { "sort!" "0.99" } }
+    { "natural-bubble-sort!" { "bubble-sort!" "0.99" } }
+    { "random-integers" { "randoms" "0.99" } }
+    { "count*" { "percent-of" "0.99" } }
+    { "more?" { "deref?" "0.99" } }
+    { "plox" { "?call" "0.99" } }
+    { "ensure-non-negative" { "assert-non-negative" "0.99" } }
+    { "order" { "dispatch-order" "0.99" } }
+    { "TEST:" { "DEFINE-TEST-WORD:" "0.99" } }
+    { "assoc-all-key?" { "all-keys?" "0.100" } }
+    { "assoc-all-value?" { "all-values?" "0.100" } }
+    { "assoc-any-key?" { "any-key?" "0.100" } }
+    { "assoc-any-value?" { "any-value?" "0.100" } }
+    { "?download-to" { "download-once-into" "0.100" } }
+    { "download-to" { "download-into" "0.100" } }
 }
 
 : compute-assoc-fixups ( continuation name assoc -- seq )
-    swap '[ drop _ = ] assoc-filter [
+    swap '[ _ = ] filter-keys [
         drop { }
     ] [
         swap '[
@@ -54,7 +93,8 @@ 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 { } ;