QuickBEAM.VM.Compiler.Lowering.State (QuickBEAM v0.10.9)

Copy Markdown View Source

Lowering accumulator: tracks the operand stack, slot bindings, and emitted body forms during a block compilation.

Summary

Functions

Lowers private brand attachment.

Lowers array/object spread append into an aggregate literal.

Lowers conversion of an iterable or array-like value into an array object.

Lowers assignment to a local slot and returns the assigned value on the stack.

Lowers a binary operation through a generated local helper.

Binds a stack entry to a temporary variable when it must be evaluated once.

Builds block-call arguments from context, slots, stack, and captures.

Builds a call to a compiler runtime helper using the current context expression.

Lowers object spread property copying.

Returns local slot expressions in block-call argument order.

Lowers prefix decrement of a local slot.

Lowers array element definition with descriptor metadata.

Lowers class definition and constructor/prototype wiring.

Lowers object field definition with an atom-table field name.

Lowers method/getter/setter definition with an atom-table name.

Lowers method/getter/setter definition with a computed name.

Lowers the JavaScript delete operator.

Drops the top operand-stack expression.

Duplicates the top operand-stack expression.

Duplicates the top two operand-stack expressions.

Evaluates an expression for side effects and pushes the resulting temporary.

Prepends one Erlang abstract-form expression to the accumulated body.

Lowers array element read while preserving receiver and element result on the stack.

Lowers property read while preserving both object and property result on the stack.

Lowers property read and applies shaped-object fast paths when possible.

Finishes the current block with an unconditional jump to another block.

Lowers the JavaScript in operator.

Lowers prefix increment of a local slot.

Reorders the top three operand-stack expressions for DUP-style bytecode operations.

Reorders the top two operand-stack expressions for DUP-style bytecode operations.

Lowers a JavaScript function call.

Lowers a JavaScript method call with receiver handling.

Lowers a tail-position JavaScript function call.

Lowers a tail-position JavaScript method call with receiver handling.

Creates a lowering state with slot, stack, capture, and type metadata.

Permutes the top three operand-stack expressions.

Helper for lowering accumulator: tracks the operand stack, slot bindings, and emitted body forms during a block compilation.

Pops several operand-stack expressions preserving evaluation order.

Pops several operand-stack expressions with their inferred types.

Lowers postfix increment/decrement of a local slot.

Pushes an expression and optional type onto the lowering operand stack.

Lowers array element assignment.

Stores an expression and type in a local slot.

Marks a local slot as temporal-dead-zone uninitialized.

Lowers RegExp literal construction from pattern and flags stack values.

Finishes the current block by returning the stack top.

Lowers method home-object attachment for super support.

Lowers function-name assignment from an atom-table index.

Lowers function-name assignment from a computed property value.

Returns the generated expression currently bound to a local slot.

Selects a specialized local unary operator when type information allows it.

Lowers a unary operation through a runtime helper.

Lowers a unary operation through a generated local helper.

Binds a new context expression and marks it as the current context.

Updates a local slot with an expression, initialization flag, and inferred type.

Functions

add_brand(state)

Lowers private brand attachment.

add_to_slot(state, idx)

append_call(state)

Lowers array/object spread append into an aggregate literal.

array_from_call(state, argc)

Lowers conversion of an iterable or array-like value into an array object.

assign_slot(state, idx, keep?, wrapper \\ nil)

Lowers assignment to a local slot and returns the assigned value on the stack.

binary_call(state, mod, fun)

binary_local_call(state, fun)

Lowers a binary operation through a generated local helper.

bind(state, name, expr)

bind_stack_entry(state, idx)

Binds a stack entry to a temporary variable when it must be evaluated once.

block_jump_call(state, target, stack_depths)

block_jump_call_values(target, stack_depths, ctx, slots, stack, capture_cells, frame_mode \\ :args)

Builds block-call arguments from context, slots, stack, and captures.

branch(state, idx, next_entry, target, sense, stack_depths)

capture_cell_expr(state, idx)

closure_vars_expr(map)

compiler_call(state, fun, args)

Builds a call to a compiler runtime helper using the current context expression.

copy_data_properties_call(state, mask)

Lowers object spread property copying.

ctx_expr(map)

current_capture_cells(state)

current_slots(state)

Returns local slot expressions in block-call argument order.

current_stack(state)

dec_slot(state, idx)

