-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix name overlaps for lists in chip-tool. (#15119)
Before this change, chip-tool's codegen just puts all the list buffers on the stack and they all have to survive until we use them, so they can't be in nested scopes. They are suffixed with a nesting depth, but if you have a list of structs that contain lists, the names for the non-toplevel lists collide with each other. This change switches over to the setup Darwin and Android already use: heap-allocate the lists, hand the buffers to an RAII object higher up on the stack that will free them when we are done, and then we can scope each allocation and filling of a list in its own scope to limit the visibility of the individual lists' names and avoid them colliding with each other.
- Loading branch information
1 parent
7721423
commit d1c7e85
Showing
4 changed files
with
3,616 additions
and
388 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.