Open jmeaster30 opened 9 months ago
Well I made alloc array create an array and put it directly on the stack. alloc with any other type currently still makes the variable in the context
I think alloc making the variable on the stack makes the most sense but I may want to change the command to 'new' instead cause 'alloc' feels like it specifically messes with memory
Also does this conflict with the 'push' instruction? I think some serious consideration would have to be put into that as well. Something to note is Java bytecode doesn't really have a "push constant" instruction, they have a "load constant from constant pool" and a couple "load immediate X" but it goes from 0 to 5
Also java has a "newarray" and a "new" bytecode instruction which allocates memory in the VM's memory and puts the reference on the stack. However, I kind of want to have as much stuff on the stack as possible and generate code that can reference things from memory. Then we can probably do more with optimizing stuff but I also have no idea what I am talking about it is just a gut thing
When creating an array or layout there is no syntax for creating one directly on the stack. #43
This makes it so we have to do something like:
to get the array onto the stack. I wish there was just one instruction like:
or
or
Similar things for layouts
I kind of like alloc being the instruction and having store create a variable if a variable doesn't exist but I also like store requiring that the variable already exist