$ the-wire · showcase
Swift drops redundant array-index overflow check, Kotlin exposes boxed overrides
By RepoJournal · Filed · About Mobile platforms
Swift's optimizer now skips an overflow check on array-index additions that can never observably overflow, while Kotlin's symbol light classes gain support for boxed methods on overrides in final classes.
Swift merged the first of two optimizations in #90824 [1] (and [2]): `x + c` (c > 0) used as an array index can't observably overflow, since an overflow makes the sum negative and the bounds check (`>= 0`) traps anyway. The redundant overflow check is dropped when the sum is later checked `< 0`, shrinking generated code for array access. Separately, two Kotlin commits [3] and [4] fix KT-88879: with `-Xjvm-expose-boxed`, symbol light classes did not generate a light method for an override in a final class when the signature mentions a value class, so Java calls to such methods were reported as unresolved despite valid JVM backend code. Overrides are now boxed and exposed. Three Flutter engine autoroll commits [5][6][8] advance Skia, and one [7] updates the Fuchsia Linux SDK; all are routine dependency rolls with no breakage reported.
Action items
- → Watch the Swift optimizer change in your builds; it should reduce code size for array-index-heavy loops apple/swift [monitor]
- → If you rely on boxed value-class overrides from Java interop, test with the next Kotlin nightly that includes this fix JetBrains/kotlin [plan]
- → No action needed on Flutter engine rolls unless you see a Skia-related regression flutter/flutter [monitor]
References
- [1] [SILOptimizer] Drop the overflow check of an array-index addition ↗ apple/swift
- [2] [SILOptimizer] Drop the overflow check of an array-index addition ↗ apple/swift
- [3] [SLC] Expose boxed methods for overrides in final classes ↗ JetBrains/kotlin
- [4] [SLC] Extend JvmExposeBoxed tests for overrides ↗ JetBrains/kotlin
- [5] Roll Skia from 588b550a4dd8 to 24a8072e4046 (1 revision) (#192050) ↗ flutter/flutter
- [6] Roll Skia from 3ae8e3d1e335 to ce359c7fbfe6 (1 revision) (#192037) ↗ flutter/flutter
- [7] Roll Fuchsia Linux SDK from o9DikEfRoFyVK3LKD... to EPzxifoyt36b5qiBy... (#192048) ↗ flutter/flutter
- [8] Roll Skia from ce359c7fbfe6 to 588b550a4dd8 (1 revision) (#192040) ↗ flutter/flutter