UNPKG

844 BTypeScriptView Raw
1import { Environment } from './environment';
2import { RuntimeHeap, RuntimeConstants, RuntimeOp, ResolutionTimeConstants } from '../program';
3import { RuntimeResolver } from '../serialize';
4import { Owner } from './owner';
5
6/**
7 The Runtime is the set of static structures that contain the compiled
8 code and any host configuration.
9
10 The contents of the Runtime do not change as the VM executes, unlike
11 the VM state.
12 */
13export interface RuntimeContext {
14 env: Environment;
15 program: RuntimeProgram;
16 resolver: RuntimeResolver;
17}
18
19export interface RuntimeProgram {
20 readonly constants: RuntimeConstants & ResolutionTimeConstants;
21 readonly heap: RuntimeHeap;
22
23 opcode(offset: number): RuntimeOp;
24}
25
26export interface RuntimeArtifacts {
27 readonly constants: RuntimeConstants & ResolutionTimeConstants;
28 readonly heap: RuntimeHeap;
29}