I'm not sure if this is the right channel to post ...
# intellij
k
I'm not sure if this is the right channel to post this but it might be the best one that gets traffic (there is #compiler but it doesn't appear to be used much) I was recently looking into how default parameters are implemented and was curious to see what happens if we have more parameters than a single
int
bitmask can store. I like that the compiler just adds more `int`s instead of using something heavier weight (like arrays or
BitSet
). But as I kept playing around I noticed that the compiler will generate bytecode that the JVM will not load. The easiest example is a function with more than 255 parameters (illegal by https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.11). Is there a valid reason for generating illegal bytecode. Or is the bytecode itself not illegal, it's just invalid?
d
Your best bet for this kind of question is probably #kontributors especially if you have a test case where the generated class file is invalid in some way. (that’s the channel where they coordinate open source contributions to kotlinc)
k
Thanks. I will take it there.