How to use the @glimmer/vm.Op.BindDynamicScope function in @glimmer/vm

To help you get started, we’ve selected a few @glimmer/vm 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 / runtime / lib / compiled / opcodes / vm.ts View on Github external
(vm, { op1: register }) => {
    vm.load(register);
  },
  OpcodeKind.Mut
);

APPEND_OPCODES.add(
  Op.Fetch,
  (vm, { op1: register }) => {
    vm.fetch(register);
  },
  OpcodeKind.Mut
);

APPEND_OPCODES.add(
  Op.BindDynamicScope,
  (vm, { op1: _names }) => {
    let names = vm[CONSTANTS].getArray(_names);
    vm.bindDynamicScope(names);
  },
  OpcodeKind.Mut
);

APPEND_OPCODES.add(
  Op.Enter,
  (vm, { op1: args }) => {
    vm.enter(args);
  },
  OpcodeKind.Mut
);

APPEND_OPCODES.add(
github glimmerjs / glimmer-vm / packages / @glimmer / runtime / lib / compiled / opcodes / vm.ts View on Github external
vm.stack.dup(position);
});

APPEND_OPCODES.add(Op.Pop, (vm, { op1: count }) => {
  vm.stack.pop(count);
});

APPEND_OPCODES.add(Op.Load, (vm, { op1: register }) => {
  vm.load(register);
});

APPEND_OPCODES.add(Op.Fetch, (vm, { op1: register }) => {
  vm.fetch(register);
});

APPEND_OPCODES.add(Op.BindDynamicScope, (vm, { op1: _names }) => {
  let names = vm.constants.getArray(_names);
  vm.bindDynamicScope(names);
});

APPEND_OPCODES.add(Op.PushFrame, vm => {
  vm.pushFrame();

  check(vm.stack.peek(), CheckNumber);
  check(vm.stack.peek(1), CheckNumber);
});

APPEND_OPCODES.add(Op.PopFrame, vm => {
  vm.popFrame();
});

APPEND_OPCODES.add(Op.Enter, (vm, { op1: args }) => {