()
| 12588 | }; |
| 12589 | |
| 12590 | var ReactFiberStack = function () { |
| 12591 | var valueStack = []; |
| 12592 | |
| 12593 | var fiberStack = void 0; |
| 12594 | |
| 12595 | { |
| 12596 | fiberStack = []; |
| 12597 | } |
| 12598 | |
| 12599 | var index = -1; |
| 12600 | |
| 12601 | function createCursor(defaultValue) { |
| 12602 | return { |
| 12603 | current: defaultValue |
| 12604 | }; |
| 12605 | } |
| 12606 | |
| 12607 | function isEmpty() { |
| 12608 | return index === -1; |
| 12609 | } |
| 12610 | |
| 12611 | function pop(cursor, fiber) { |
| 12612 | if (index < 0) { |
| 12613 | { |
| 12614 | warning(false, 'Unexpected pop.'); |
| 12615 | } |
| 12616 | return; |
| 12617 | } |
| 12618 | |
| 12619 | { |
| 12620 | if (fiber !== fiberStack[index]) { |
| 12621 | warning(false, 'Unexpected Fiber popped.'); |
| 12622 | } |
| 12623 | } |
| 12624 | |
| 12625 | cursor.current = valueStack[index]; |
| 12626 | |
| 12627 | valueStack[index] = null; |
| 12628 | |
| 12629 | { |
| 12630 | fiberStack[index] = null; |
| 12631 | } |
| 12632 | |
| 12633 | index--; |
| 12634 | } |
| 12635 | |
| 12636 | function push(cursor, value, fiber) { |
| 12637 | index++; |
| 12638 | |
| 12639 | valueStack[index] = cursor.current; |
| 12640 | |
| 12641 | { |
| 12642 | fiberStack[index] = fiber; |
| 12643 | } |
| 12644 | |
| 12645 | cursor.current = value; |
| 12646 | } |
| 12647 |
no outgoing calls
no test coverage detected