Closed gbrail closed 1 month ago
Unless there are no objections, I'd like to merge this. Just so that you all understand the scope:
Downsides:
Upsides:
No objections here!
Wrt to the downsides: dunno how feasible it is, but some documentation on the bytecode generation may help? Got the idea that only a few people understand how that works right now. I for one don't at all 🙂
This begins to use invokedynamic instructions in Rhino's bytecode.
It replaces the operations that call the ScriptRuntime operations for common property operations like setting and getting properties and elements, and common context operations like setting and getting variables, with invokedynamic instructions.
It also adds components that will wire up those invokedynamic instructions to the appropriate ScriptRuntime operations using the Dynalink package.
The result should be that Rhino behaves exactly the same and performs the same as well.
However, once this is implemented we can begin to create additional dynalink "linkers" that do specific things to optimize performance based on what is happening at runtime.