Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Provisional API: This reference documents current compiler behavior. Compatibility is not yet promised.

src/linked-meta.x

Shipped meta code compiled into the compiler.

Functions

FunctionSummary
access_postfixStores the updated element and returns its previous value.
access_prefixStores and returns the incremented or decremented element.
access_readCalls the getter bracket admission selected.
access_storeSelects the adopted collection setter for indexed assignment, or a participant’s setindex member.
access_updateSelects collection compound updates and checks accepted operands, or a participant’s updateindex member.
delegate_memberRebuilds a call that finds no member on its receiver through the one delegate field path that provides the method.
destructure_declarationDeclares the names of T (a, b) = source; and then reads the source into them, or declares each target of (T1 a, T2 b) = source; initialized from its element.
destructure_statementReads the source of (a, b) = source; into its targets in a block.
destructure_valueReads the source of (a, b) = source into its targets, and keeps the source in a result local as the expression’s value.
dynamic_binaryBoxes both operands of an arithmetic, shift, or bitwise operator for Var.binary, after rejecting an operand that is neither a number nor, for + beside text, text.
dynamic_changeAdds or subtracts one through the Var update helpers; the postfix forms return the value before the change.
dynamic_compoundUpdates a Var or numeric lvalue with a Var or numeric operand through the update helper of its storage.
dynamic_unaryRejects a unary numeric operator on a Var.
lambda_cellsMoves each local and parameter of the function node that a lambda in its body shares by reference into a Scope cell, so the binding outlives the call: a parameter is copied into its cell at entry, a local is declared as its cell, and every read goes through the cell.
lambda_closureLifts the capturing lambda node to a static function of its parameters and captures, and answers a Func of a record of the captured values and addresses.
lambda_liftLifts the noncapturing lambda node to a static function, whose name is its value.
linked_meta_hashesReturns linked definition hashes and provider source dependencies.
linked_meta_targetsReturns the linked copies, and the runtime builders, by name.
match_loweringLowers the bound match node to C text around its subject, patterns, and bodies.
printf_valuesReads the Var values a printf-family call’s static format consumes.
protocol_conformancePlaces the forwarding members, descriptor thunks, method table, and descriptor registration of one conformance.
raise_loweringConverts a raise’s code and details, or declines a raise whose parts already have their types.
register_rewriteRegisters the decorated translator with its pattern and hole patterns.
string_switch_loweringLowers a switch on a String to an integer switch on its selector’s index among the labels it owns, or declines another switch.
try_loweringLowers the parsed try node to its landing form.

Functions

access_postfix

Code access_postfix(Code code)

Stores the updated element and returns its previous value.

Source: src/linked-meta.x:325

access_prefix

Code access_prefix(Code code)

Stores and returns the incremented or decremented element.

Source: src/linked-meta.x:314

access_read

Code access_read(Code code)

Calls the getter bracket admission selected.

Source: src/linked-meta.x:218

access_store

Code access_store(Code code)

Selects the adopted collection setter for indexed assignment, or a participant’s setindex member.

Source: src/linked-meta.x:254

access_update

Code access_update(Code code)

Selects collection compound updates and checks accepted operands, or a participant’s updateindex member.

Source: src/linked-meta.x:281

delegate_member

Code delegate_member(Code code)

Rebuilds a call that finds no member on its receiver through the one delegate field path that provides the method.

Source: src/linked-meta.x:430

destructure_declaration

Code destructure_declaration(Code node)

Declares the names of T (a, b) = source; and then reads the source into them, or declares each target of (T1 a, T2 b) = source; initialized from its element.

Source: src/linked-meta.x:484

destructure_statement

Code destructure_statement(Code node)

Reads the source of (a, b) = source; into its targets in a block.

Source: src/linked-meta.x:514

destructure_value

Code destructure_value(Code node)

Reads the source of (a, b) = source into its targets, and keeps the source in a result local as the expression’s value.

Source: src/linked-meta.x:528

dynamic_binary

Code dynamic_binary(Code code)

Boxes both operands of an arithmetic, shift, or bitwise operator for Var.binary, after rejecting an operand that is neither a number nor, for + beside text, text. The call is returned lowered, because an operator chain applies this rule once for each term and binding would search the whole remaining chain each time.

Source: src/linked-meta.x:556

dynamic_change

Code dynamic_change(Code code)

Adds or subtracts one through the Var update helpers; the postfix forms return the value before the change.

Source: src/linked-meta.x:625

dynamic_compound

Code dynamic_compound(Code code)

Updates a Var or numeric lvalue with a Var or numeric operand through the update helper of its storage.

Source: src/linked-meta.x:605

dynamic_unary

Code dynamic_unary(Code code)

Rejects a unary numeric operator on a Var.

Source: src/linked-meta.x:641

lambda_cells

Code lambda_cells(Code node)

Moves each local and parameter of the function node that a lambda in its body shares by reference into a Scope cell, so the binding outlives the call: a parameter is copied into its cell at entry, a local is declared as its cell, and every read goes through the cell. A lifted lambda’s function moves its own. The function binds again only its cells and the statements that hold them; its other statements are kept as they are bound.

Source: src/linked-meta.x:1120

lambda_closure

Code lambda_closure(Code node)

Lifts the capturing lambda node to a static function of its parameters and captures, and answers a Func of a record of the captured values and addresses.

Source: src/linked-meta.x:1042

lambda_lift

Code lambda_lift(Code node)

Lifts the noncapturing lambda node to a static function, whose name is its value.

Source: src/linked-meta.x:887

linked_meta_hashes

Map linked_meta_hashes(void)

Returns linked definition hashes and provider source dependencies.

Source: src/linked-meta.x:2392

linked_meta_targets

Map linked_meta_targets(void)

Returns the linked copies, and the runtime builders, by name.

Source: src/linked-meta.x:2156

match_lowering

Code match_lowering(Code node)

Lowers the bound match node to C text around its subject, patterns, and bodies.

Source: src/linked-meta.x:1536

printf_values

Code printf_values(Code code)

Reads the Var values a printf-family call’s static format consumes.

Source: src/linked-meta.x:1672

protocol_conformance

Code protocol_conformance(Code node)

Places the forwarding members, descriptor thunks, method table, and descriptor registration of one conformance.

Source: src/linked-meta.x:1784

raise_lowering

Code raise_lowering(Code node)

Converts a raise’s code and details, or declines a raise whose parts already have their types.

Source: src/linked-meta.x:1847

register_rewrite

Code register_rewrite(Code function, Code pattern, List holes)

Registers the decorated translator with its pattern and hole patterns.

Source: src/linked-meta.x:87

string_switch_lowering

Code string_switch_lowering(Code node)

Lowers a switch on a String to an integer switch on its selector’s index among the labels it owns, or declines another switch.

Source: src/linked-meta.x:1945

try_lowering

Code try_lowering(Code node)

Lowers the parsed try node to its landing form.

Source: src/linked-meta.x:2100

Design notes

Generated by tools/gen-linked-meta.sh; do not edit. Bodied meta functions and initialized static values from shipped source modules appear without their meta markers, so their functions and initializers execute as native code. Compiler.bind_linked_meta binds an included definition to its copy when its definition hashes agree, and a prelude component’s definition always. Public functions with a run-time form bind to their ordinary provider’s definitions and have no copy here.