b9org / b9

An educational JS virtual machine based on Eclipse OMR
http://www.base9.xyz
Apache License 2.0
45 stars 24 forks source link

Handle locals and params differently in the JIT #207

Closed rwy7 closed 6 years ago

rwy7 commented 6 years ago

Because we were too lazy to distinguish between locals and params in the compiler, we had to move locals off the operand stack, and into JIT locals, when PassParam is enabled. Since splitting the accessor opcode into a param and a local code, it's now trivial to tell what we're accessing. Now, this PR always defines JIT locals, independently of PP. In the future, we may want to move this functionality out to the VM state model.

Signed-off-by: Robert Young rwy0717@gmail.com