()
| 12553 | }; |
| 12554 | |
| 12555 | var ReactFiberStack = function () { |
| 12556 | var valueStack = []; |
| 12557 | |
| 12558 | var fiberStack = void 0; |
| 12559 | |
| 12560 | { |
| 12561 | fiberStack = []; |
| 12562 | } |
| 12563 | |
| 12564 | var index = -1; |
| 12565 | |
| 12566 | function createCursor(defaultValue) { |
| 12567 | return { |
| 12568 | current: defaultValue |
| 12569 | }; |
| 12570 | } |
| 12571 | |
| 12572 | function isEmpty() { |
| 12573 | return index === -1; |
| 12574 | } |
| 12575 | |
| 12576 | function pop(cursor, fiber) { |
| 12577 | if (index < 0) { |
| 12578 | { |
| 12579 | warning(false, 'Unexpected pop.'); |
| 12580 | } |
| 12581 | return; |
| 12582 | } |
| 12583 | |
| 12584 | { |
| 12585 | if (fiber !== fiberStack[index]) { |
| 12586 | warning(false, 'Unexpected Fiber popped.'); |
| 12587 | } |
| 12588 | } |
| 12589 | |
| 12590 | cursor.current = valueStack[index]; |
| 12591 | |
| 12592 | valueStack[index] = null; |
| 12593 | |
| 12594 | { |
| 12595 | fiberStack[index] = null; |
| 12596 | } |
| 12597 | |
| 12598 | index--; |
| 12599 | } |
| 12600 | |
| 12601 | function push(cursor, value, fiber) { |
| 12602 | index++; |
| 12603 | |
| 12604 | valueStack[index] = cursor.current; |
| 12605 | |
| 12606 | { |
| 12607 | fiberStack[index] = fiber; |
| 12608 | } |
| 12609 | |
| 12610 | cursor.current = value; |
| 12611 | } |
| 12612 |
no outgoing calls
no test coverage detected