-
Bug
-
Resolution: Fixed
-
P4
-
None
-
b70
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8136293 | emb-9 | Sundararajan Athijegannathan | P4 | Resolved | Fixed | team |
JDK-8131008 | 8u65 | Sundararajan Athijegannathan | P4 | Resolved | Fixed | b05 |
JDK-8129327 | 8u60 | Sundararajan Athijegannathan | P4 | Resolved | Fixed | b22 |
JDK-8138554 | emb-8u65 | Unassigned | P4 | Resolved | Fixed | b05 |
JDK-8130616 | emb-8u60 | Sundararajan Athijegannathan | P4 | Resolved | Fixed | b22 |
This issue was reported via a nashorn-dev email: http://mail.openjdk.java.net/pipermail/nashorn-dev/2015-June/004784.html
--- email content duplicated here ----
Hi all,
During digging a little into the bytecode generated by Nasgen, there is a pattern of "new ArrayList(memberCount)", but that member count is 1 more that what is needed, this is not always the case, as it depends on the members.
This doesn't have functional impact, but every single byte counts
The root cause for Prototype, is that Constructor are included in the total count, but it is not added.
To give example:
NativeArrayBuffer$Prototype:
{ ArrayList list = new ArrayList(2);
list.add(AccessorProperty.create("slice", 2, "G$slice", "S$slice")); $nasgenmap$ = PropertyMap.newMap(list); }
although the list will contain a single entry, ArrayList was initialized by 2.
This also happens in the ScriptClass, e.g.:
NativeArray: { ArrayList list = new ArrayList(2);
list.add(AccessorProperty.create("length", 6, "length", "length")); $nasgenmap$ = PropertyMap.newMap(list); }
But it is fine in, e.g.:
ArrayBufferView: { ArrayList list = new ArrayList(4); list.add(AccessorProperty.create("buffer", 7, "buffer", (MethodHandle)null)); list.add(AccessorProperty.create("byteOffset", 7, "byteOffset", (MethodHandle)null)); list.add(AccessorProperty.create("byteLength", 7, "byteLength", (MethodHandle)null)); list.add(AccessorProperty.create("length", 7, "length", (MethodHandle)null)); $nasgenmap$ = PropertyMap.newMap(list); }
Thanks,Ahmed
--- email content duplicated here ----
Hi all,
During digging a little into the bytecode generated by Nasgen, there is a pattern of "new ArrayList(memberCount)", but that member count is 1 more that what is needed, this is not always the case, as it depends on the members.
This doesn't have functional impact, but every single byte counts
The root cause for Prototype, is that Constructor are included in the total count, but it is not added.
To give example:
NativeArrayBuffer$Prototype:
{ ArrayList list = new ArrayList(2);
list.add(AccessorProperty.create("slice", 2, "G$slice", "S$slice")); $nasgenmap$ = PropertyMap.newMap(list); }
although the list will contain a single entry, ArrayList was initialized by 2.
This also happens in the ScriptClass, e.g.:
NativeArray: { ArrayList list = new ArrayList(2);
list.add(AccessorProperty.create("length", 6, "length", "length")); $nasgenmap$ = PropertyMap.newMap(list); }
But it is fine in, e.g.:
ArrayBufferView: { ArrayList list = new ArrayList(4); list.add(AccessorProperty.create("buffer", 7, "buffer", (MethodHandle)null)); list.add(AccessorProperty.create("byteOffset", 7, "byteOffset", (MethodHandle)null)); list.add(AccessorProperty.create("byteLength", 7, "byteLength", (MethodHandle)null)); list.add(AccessorProperty.create("length", 7, "length", (MethodHandle)null)); $nasgenmap$ = PropertyMap.newMap(list); }
Thanks,Ahmed
- backported by
-
JDK-8129327 nasgen prototype, instance member count calculation is wrong
-
- Resolved
-
-
JDK-8130616 nasgen prototype, instance member count calculation is wrong
-
- Resolved
-
-
JDK-8131008 nasgen prototype, instance member count calculation is wrong
-
- Resolved
-
-
JDK-8136293 nasgen prototype, instance member count calculation is wrong
-
- Resolved
-
-
JDK-8138554 nasgen prototype, instance member count calculation is wrong
-
- Resolved
-