Expand description
The method catalog (§16.2): one structured table of built-in methods, consumed by every part of the compiler and the LSP.
The catalog is built with MethodCatalogBuilder and finalized with
MethodCatalogBuilder::finish, which rejects duplicate entries — the
(receiver, name, parameter-count) triple must be unique. That makes a
duplicate overload unrepresentable: the builder errors rather than silently
shadowing an earlier entry.
Structs§
- Method
Catalog - The finalized method catalog: an ordered, duplicate-free list of entries.
- Method
Catalog Builder - Builder for
MethodCatalog. Enforces the duplicate-entry invariant atfinish. - Method
Entry - One row of the method catalog (§16.2 fields).
Enums§
- Method
Catalog Error - Errors that can occur while building a
MethodCatalog. - Method
Lowering - How a catalog entry lowers to actual code.
- Purity
- Whether a method is pure or has side effects.
Constants§
- INDEX_
READ - The catalog name of the subscript read
m[key]. - INDEX_
STORE - The catalog name of the subscript store
m[key] = value. The value is the last parameter, after the indices. - INDEX_
STORE_ MAX - The catalog name of
best[key] max= score(§6.2). SeeINDEX_STORE_MIN. - INDEX_
STORE_ MIN - The catalog name of
distance[key] min= candidate(§6.2) — andINDEX_STORE_MAXitsmax=dual.