← System overview

EXECUTION / PROFESSIONAL

MVB bytecode

Run versioned MVB objects through RightMV's compact bytecode engine.

01 / OBJECT SELECTION

Stored bytecode first, compilation on demand.

MVB is RightMV's versioned bytecode format for MV BASIC. It keeps execution compact and predictable while preserving labels, branches, GOSUB flow, programs and subroutine calling conventions.

  1. 01
    FINDUse the stored MVB object

    The catalogue runner first looks for the item's MVB object on the DICT side of its source file. A previously compiled object can be loaded without reparsing the original source on every run.

  2. 02
    COMPILECreate and store a missing object

    If source exists but no object is available, RightMV attempts an on-demand MVB compilation and stores the result. A source/version miss cache prevents unsupported source from being compiled repeatedly.

  3. 03
    RUNExecute bytecode in the shared runtime

    The executor runs the instruction stream with an MVB program counter, operand stack and source map. If compilation cannot support the item, the provider declines it and execution proceeds to the next configured method.

02 / OBJECT ANATOMY

A compact execution container.

Every object begins with the MVB1 magic and a format version. The container records source identity, execution limits, constants and instructions for stable compatibility.

MVB1 + format version
      ├─ program/source identity + flags
      ├─ locals, stack limits, UTF constants
      ├─ instruction stream + signed operands
      └─ source map for BASIC diagnostics

03 / RUNTIME INTEGRATION

Bytecode with full MultiValue context.

MVB is not a separate application sandbox. Its runtime bridge uses the active services for records, locks, select lists, indexes, conversions and shared COMMON blocks, and nested calls resolve other catalogue items through the same execution system.

programsObservable from BASIC line to bytecode PC.

Active-run reporting records both the MVB program counter and mapped BASIC location. Errors can identify the source item, statement and instruction position without exposing the object format to application code.

subroutinesCalls preserve the MV contract.

Arguments are bound for the called item and copied back on return, while captured output and COMMON state remain part of the caller's runtime context. A missing nested object may be compiled on demand.

PropertyTypical valueEffect
MVDB_EXECUTION_ORDERjava,translator,mvb,sourcePlaces MVB before direct source so a stored or newly compiled bytecode object is preferred.
MVDB_NO_MVBemptyComma-separated deny list for items that must skip the MVB provider.
MVDB_MVB_CATALOG_CACHE_SIZE16384Bounds cached catalogue lookups for stored MVB objects.
MVDB_MVB_SOURCE_MISS_CACHE_SIZE16384Remembers source/version combinations that cannot currently produce MVB and avoids repeated compile attempts.
MVDB_MVB_TCONVERSION_CACHE_SIZE1024Bounds cached parsed conversion expressions used by the bytecode runtime.
MVDB_MVB_OPEN_FILE_CACHE_SIZE128Bounds the runtime cache of opened MultiValue files.
MVDB_LOG_MVBoffEnables MVB compilation and execution diagnostics.
MVDB_PERF_MVB_PROFILEfalseEnables MVB performance profiling when detailed executor measurements are needed.