Skip to main content

Module opencoder

Module opencoder 

Source

Structs§

BoxArrayIter
opencoder.py: BoxArrayIter — iterates encoded box arrays in snapshot data, decoding tagged values.
CutTrace
opencoder.py: CutTrace — supports cutting traces at breakpoints for bridge compilation.
Snapshot
A snapshot captures the interpreter state at a guard/exit point. opencoder.py: Snapshot
SnapshotIterator
opencoder.py: SnapshotIterator — iterates snapshot values in bottom-up frame order (inner frame first).
SnapshotStorage
Snapshot storage for a trace. opencoder.py: Trace._snapshot_data, _snapshot_array_data
TopDownSnapshotIterator
opencoder.py: TopDownSnapshotIterator — iterates snapshots from outermost to innermost frame (top-down order). Used by resume data construction which processes frames from the outermost caller to the innermost callee.
TopSnapshot
Top-level snapshot (includes vable/vref tracking). opencoder.py: TopSnapshot
TraceIterator
opencoder.py: TraceIterator — iterates operations in a trace with dead range tracking.
TraceRecordBuffer

Enums§

DecodedSnapshotValue
Decoded value from a snapshot.

Constants§

INIT_SIZE
Initial trace buffer size.
MAX_VALUE
MIN_VALUE
RPython compatibility numeric limits for signed varints in this model.
SMALL_INT_START
RPython compatibility bounds for small int tagging.
SMALL_INT_STOP
SNAPSHOT_PREV_COMES_NEXT
SNAPSHOT_PREV_NEEDS_PATCHING
RPython compatibility sentinel values for snapshot linked lists.
SNAPSHOT_PREV_NONE
TAGBOX
TAGCONSTOTHER
TAGCONSTPTR
TAGINT
Tag constants for snapshot encoding. opencoder.py: TAGINT, TAGCONSTPTR, TAGCONSTOTHER, TAGBOX
TAGMASK
RPython compatibility constants.
TAGSHIFT
TAG_MASK
Mask for tag extraction.
TAG_SHIFT
Number of tag bits.

Functions§

combine_uint
decode_trace
Decode a Trace from a compact byte buffer.
decode_varint
Decode a varint from a byte slice. Returns (value, bytes_consumed).
decode_varint_signed
Decode a signed varint (zigzag encoding). Returns (value, bytes_consumed). opencoder.py: decode_varint_signed
encode_trace
Encode a Trace into a compact byte buffer.
encode_varint
Encode a u64 as a variable-length integer (LEB128).
encode_varint_signed
Encode a signed i64 as a varint (zigzag encoding). opencoder.py: encode_varint_signed
skip_varint_signed
tag
Encode a tagged value for snapshot storage. opencoder.py: tag(kind, value)
unpack_uint
untag
Decode a tagged value from snapshot storage. opencoder.py: untag(tagged) -> (kind, value)
varint_only_decode

Type Aliases§

Trace
opencoder.py: Trace — compact trace recording buffer.