()
| 11786 | }; |
| 11787 | |
| 11788 | var ReactFiberStack = function () { |
| 11789 | var valueStack = []; |
| 11790 | |
| 11791 | var fiberStack = void 0; |
| 11792 | |
| 11793 | { |
| 11794 | fiberStack = []; |
| 11795 | } |
| 11796 | |
| 11797 | var index = -1; |
| 11798 | |
| 11799 | function createCursor(defaultValue) { |
| 11800 | return { |
| 11801 | current: defaultValue |
| 11802 | }; |
| 11803 | } |
| 11804 | |
| 11805 | function isEmpty() { |
| 11806 | return index === -1; |
| 11807 | } |
| 11808 | |
| 11809 | function pop(cursor, fiber) { |
| 11810 | if (index < 0) { |
| 11811 | { |
| 11812 | warning(false, 'Unexpected pop.'); |
| 11813 | } |
| 11814 | return; |
| 11815 | } |
| 11816 | |
| 11817 | { |
| 11818 | if (fiber !== fiberStack[index]) { |
| 11819 | warning(false, 'Unexpected Fiber popped.'); |
| 11820 | } |
| 11821 | } |
| 11822 | |
| 11823 | cursor.current = valueStack[index]; |
| 11824 | |
| 11825 | valueStack[index] = null; |
| 11826 | |
| 11827 | { |
| 11828 | fiberStack[index] = null; |
| 11829 | } |
| 11830 | |
| 11831 | index--; |
| 11832 | } |
| 11833 | |
| 11834 | function push(cursor, value, fiber) { |
| 11835 | index++; |
| 11836 | |
| 11837 | valueStack[index] = cursor.current; |
| 11838 | |
| 11839 | { |
| 11840 | fiberStack[index] = fiber; |
| 11841 | } |
| 11842 | |
| 11843 | cursor.current = value; |
| 11844 | } |
| 11845 |
no outgoing calls
no test coverage detected