()
| 12804 | }; |
| 12805 | |
| 12806 | var ReactFiberStack = function () { |
| 12807 | var valueStack = []; |
| 12808 | |
| 12809 | var fiberStack = void 0; |
| 12810 | |
| 12811 | { |
| 12812 | fiberStack = []; |
| 12813 | } |
| 12814 | |
| 12815 | var index = -1; |
| 12816 | |
| 12817 | function createCursor(defaultValue) { |
| 12818 | return { |
| 12819 | current: defaultValue |
| 12820 | }; |
| 12821 | } |
| 12822 | |
| 12823 | function isEmpty() { |
| 12824 | return index === -1; |
| 12825 | } |
| 12826 | |
| 12827 | function pop(cursor, fiber) { |
| 12828 | if (index < 0) { |
| 12829 | { |
| 12830 | warning(false, 'Unexpected pop.'); |
| 12831 | } |
| 12832 | return; |
| 12833 | } |
| 12834 | |
| 12835 | { |
| 12836 | if (fiber !== fiberStack[index]) { |
| 12837 | warning(false, 'Unexpected Fiber popped.'); |
| 12838 | } |
| 12839 | } |
| 12840 | |
| 12841 | cursor.current = valueStack[index]; |
| 12842 | |
| 12843 | valueStack[index] = null; |
| 12844 | |
| 12845 | { |
| 12846 | fiberStack[index] = null; |
| 12847 | } |
| 12848 | |
| 12849 | index--; |
| 12850 | } |
| 12851 | |
| 12852 | function push(cursor, value, fiber) { |
| 12853 | index++; |
| 12854 | |
| 12855 | valueStack[index] = cursor.current; |
| 12856 | |
| 12857 | { |
| 12858 | fiberStack[index] = fiber; |
| 12859 | } |
| 12860 | |
| 12861 | cursor.current = value; |
| 12862 | } |
| 12863 |
no outgoing calls
no test coverage detected