@samitouri / QOS-React / commits / 12eaef7ef5

[refactor] remove unused fiberstack functions (#33623)

Ricky committed Jun 23, 2025 at 20:07 UTC 12eaef7ef5fbf6c9d7ec6e16a04bc207a1a68b91
1 file changed +1 -32
packages/react-reconciler/src/ReactFiberStack.js
+1 -32
@@ -27,10 +27,6 @@ function createCursor<T>(defaultValue: T): StackCursor<T> {
27 };
28 }
29
30 -function isEmpty(): boolean {
31 - return index === -1;
32 -}
33 -
30 function pop<T>(cursor: StackCursor<T>, fiber: Fiber): void {
31 if (index < 0) {
32 if (__DEV__) {
@@ -67,31 +63,4 @@ function push<T>(cursor: StackCursor<T>, value: T, fiber: Fiber): void {
63
64 cursor.current = value;
65 }
70 -
71 -function checkThatStackIsEmpty() {
72 - if (__DEV__) {
73 - if (index !== -1) {
74 - console.error(
75 - 'Expected an empty stack. Something was not reset properly.',
76 - );
77 - }
78 - }
79 -}
80 -
81 -function resetStackAfterFatalErrorInDev() {
82 - if (__DEV__) {
83 - index = -1;
84 - valueStack.length = 0;
85 - fiberStack.length = 0;
86 - }
87 -}
88 -
89 -export {
90 - createCursor,
91 - isEmpty,
92 - pop,
93 - push,
94 - // DEV only:
95 - checkThatStackIsEmpty,
96 - resetStackAfterFatalErrorInDev,
97 -};
66 +export {createCursor, pop, push};