skia2/src
John Stiles aa369d2b8e Fix error with inlined literals overflowing their types.
It's possible to write code containing errors that are only apparent
once the inliner runs. For instance, a function which takes a short and
returns its negative it is valid for most inputs, but undefined for
-32768 (because +32768 does not fit in a short). A function which takes
floats and casts them to ints is valid for many inputs, but not valid if
you pass in 5 billion.

This CL restructures our out-of-range integer error detection to report
errors cleanly in these cases instead of asserting. It also refactors
the range checking code to be usable in situations where we don't yet
have a Literal expression.

Change-Id: I98f0be63bf9afbbf1ab90233fa86d380cfae42b4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/466439
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-11-02 14:26:44 +00:00
..
android Rename/simplify SkCanvas::resetClip() and make recordable 2021-07-23 19:05:42 +00:00
c Migrate to drawImage w/ sampling 2021-01-22 22:38:02 +00:00
codec Revert "Move GR_MAKE_BITFIELD_OPS and GrAlignTo to non-GPU files" 2021-10-29 12:50:09 +00:00
core update LLVM in SkVM 2021-11-01 20:14:53 +00:00
effects Add SkColorMatrix factories for SkYUVColorSpace 2021-10-20 16:47:03 +00:00
fonts Revert "Revert "onMatchFaceStyle is unused, so remove it"" 2021-04-27 16:40:29 +00:00
gpu Add sk_SecondaryFragColor built-in. 2021-11-01 21:25:19 +00:00
image Remove SK_SURFACE_COPY_ON_WRITE_CRASHES 2021-11-01 15:04:14 +00:00
images Reland "Add sRGB 8888 colortype" 2021-08-24 12:56:32 +00:00
lazy Replace 'typedef xxxxx INHERITED' with 'using INHERITED = xxxx;'. 2020-09-03 03:41:26 +00:00
opts Reland "change matrix_2x3 to row-major" 2021-10-07 15:28:11 +00:00
pathops Fix various cases of variable shadowing in Skia. 2021-08-11 00:03:13 +00:00
pdf [pdf] Treat dc:creator as rdf:Seq 2021-10-18 17:20:29 +00:00
ports Revert "Move GR_MAKE_BITFIELD_OPS and GrAlignTo to non-GPU files" 2021-10-29 12:50:09 +00:00
sfnt Make class members that are static constexpr also be inline. 2021-10-11 16:22:59 +00:00
shaders Revert "Move alpha modulation into paint conversion (Step 2)" 2021-11-01 20:36:13 +00:00
sksl Fix error with inlined literals overflowing their types. 2021-11-02 14:26:44 +00:00
svg Use SkClipOp::kFoo instead of kFoo_SkClipOp from SkClipOpPriv 2021-08-03 18:08:21 +00:00
utils Make class members that are static constexpr also be inline. 2021-10-11 16:22:59 +00:00
xml Less string copies of text in XML parsing. 2021-02-05 15:36:43 +00:00
xps Remove ableist language 2021-06-16 21:37:21 +00:00