How to use the @glimmer/program.RuntimeProgramImpl function in @glimmer/program

To help you get started, we’ve selected a few @glimmer/program examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github glimmerjs / glimmer-vm / packages / @glimmer / integration-tests / lib / modes / jit / compilation-context.ts View on Github external
program(): RuntimeProgram {
    return new RuntimeProgramImpl(this.constants, this.heap);
  }
}
github glimmerjs / glimmer-vm / packages / @glimmer / runtime / lib / environment.ts View on Github external
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,
  };
}
github glimmerjs / glimmer-vm / packages / @glimmer / runtime / lib / environment.ts View on Github external
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,
  };
}