-
Enhancement
-
Resolution: Fixed
-
P3
-
None
-
b83
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8142284 | emb-9 | Hannes Wallnoefer | P3 | Resolved | Fixed | team |
JDK-8141000 | 8u91 | Hannes Wallnoefer | P3 | Resolved | Fixed | b01 |
JDK-8137027 | 8u72 | Hannes Wallnoefer | P3 | Closed | Fixed | b01 |
JDK-8147369 | emb-8u91 | Hannes Wallnoefer | P3 | Resolved | Fixed | b01 |
As shown by JDK-8133925 we want to be able to allow different instances of a constructor function to use the same allocator map as long as their prototypes have the same maps as well. This helps us keep callsites monomorphic in a couple of circumstances, such as the various non-global constructor code patterns, or scripts with global constructors being evaluated multiple times with different globals.
This means we have to keep track of what a map's expected prototype map is, and change the map if the actual prototype map differs or has been modified on any of the (prototype) objects using it. We also need to introduce a switchpoint for callsites involving shared prototype maps, as the prototype may have changed on any object not directly involved in the linking of the callsite.
Basically, we make an assumption about the JavaScript code that prototypes are usually not modified after objects have been constructed. This makes property maps a bit more like classes, allowing us to assume objects with the same property map also have prototypes with the same map.
This means we have to keep track of what a map's expected prototype map is, and change the map if the actual prototype map differs or has been modified on any of the (prototype) objects using it. We also need to introduce a switchpoint for callsites involving shared prototype maps, as the prototype may have changed on any object not directly involved in the linking of the callsite.
Basically, we make an assumption about the JavaScript code that prototypes are usually not modified after objects have been constructed. This makes property maps a bit more like classes, allowing us to assume objects with the same property map also have prototypes with the same map.
- backported by
-
JDK-8141000 Allow constructors with same prototoype map to share the allocator map
-
- Resolved
-
-
JDK-8142284 Allow constructors with same prototoype map to share the allocator map
-
- Resolved
-
-
JDK-8147369 Allow constructors with same prototoype map to share the allocator map
-
- Resolved
-
-
JDK-8137027 Allow constructors with same prototoype map to share the allocator map
-
- Closed
-