irx.builder.lowering.file

irx.builder.lowering.file

Source: packages/irx/src/irx/builder/lowering/file.py

title: Lower semantically resolved single-owner file operations.

Classes

FileVisitorMixin(VisitorMixinBase)

title: Focused file lowering using native status and ownership contracts.

Methods

file_error_buffer(self) -> ir.Value
title: Allocate caller-owned native error storage.
returns:
  type: ir.Value
file_check(self, node: astx.AST, status: ir.Value, error: ir.Value, *, code: str='ARX-RUNTIME-FILE-001', cleanup_temporaries: bool=False) -> None
title: Guard file outputs before use, reporting caller-owned errors.
parameters:
  node:
    type: astx.AST
  status:
    type: ir.Value
  error:
    type: ir.Value
  code:
    type: str
  cleanup_temporaries:
    type: bool
file_cleanup(self, node: astx.AST, handle: ir.Value, owner_id: str | None) -> None
title: Register exactly-once wrapper release on ordinary scope exits.
parameters:
  node:
    type: astx.AST
  handle:
    type: ir.Value
  owner_id:
    type: str | None
lower_file_open(self, node: astx.FunctionCall) -> None
title: Evaluate the resolved file operands and produce an owned handle.
parameters:
  node:
    type: astx.FunctionCall
create_native_file(self, node: astx.AST, resolution: ResolvedFileOpen, values: list[ir.Value], *, cleanup_temporaries: bool=False) -> ir.Value
title: Publish a native handle only after caller-side status checking.
parameters:
  node:
    type: astx.AST
  resolution:
    type: ResolvedFileOpen
  values:
    type: list[ir.Value]
  cleanup_temporaries:
    type: bool
returns:
  type: ir.Value
lower_file_method(self, node: astx.MethodCall) -> None
title: Lower one validated file operation and its status-gated output.
parameters:
  node:
    type: astx.MethodCall
Back to top