JDK-8035948 : Redesign property listeners for shared classes
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: jdk.nashorn
  • Affected Version: 8
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2014-02-27
  • Updated: 2014-07-29
  • Resolved: 2014-03-03
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
8u20Fixed 9 b04Fixed
Related Reports
Relates :  
There are two approaches of making property listeners (used to invalidate callsites for inherited properties) work with shared classes. One is to remove them alltogether, replacing switchpoints with deep property guard that check the maps of all involved prototypes on each invocation, and the other is to move listeners from the ScriptObjects belonging to just one global to the property maps that are potentially shared between globals. 

At the same time there are areas where the current listener system can be optimized. Currently much more property listeners are created/registered than necessary (over 200.000 in one invocation of the Octane run.js script). Another detail that is currently less then optimal and won't work in a multi-global world is property map prototype history. We currently look up prototype history over 20 million times in one Octane run.js even though we know the object was never used with the original prototype and map.