Skip to main content

Module catalog

Module catalog 

Source
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§

MethodCatalog
The finalized method catalog: an ordered, duplicate-free list of entries.
MethodCatalogBuilder
Builder for MethodCatalog. Enforces the duplicate-entry invariant at finish.
MethodEntry
One row of the method catalog (§16.2 fields).

Enums§

MethodCatalogError
Errors that can occur while building a MethodCatalog.
MethodLowering
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). See INDEX_STORE_MIN.
INDEX_STORE_MIN
The catalog name of distance[key] min= candidate (§6.2) — and INDEX_STORE_MAX its max= dual.