groostav
07/11/2020, 10:50 PM... double1, double2, double3, arrayRefwhere double1..3 are primative double types, and arrayRef is a DoubleArray. I want to put these doubles into the array.
DASTORE
expects
arrayRef, index, value.Problem is, i cant swap double3 and arrayRef. double3 is a category2, and arrayRef is a category 1. There is no DUP bytecode for this swap where the stack has got a category 1 type on top, and a category 2 type below. kotlinc (and javac) are both smart enough to know the array will need to be created before pushing these values to the stack, so they push their array on the stack and then pus the values to store into that array on stack. Smart. Can i really not do this without a local variable? Am I missing something?
groostav
07/11/2020, 11:21 PM