]> gitweb.factorcode.org Git - factor.git/commitdiff
generic: rename order to dispatch-order. nothing uses this
authorDoug Coleman <doug.coleman@gmail.com>
Thu, 2 Mar 2023 23:48:59 +0000 (17:48 -0600)
committerDoug Coleman <doug.coleman@gmail.com>
Thu, 2 Mar 2023 23:50:25 +0000 (17:50 -0600)
basis/fixups/fixups.factor
core/generic/generic-docs.factor
core/generic/generic.factor

index 7e0ed5efbf1a87123401c1d8ba2653dd1f509efa..9ad6e9f4b875c045b5ab66ba91735d380d1e3cb2 100644 (file)
@@ -63,8 +63,9 @@ CONSTANT: word-renames {
     { "count*" { "percent-of" "0.99" } }
     { "more?" { "deref?" "0.99" } }
     { "plox" { "?transmute" "0.99" } }
-    ! { "?if" { "?if-old" "0.99" } }
+    ! { "?if" { "?if" "0.99" } }
     { "ensure-non-negative" { "assert-non-negative" "0.99" } }
+    { "order" { "dispatch-order" "0.99" } }
 }
 
 : compute-assoc-fixups ( continuation name assoc -- seq )
index c8a545431f34ddaeac3d718b39d5d2e674824441..152964d20bb9859ed827d326e39a12b6d9e065da 100644 (file)
@@ -17,8 +17,8 @@ $nl
 { $code "{ object generic class }" }
 "Neither " { $link class } " nor " { $link generic } " are subclasses of each other, and their intersection is non-empty. Calling " { $snippet "explain" } " with a word on the stack that is both a class and a generic word will print " { $snippet "a class word" } " because " { $link class } " is more specific than " { $link generic } " in the class linearization order. (One example of a word which is both a class and a generic word is the class of classes, " { $link class } ", which is also a word to get the class of an object.)"
 $nl
-"The " { $link order } " word can be useful to clarify method dispatch order:"
-{ $subsections order } ;
+"The " { $link dispatch-order } " word can be useful to clarify method dispatch order:"
+{ $subsections dispatch-order } ;
 
 ARTICLE: "generic-introspection" "Generic word introspection"
 "In most cases, generic words and methods are defined at parse time with " { $link POSTPONE: GENERIC: } " (or some other parsing word) and " { $link POSTPONE: M: } "."
@@ -148,7 +148,7 @@ HELP: <method>
 { $values { "class" class } { "generic" generic } { "method" "a new method definition" } }
 { $description "Creates a new method." } ;
 
-HELP: order
+HELP: dispatch-order
 { $values { "generic" generic } { "seq" { $sequence class } } }
 { $description "Outputs a sequence of classes for which methods have been defined on this generic word. The sequence is sorted in method dispatch order." } ;
 
@@ -167,7 +167,7 @@ HELP: create-method
 { $description "Creates a method or returns an existing one. This is the runtime equivalent of " { $link POSTPONE: M: } "." }
 { $notes "To define a method, pass the output value to " { $link define } "." } ;
 
-{ sort-classes order } related-words
+{ sort-classes dispatch-order } related-words
 
 HELP: (call-next-method)
 { $values { "method" method } }
index 2fb3a7f38e34f4e57737eb37535eb2fdeffe84f1..e45997e265e4ca28d22fec42d12eaffe82552ce4 100644 (file)
@@ -53,7 +53,7 @@ PRIVATE>
 : method-classes ( generic -- classes )
     "methods" word-prop keys ;
 
-: order ( generic -- seq )
+: dispatch-order ( generic -- seq )
     method-classes sort-classes ;
 
 : nearest-class ( class generic -- class/f )