How to use the @glimmer/program.RuntimeOpImpl 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 / test-helpers / lib / environment / modes / lazy / environment.ts View on Github external
constructor() {
    this.stdlib = compileStd(this);

    this._opcode = new RuntimeOpImpl(this.heap);
  }
github glimmerjs / glimmer-vm / packages / @glimmer / opcode-compiler / lib / debug.ts View on Github external
export function debugSlice(context: TemplateCompilationContext, start: number, end: number) {
  if (DEBUG) {
    (console as any).group(`%c${start}:${end}`, 'color: #999');

    let heap = context.syntax.program.heap;
    let opcode = new RuntimeOpImpl(heap);

    let _size = 0;
    for (let i = start; i < end; i = i + _size) {
      opcode.offset = i;
      let [name, params] = debug(
        context.syntax.program.constants as Recast,
        context.syntax.program.resolverDelegate,
        opcode,
        opcode.isMachine
      );
      console.log(`${i}. ${logOpcode(name, params)}`);
      _size = opcode.size;
    }
    opcode.offset = -_size;
    console.groupEnd();
  }