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
linked_meta_hashesReturns each linked definition’s hash and referenced names.
linked_meta_targetsReturns the linked copies, and the runtime builders, by name.
x2c_decl_makeDeclares name with type and an optional initializer.
x2c_expr_castReturns expression cast to type, which is a declared type rather than syntax.
x2c_expr_fieldReturns the expression receiver.name.
x2c_param_makeReturns a parameter named name with type.
x2c_type_membersReturns enum members as (name value) rows in declaration order.

Functions

linked_meta_hashes

Map linked_meta_hashes(void)

Returns each linked definition’s hash and referenced names.

Source: src/linked-meta.x:774

linked_meta_targets

Map linked_meta_targets(void)

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

Source: src/linked-meta.x:667

x2c_decl_make

List x2c_decl_make(List type, Var name, List initializer)

Declares name with type and an optional initializer.

Source: src/linked-meta.x:37

x2c_expr_cast

List x2c_expr_cast(List type, List expression)

Returns expression cast to type, which is a declared type rather than syntax. A generator needs it where the value it holds and the parameter it reaches differ in width or sign.

Source: src/linked-meta.x:30

x2c_expr_field

List x2c_expr_field(List receiver, String name)

Returns the expression receiver.name.

Source: src/linked-meta.x:22

x2c_param_make

List x2c_param_make(List type, Var name)

Returns a parameter named name with type.

Source: src/linked-meta.x:45

x2c_type_members

List x2c_type_members(List type)

Returns enum members as (name value) rows in declaration order. An implicit value is nil; a literal value retains its spelling.

Source: src/linked-meta.x:74

Design notes

Generated by tools/gen-linked-meta.sh; do not edit. Bodied meta functions and initialized static values from lib/meta.x and imported .xmacro files appear without their meta markers, so their functions and initializers execute as native code. Compiler.bind_linked_meta binds an imported definition to its copy only when the two texts hash the same, so a compiler built before a .xmacro edit stages the edited definition. The lib/meta.x builders with a run-time form bind to the runtime’s own definitions and have no copy here.