Open translatenix opened 1 week ago
I am not sure we want to do this. This makes it hard to upgrade the collections library, and I'm not sure how much of a performance gain we get out of this.
and are easy to forget about
Thankfully, our CI builds (on main) will catch these errors if they are forgotten.
Curious about @holzensp and @stackoverflow's thoughts
Motivation: Package org.graalvm.collections is used throughout the Pkl codebase. It is most heavily used in the Truffle interpreter, which requires putting most collection methods behind @TruffleBoundary. At the moment, this is done by wrapping collection methods with static methods declared in classes EconomicMaps and EconomicSets. However, static wrapper methods are inconvenient to use, decrease code readability, add some overhead, and are easy to forget about.
Changes:
@TruffleBoundary
@Nullable
annotationsResult: Cleaner, safer, and more efficient code.