react-native
                                
                                 react-native copied to clipboard
                                
                                    react-native copied to clipboard
                            
                            
                            
                        Revise ComponentValue parsing model
Summary: D57089275 introduced a layer to parse component values out of the token stream. I modeled this similar to the tokenizer, as a flat iterator of component values. Because function components can nest a variable number of child component values, this now looks like storing a fully resolved tree of tokens on the heap during parsing.
This diff changes the model, so that CSSSyntaxParser::consumeComponentValue() no longer returns a resolved CSS function value. Instead, users of the parser are expected to provide "visitors" which continue parsing, matched based on component value type pattern matched. Visitors can perform parsing specific to their context, and propagate values up the stack, based on their evaluation of the component value.
Removing the heap allocated list of tokens here also lets this core CSS parsing stack keep constexpr, so I added that back, though we need to keep expression trees for math expressions in uncommon cases, so the layer up probaly won't keep constexpr.
Changelog: [Internal]
Differential Revision: D57206706
This pull request was exported from Phabricator. Differential Revision: D57206706
This pull request was exported from Phabricator. Differential Revision: D57206706
This pull request was exported from Phabricator. Differential Revision: D57206706
This pull request was exported from Phabricator. Differential Revision: D57206706
This pull request was exported from Phabricator. Differential Revision: D57206706
This pull request was exported from Phabricator. Differential Revision: D57206706
| Platform | Engine | Arch | Size (bytes) | Diff | 
|---|---|---|---|---|
| android | hermes | arm64-v8a | 19,542,561 | +4 | 
| android | hermes | armeabi-v7a | n/a | -- | 
| android | hermes | x86 | n/a | -- | 
| android | hermes | x86_64 | n/a | -- | 
| android | jsc | arm64-v8a | 22,912,545 | -11 | 
| android | jsc | armeabi-v7a | n/a | -- | 
| android | jsc | x86 | n/a | -- | 
| android | jsc | x86_64 | n/a | -- | 
Base commit: 44f9371f246932215627a7ea01fbedf5c13e3019 Branch: main
This pull request has been merged in facebook/react-native@258b481ae53d1f735f66d6a01b0a23b0f29030f8.
This pull request was successfully merged by @NickGerleman in 258b481ae53d1f735f66d6a01b0a23b0f29030f8.
When will my fix make it into a release? | How to file a pick request?