How to use the @glimmer/program.patchStdlibs 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 / opcode-compiler / lib / wrapped-component.ts View on Github external
concatStatements(context, actions);

    let handle = context.encoder.commit(context.syntax.program.heap, m.size);

    if (typeof handle !== 'number') {
      return handle;
    }

    this.compiled = handle;

    if (DEBUG) {
      debugCompiler(context, handle);
    }

    patchStdlibs(context.syntax.program);
    return handle;
  }
}
github glimmerjs / glimmer-vm / packages / @glimmer / opcode-compiler / lib / compilable-template.ts View on Github external
function maybeCompile(
  compilable: CompilableTemplateImpl,
  context: SyntaxCompilationContext
): HandleResult {
  if (compilable.compiled !== null) return compilable.compiled!;

  compilable.compiled = PLACEHOLDER_HANDLE;

  let { statements, meta } = compilable;

  let result = compileStatements(statements, meta, context);
  patchStdlibs(context.program);
  compilable.compiled = result;

  return result;
}