Skip to content

[refactor] remove unused fiberstack functions #33623

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 24, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 1 addition & 32 deletions packages/react-reconciler/src/ReactFiberStack.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ function createCursor<T>(defaultValue: T): StackCursor<T> {
};
}

function isEmpty(): boolean {
return index === -1;
}

function pop<T>(cursor: StackCursor<T>, fiber: Fiber): void {
if (index < 0) {
if (__DEV__) {
Expand Down Expand Up @@ -67,31 +63,4 @@ function push<T>(cursor: StackCursor<T>, value: T, fiber: Fiber): void {

cursor.current = value;
}

function checkThatStackIsEmpty() {
if (__DEV__) {
if (index !== -1) {
console.error(
'Expected an empty stack. Something was not reset properly.',
);
}
}
}

function resetStackAfterFatalErrorInDev() {
if (__DEV__) {
index = -1;
valueStack.length = 0;
fiberStack.length = 0;
}
}

export {
createCursor,
isEmpty,
pop,
push,
// DEV only:
checkThatStackIsEmpty,
resetStackAfterFatalErrorInDev,
};
export {createCursor, pop, push};
Loading