Expand description
The single owner of builtin value methods.
BUILTIN_METHODS names every method a builtin receiver supports, with
its signature, whether it mutates its receiver, and its reference doc.
REMOVED_METHODS records retired spellings and how to repair them. The
VM and portable-kernel dispatch tables are drift-checked against these
rows, and the typechecker, linter, language server, and generated docs
derive from them.
Structs§
- Method
Descriptor - One builtin value method: the single owner of its name, signature, effect, and reference documentation.
- Removed
Method - A method spelling that no longer exists on a receiver.
Enums§
- Method
Effect - Whether calling the method changes its receiver.
- Method
Migration - How source written against a removed method spelling is repaired.
- Method
Receiver - The builtin value kind a method is dispatched on.
Constants§
- COPY_
COUNTERPARTS - Mutating list methods and the copy-returning method that computes the same result as a new value.
- REFERENCE_
BEGIN_ MARKER - REFERENCE_
END_ MARKER
Statics§
Functions§
- copy_
counterpart - The copy-returning counterpart of a mutating method (
sortedforsort). - in_
place_ counterpart - The mutating counterpart of a copy-returning method (
sortforsorted). - is_
method_ name - True when some builtin receiver has a method called
name. - is_
mutable_ place - A place a mutating method can rewrite: a binding, or a property or subscript path rooted at one.
- is_
mutating_ method_ name - True when some builtin receiver has a mutating method called
name. - is_
pure_ on_ every_ receiver - True when some builtin receiver has a pure method called
nameand no receiver has a mutating method of that name, so discarding the call’s result can never be intended. - method
- The method
nameonreceiver, if it exists. - method_
names - Method names on
receiver, in table order. - methods_
of - Every method on
receiver, in table order. - mutating_
call_ place - When
nodeisplace.method(...)naming a mutating builtin method, the receiver place it may rewrite. This is syntactic: a user struct method that happens to share the name also reports its receiver, which keeps write analyses conservative. - place_
root - The binding at the root of a place expression.
- removed_
method - The retired spelling
nameonreceiver, if it was removed. - removed_
method_ on_ any_ receiver - Every removed row for a retired spelling that no live method on any
receiver still uses, so a call to it is stale whatever the receiver’s type.
countis not one (iterators keep it);to_loweris. Empty otherwise. - render_
reference - Markdown tables for every builtin receiver, without the region markers.
- returns_
generic - True when the method’s result type mentions one of its generic parameters, so the result depends on the receiver or the arguments.
- splice_
reference - Replace the generated region of
documentwith a fresh rendering.Nonewhen the document lacks the markers.