skia2/include/sksl
Ethan Nicholas a2d22b2e08 Broke DSLVar into separate subclasses
Previously, DSLVar represented local, global, and parameter variables.
This splits it into three separate subclasses.

In addition to just being a cleaner API in general, this also addresses
an issue we ran into with the upcoming DSLParser: previously, a global
DSLVar's storage was not set correctly until DeclareGlobal was called,
so an AddToSymbolTable call prior to DeclareGlobal would create the
SkSL variable with the wrong storage, causing spurious errors on
global-only modifiers. But holding off on the AddToSymbolTable tends to
break constructs like "int x = 0, y = x", so improving the API seemed
like the best way to address it.

Now that we have greater type safety around variables, we can
potentially avoid having to call AddToSymbolTable for DSLVar and
DSLGlobalVar altogether, since we know they are both supposed to end up
in the symbol table, but that isn't something I want to change in this
CL.

Change-Id: I5f390a7384ce0af6a2131d84f97fc5e5b318063f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/428576
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2021-07-15 15:40:06 +00:00
..
DSL.h Broke DSLVar into separate subclasses 2021-07-15 15:40:06 +00:00
DSLBlock.h Fixed some fixups not being applied to DSL code 2021-07-12 14:25:38 +00:00
DSLCase.h Added operator= on DSLCase 2021-06-10 22:29:24 +00:00
DSLCore.h Broke DSLVar into separate subclasses 2021-07-15 15:40:06 +00:00
DSLErrorHandling.h DSL var values are now specified at construction time rather than in 2021-03-05 21:47:28 +00:00
DSLExpression.h Broke DSLVar into separate subclasses 2021-07-15 15:40:06 +00:00
DSLFunction.h Broke DSLVar into separate subclasses 2021-07-15 15:40:06 +00:00
DSLLayout.h Remove layout(override_coverage) 2021-05-18 19:39:54 +00:00
DSLModifiers.h Broke DSLVar into separate subclasses 2021-07-15 15:40:06 +00:00
DSLRuntimeEffects.h Added an API for creating RuntimeEffects using the SkSL DSL. 2021-04-16 19:36:54 +00:00
DSLStatement.h Added Poison values to SkSL to improve DSL error handling 2021-06-28 19:15:16 +00:00
DSLSymbols.h Broke DSLVar into separate subclasses 2021-07-15 15:40:06 +00:00
DSLType.h Broke DSLVar into separate subclasses 2021-07-15 15:40:06 +00:00
DSLVar.h Broke DSLVar into separate subclasses 2021-07-15 15:40:06 +00:00
DSLWrapper.h Added DSLWrapper so DSL classes can be used in containers 2021-05-04 17:19:35 +00:00