- Fix
sum
replacements to not targetFloat
andDouble
types
- Add (approximate) locations to compiler plugin errors
- This may be inaccurate in some cases but will remain close to the actual location.
- If reporting bugs, include the surrounding context and if possible the IR of the erroring function.
- Modify
rem
checks to only warn once during the JVM's lifetime.- To manually disable the warning entirely, pass
-Daoc.warnOnNegativeRemainder=false
to the JVM.
- To manually disable the warning entirely, pass
- Add Iterable/Sequence/Array summation overflow checks
- This will replace
sum
andsumOf
calls with inlined alternatives. sumBy
(deprecated in Kotlin) is mapped tosumOf
before being replaced. If usingsumBy
, the plugin will raise a warning.
- This will replace
- Actually fix memoization on high-arity functions (varargs are hard)
- Modify destructuring errors to be a little less hard to read
- Fix memoization on extension functions and high-arity functions
- Add runtime errors for collection destructuring matching an incorrect number of elements
- Currently only checks variable assignment, not lambda parameter destructuring
- Can be skipped on any function or child of a function or class with
@SkipDestructuringChecks
- Move
@SkipOverflowUnderflowChecks
fromsschr15.aoc.annotations
tocom.sschr15.aoc.annotations
- Ensure only operations with overflow checks are compared against (Fixes a bug where custom overloads would be incorrectly matched)
- Move annotations from
sschr15.aoc.annotations
tocom.sschr15.aoc.annotations
- Convert all annotations to source retention
- Initial Release
- Add
@Memoize
annotation- Memoizes any annotated function using a
Map
based on function inputs
- Memoizes any annotated function using a
- Add integer and long overflow checks
- Wraps all
+
,-
and*
operators;++
and--
postfix operators;-
unary minus; and absolute value checks, throwing an error if any cause an overflow - Wraps all
%
operators, raising a warning if the first operand is negative - Ensures conversions are within the range that can be exactly
represented by the given type, erroring when there is not enough precision
- Errors if
toFloat
is attempted outside the range -16,777,216 to 16,777,216 - Errors if
toDouble
is attempted outside the range -9,007,199,254,740,992 to 9,007,199,254,740,992 - Errors if
toInt
on aLong
is attempted outside the range -2,147,483,648 to 2,147,483,647
- Errors if
- Add
@SkipOverflowUnderflowCheck
annotation to avoid doing these checks
- Wraps all
- Add
@ExportIr
annotation- During compilation, sends compiler warnings containing the IR of the annotated functions