Lowers prefix decrement of a local slot.

define_array_el_call(state)

Lowers array element definition with descriptor metadata.

define_class_call(state, atom_idx)

Lowers class definition and constructor/prototype wiring.

define_field_name_call(state, key_expr)

Lowers object field definition with an atom-table field name.

define_method_call(state, method_name, flags)

Lowers method/getter/setter definition with an atom-table name.

define_method_computed_call(state, flags)

Lowers method/getter/setter definition with a computed name.

delete_call(state)

Lowers the JavaScript delete operator.

drop_top(state)

Drops the top operand-stack expression.

duplicate_top(state)

Duplicates the top operand-stack expression.

duplicate_top_two(state)

Duplicates the top two operand-stack expressions.

effectful_push(state, expr)

Evaluates an expression for side effects and pushes the resulting temporary.

effectful_push(state, expr, type)

emit(state, expr)

Prepends one Erlang abstract-form expression to the accumulated body.

emit_all(state, exprs)

get_array_el2(state)

Lowers array element read while preserving receiver and element result on the stack.

get_field2(state, key_expr)

Lowers property read while preserving both object and property result on the stack.

get_field_call(state, key_expr)

Lowers property read and applies shaped-object fast paths when possible.

get_length_call(state)

goto(state, target, stack_depths)

Finishes the current block with an unconditional jump to another block.

in_call(state)

Lowers the JavaScript in operator.

inc_slot(state, idx)

Lowers prefix increment of a local slot.

inline_get_var_ref(state, idx)

insert_top_three(state)

Reorders the top three operand-stack expressions for DUP-style bytecode operations.

insert_top_two(state)

Reorders the top two operand-stack expressions for DUP-style bytecode operations.

invoke_call(state, argc)

Lowers a JavaScript function call.

invoke_constructor_call(state, argc, pc)

invoke_method_call(state, argc)

Lowers a JavaScript method call with receiver handling.

invoke_tail_call(state, argc)

Lowers a tail-position JavaScript function call.

invoke_tail_method_call(state, argc)

Lowers a tail-position JavaScript method call with receiver handling.

new(slot_count, stack_depth, opts \\ [])

Creates a lowering state with slot, stack, capture, and type metadata.

nip_catch(state)

permute_top_three(state)

Permutes the top three operand-stack expressions.

pop(state)

Helper for lowering accumulator: tracks the operand stack, slot bindings, and emitted body forms during a block compilation.

pop_n(state, count)

Pops several operand-stack expressions preserving evaluation order.

pop_n_typed(state, count)

Pops several operand-stack expressions with their inferred types.

pop_typed(state)

post_update(state, fun)

Lowers postfix increment/decrement of a local slot.

push(state, expr)

Pushes an expression and optional type onto the lowering operand stack.

push(state, expr, type)

put_array_el_call(state)

Lowers array element assignment.

put_capture_cell(state, idx, expr)

put_field_call(state, key_expr)

put_slot(state, idx, expr)

Stores an expression and type in a local slot.

put_slot(state, idx, expr, type)

put_uninitialized_slot(state, idx, expr)

Marks a local slot as temporal-dead-zone uninitialized.

put_uninitialized_slot(state, idx, expr, type)

regexp_literal(state)

Lowers RegExp literal construction from pattern and flags stack values.

return_top(state)

Finishes the current block by returning the stack top.

set_home_object(state)

Lowers method home-object attachment for super support.

set_name_atom(state, atom_name)

Lowers function-name assignment from an atom-table index.

set_name_computed(state)

Lowers function-name assignment from a computed property value.

slot_expr(state, idx)

Returns the generated expression currently bound to a local slot.

slot_initialized?(state, idx)

slot_type(state, idx)

specialize_binary(fun, left, left_type, right, right_type)

specialize_unary(fun, expr, type)

Selects a specialized local unary operator when type information allows it.

swap_top(state)

throw_top(state)

unary_call(state, mod, fun, extra_args \\ [])

Lowers a unary operation through a runtime helper.

unary_local_call(state, fun)

Lowers a unary operation through a generated local helper.

update_ctx(state, expr)

Binds a new context expression and marks it as the current context.

update_slot(state, idx, expr)

Updates a local slot with an expression, initialization flag, and inferred type.

update_slot(state, idx, expr, keep?)

update_slot(state, idx, expr, keep?, type)