skia2/tests/sksl
John Stiles 2dda50dd50 Add return-value check to the function finalizer.
Rather than have the inliner own this responsibility, the function
finalizer now detects if a function is supposed to return a value but
never actually does. This will allow us to detect this error case even
if the inliner is disabled. The inliner should no longer encounter
functions that claim to return a value but don't, so it will now assert
if one is encountered. (The inliner still has the logic to handle this
case gracefully, just in case.)

The check is currently very simple and doesn't analyze the structure of
the function, so it won't report cases where some paths return a value
and others don't, e.g. this will pass the test:

    int func() { if (something()) return 123; }

(This is good enough to resolve the inliner issue, though, as it only
occurred in functions with no value-returns at all.)

Change-Id: I21f13daffe66c8f2e72932b320ee268ba9207bfa
Bug: oss-fuzz:31469, oss-fuzz:31525, skia:11377
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/377196
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-03-03 16:29:22 +00:00
..
blend Avoid generating unused variables in the Inliner. 2021-02-25 19:18:19 +00:00
errors Add return-value check to the function finalizer. 2021-03-03 16:29:22 +00:00
folding Support self-assignment elimination in the constant-folder. 2021-03-01 22:46:01 +00:00
fp Remove fragmentProcessor field access 2021-02-24 21:33:36 +00:00
glsl Remove specific blend mode layout qualifiers 2021-02-23 15:45:55 +00:00
inliner Avoid generating unused variables in the Inliner. 2021-02-25 19:18:19 +00:00
intrinsics Migrate convertSwizzle to Swizzle::Make. 2021-02-19 21:26:58 +00:00
metal Allow repeated params in Metal out-params helper. 2021-02-16 15:45:45 +00:00
runtime Avoid generating unused variables in the Inliner. 2021-02-25 19:18:19 +00:00
runtime_errors Align SkSL const rules more closely with GLSL 2021-02-26 17:44:11 +00:00
shared Align SkSL const rules more closely with GLSL 2021-02-26 17:44:11 +00:00
spirv Improve memory layout handling in SPIRV generator 2021-01-22 22:16:48 +00:00
workarounds Avoid generating unused variables in the Inliner. 2021-02-25 19:18:19 +00:00
README.txt Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00

This directory contains skslc-compiled output from matching source files
in the /resources/sksl/ directory.