• Home
  • Raw
  • Download

Lines Matching full:stack

6 import { StackValue } from './stack-value.js'
18 readonly stack: Array<StackValue> = []; property in Builder
104 this.stack.push(this.offsetStackValue(blobOffset, ValueType.BLOB, bitWidth));
110 this.stack.push(this.stringLookup[str]);
122 this.stack.push(stackValue);
131 this.stack.push(this.keyLookup[str]);
139 this.stack.push(stackValue);
166 if (this.stack[this.stack.length - 1].type !== ValueType.KEY) {
182 this.stackPointers.push({ stackPosition: this.stack.length, isVector: true });
186 …this.stackPointers.push({ stackPosition: this.stack.length, isVector: false, presorted: presorted …
190 const vecLength = this.stack.length - stackPointer.stackPosition;
192 this.stack.splice(stackPointer.stackPosition, vecLength);
193 this.stack.push(vec);
201 for (let i = stackPointer.stackPosition; i < this.stack.length; i += 2) {
202 keyVectorHash += `,${this.stack[i].offset}`;
204 const vecLength = (this.stack.length - stackPointer.stackPosition) >> 1;
211 this.stack.splice(stackPointer.stackPosition, vecLength << 1);
212 this.stack.push(valuesStackValue);
217 const stack = this.stack constant
221 …throw `Stack values are not keys ${v1} | ${v2}. Check if you combined [addKey] with add... method …
235 function swap(stack: Array<StackValue>, flipIndex: number, i: number) {
237 const k = stack[flipIndex];
238 const v = stack[flipIndex + 1];
239 stack[flipIndex] = stack[i];
240 stack[flipIndex + 1] = stack[i + 1];
241 stack[i] = k;
242 stack[i + 1] = v;
246 for (let i = stackPointer.stackPosition; i < stack.length; i += 2) {
248 for (let j = i + 2; j < stack.length; j += 2) {
249 if (shouldFlip(stack[flipIndex], stack[j])) {
254 swap(stack, flipIndex, i);
261 …throw `Stack values are not keys ${v1} | ${v2}. Check if you combined [addKey] with add... method …
282 const pivot = stack[mid];
287 while (smaller(stack[left_new], pivot)) {
290 while (smaller(pivot, stack[right_new])) {
294 swap(stack, left_new, right_new);
307 for (let i = stackPointer.stackPosition; i < this.stack.length - 2; i += 2) {
308 if (shouldFlip(this.stack[i], this.stack[i + 2])) {
315 if (this.stack.length - stackPointer.stackPosition > 40) {
316 quickSort(stackPointer.stackPosition, this.stack.length - 2);
345 for (let i = start; i < this.stack.length; i += step) {
346 const elementWidth = this.stack[i].elementWidth(this.offset, i + prefixElements);
351 vectorType = this.stack[i].type;
354 if (vectorType !== this.stack[i].type) {
369 for (let i = start; i < this.stack.length; i += step) {
370 this.writeStackValue(this.stack[i], byteWidth);
373 for (let i = start; i < this.stack.length; i += step) {
374 this.writeUInt(this.stack[i].storedPackedType(), 1);
412 if (this.stack.length !== 1) {
413 …throw `Stack has to be exactly 1, but it is ${this.stack.length}. You have to end all started vect…
415 const value = this.stack[0];
429 this.stack.push(this.nullStackValue());
431 this.stack.push(this.boolStackValue(value));
433 this.stack.push(this.intStackValue(value));
436 this.stack.push(this.intStackValue(value));
438 this.stack.push(this.floatStackValue(value));
484 this.stack.push(this.intStackValue(value));
488 this.stack.push(this.indirectIntLookup[value]);
497 this.stack.push(stackOffset);
507 this.stack.push(this.uintStackValue(value));
511 this.stack.push(this.indirectUIntLookup[value]);
520 this.stack.push(stackOffset);
530 this.stack.push(this.floatStackValue(value));
534 this.stack.push(this.indirectFloatLookup[value]);
543 this.stack.push(stackOffset);