RFR: 8069338: Implement sharedScopeCall for optimistic types
Hannes Wallnöfer
hannes.wallnoefer at oracle.com
Wed Dec 6 17:43:57 UTC 2017
Please review:
Bug: https://bugs.openjdk.java.net/browse/JDK-8069338
Webrev: http://cr.openjdk.java.net/~hannesw/8069338/webrev.00/
This implements shared scope calls for optimistic vars/calls. I followed Attila’s blueprint in the bug description to the last detail - thanks for figuring it all out.
Some adjustments and cleanups I did along the way:
- Originally shared scope calls were designed to support slow scope vars (with/eval). However, that feature was disabled later on. I refactored the code to make it clear that we only do shared scope calls for fast scope operations.
- I unified the threshold for all shared scope operations to 5. I don’t think there is a reason for different thresholds for different operations. I did some testing, using 5 as threshold appeared to be a sensible value.
Running all of the octane benchmark I see a decrease in created callsites (200 000 to 178 000) and a slight decrease in callsite invalidations.
Hannes
More information about the nashorn-dev
mailing list