How to use the @glimmer/util.LinkedList function in @glimmer/util

To help you get started, we’ve selected a few @glimmer/util 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 / vm / append.ts View on Github external
iterate(memo: VersionedPathReference, value: VersionedPathReference): TryOpcode {
    let stack = this.stack;
    stack.push(value);
    stack.push(memo);

    let state = this.capture(2);
    let tracker = this.elements().pushUpdatableBlock();

    // let ip = this.ip;
    // this.ip = end + 4;
    // this.frames.push(ip);

    return new TryOpcode(this.heap.gethandle(this.pc), state, tracker, new LinkedList());
  }
github glimmerjs / glimmer-vm / packages / @glimmer / runtime / lib / vm / append.ts View on Github external
static empty(
    program: RuntimeProgram,
    env: Environment,
    elementStack: ElementBuilder
  ) {
    let dynamicScope: DynamicScope = {
      get() { return UNDEFINED_REFERENCE; },
      set() { return UNDEFINED_REFERENCE; },
      child() { return dynamicScope; }
    };

    let vm = new VM(program, env, Scope.root(UNDEFINED_REFERENCE, 0), dynamicScope, elementStack);
    vm.updatingOpcodeStack.push(new LinkedList());
    return vm;
  }
github glimmerjs / glimmer-vm / packages / @glimmer / runtime / lib / vm / append.ts View on Github external
enterList(relativeStart: number) {
    let updating = new LinkedList();

    let state = this.capture(0);
    let tracker = this.elements().pushBlockList(updating);
    let artifacts = this.stack.peek().artifacts;

    let addr = (this.pc + relativeStart) - this.currentOpSize;
    let start = this.heap.gethandle(addr);

    let opcode = new ListBlockOpcode(start, state, tracker, updating, artifacts);

    this.listBlockStack.push(opcode);

    this.didEnter(opcode);
  }
github glimmerjs / glimmer-vm / packages / @glimmer / runtime / lib / vm / append.ts View on Github external
enter(args: number) {
    let updating = new LinkedList();

    let state = this.capture(args);
    let tracker = this.elements().pushUpdatableBlock();

    let tryOpcode = new TryOpcode(this.heap.gethandle(this.pc), state, tracker, updating);

    this.didEnter(tryOpcode);
  }
github glimmerjs / glimmer-vm / packages / @glimmer / runtime / lib / vm / append.ts View on Github external
static initial(
    program: RuntimeProgram,
    env: Environment,
    self: PathReference,
    dynamicScope: DynamicScope,
    elementStack: ElementBuilder,
    handle: number
  ) {
    let scopeSize = program.heap.scopesizeof(handle);
    let scope = Scope.root(self, scopeSize);
    let vm = new VM(program, env, scope, dynamicScope, elementStack);
    vm.pc = vm.heap.getaddr(handle);
    vm.updatingOpcodeStack.push(new LinkedList());
    return vm;
  }