Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
program(): RuntimeProgram {
return new RuntimeProgramImpl(this.constants, this.heap);
}
}
program(): RuntimeProgram {
return new RuntimeProgramImpl(this.constants, this.heap);
}
}
export function JitRuntime(
options: EnvironmentOptions,
resolver: RuntimeResolverDelegate = {},
delegate: EnvironmentDelegate = {}
): JitRuntimeContext {
let env = new EnvironmentImpl(options, delegate);
let constants = new Constants();
let heap = new HeapImpl();
let program = new RuntimeProgramImpl(constants, heap);
return {
env,
resolver: new DefaultRuntimeResolver(resolver),
program,
};
}
export function CustomJitRuntime(
resolver: RuntimeResolver,
context: SyntaxCompilationContext & {
program: { constants: RuntimeConstants; heap: RuntimeHeap };
},
env: Environment
): JitRuntimeContext {
let program = new RuntimeProgramImpl(context.program.constants, context.program.heap);
return {
env,
resolver: new DefaultRuntimeResolver(resolver),
program,
};
}