Skip to content

[Pratt Parser] Optimize for recursion depth and reduce stack frame size.#2161

Open
copybara-service[bot] wants to merge 1 commit into
masterfrom
test_951740031
Open

[Pratt Parser] Optimize for recursion depth and reduce stack frame size.#2161
copybara-service[bot] wants to merge 1 commit into
masterfrom
test_951740031

Conversation

@copybara-service

Copy link
Copy Markdown

[Pratt Parser] Optimize for recursion depth and reduce stack frame size.

  • Unwrap nested parentheses iteratively in ParsePrimary.
  • Parse prefix unary operator chains (! and -) iteratively in ParseUnary.
  • Outline non-recursive helper methods with ABSL_ATTRIBUTE_NOINLINE to shrink recursive stack frame sizes.

- Unwrap nested parentheses iteratively in ParsePrimary.
- Parse prefix unary operator chains (! and -) iteratively in ParseUnary.
- Outline non-recursive helper methods with ABSL_ATTRIBUTE_NOINLINE to shrink recursive stack frame sizes.

PiperOrigin-RevId: 951740031
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant