skia2/gn
John Stiles e1d1b08203 Migrate convertSwitch to SwitchStatement::Make.
This splits switch() construction into two stages.

- One version of Make takes an array of case-values and case-statement
lists, and is responsible for reporting errors if the case-values are
not unique or are improperly typed. This is what the IR generator or DSL
will start with on its first encounter with the switch statement.

- The other version of Make takes an array of already-processed
SwitchCases and can assume the invariant that they're all correctly-
typed with unique values. This is what we will have when a statement
is inlined or otherwise cloned. (We still assert this invariant, for
correctness' sake, but in release mode we assume it.)

This CL doesn't perform any optimizations at Make time yet; it does work
equivalent to how `switch` works in the IR generator today. It does
improve duplicate case-label checking slightly; duplicate case labels
are now reported, and duplicate `default:` labels are detected.
(Multiple `default` labels won't pass the parser, but they can be
constructed in DSL.)

Change-Id: I537ce2c8236152d58641fb1793619d66a62c01a8
Bug: skia:11342
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/372616
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-02-23 19:16:40 +00:00
..
toolchain allow overriding {target,host}_link = ... in GN 2020-11-05 19:40:47 +00:00
__init__.py
bench.gni drawBitmap is deprecated 2021-01-24 17:39:15 +00:00
BUILD.gn Disable -Wrange-loop-analysis. 2021-02-20 15:45:23 +00:00
BUILDCONFIG.gn Add is_apple (= is_mac || is_ios) to our GN files 2021-01-12 19:10:58 +00:00
call.py
checkdir.py
checkpath.py
codesign_ios.py Update code-signing script to have better error messages. 2020-11-09 18:41:36 +00:00
compile_ib_files.py
compile_processors.py Fix worklist files with skslc. 2020-11-18 19:41:45 +00:00
compile_sksl_tests.py Add .stage output to skslc for runtime effects 2021-02-09 20:11:56 +00:00
copy_git_directory.py
core.gni Add SkReadPixelsRec.h & SkImage_Base.h to core.gni 2021-02-22 21:27:26 +00:00
cp.py Work around python 2 shutil.copy2 date bug 2020-09-28 20:12:13 +00:00
create_sksl_fp.py SkSL include files are now stored in a binary format 2020-07-31 13:48:25 +00:00
dehydrate_sksl.py quiet dehyrdate_sksl unless it fails 2021-01-08 18:14:29 +00:00
effects_imagefilters.gni Remove deprecated morphology image filter headers 2021-02-22 21:50:26 +00:00
effects.gni Hide (unused) SkDrawLooper 2021-02-07 12:49:53 +00:00
find_headers.py
find_msvc.py
find_xcode_sysroot.py
flutter_defines.gni Revert "Opt into new image-shaders with sampling" 2021-02-20 21:28:01 +00:00
fuchsia_defines.gni Enable new clip stack for Fuchsia 2020-10-12 20:41:03 +00:00
gen_plist_ios.py Add product bundle name to iOS Xcode projects 2020-11-16 16:00:56 +00:00
gm.gni Revert "Fix issues with insetting and outsetting quads." 2021-02-22 22:24:09 +00:00
gn_meta_sln.py
gn_to_bp_utils.py Silence SkCodecPrintf on Android 2021-01-11 19:48:04 +00:00
gn_to_bp.py Remove some ableist language from infra parts 2021-01-29 17:36:18 +00:00
gn_to_cmake.py Switch GN defs on Mac and iOS to use frameworks, take 3 2020-08-12 17:03:47 +00:00
gpu.gni Support building GrGLInterface factory functions for both EGL and GLX. 2021-02-23 16:37:48 +00:00
highest_version_dir.py
ios.gni Add ios_min_target. 2020-11-18 21:21:25 +00:00
is_clang.py
make_gm_gni.py
opts.gni
pdf.gni
push_to_android.py
rm.py
run_sksllex.py
samples.gni Remove Improved Perlin Noise 2021-01-11 15:27:26 +00:00
shared_sources.gni
skia.gni Add UWP support 2021-02-10 19:04:42 +00:00
sksl_tests.gni Fix switch optimization pass. 2021-02-23 15:38:24 +00:00
sksl.gni Migrate convertSwitch to SwitchStatement::Make. 2021-02-23 19:16:40 +00:00
tests.gni Allow optional targets to specify tests. 2021-02-18 19:32:55 +00:00
utils.gni Directly measure CoreText weight mapping. 2021-01-27 00:15:16 +00:00
xps.gni