-
Bug
-
Resolution: Fixed
-
P3
-
8u102, 9
-
None
-
b139
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8183881 | 8u161 | Hannes Wallnoefer | P3 | Resolved | Fixed | b01 |
JDK-8168310 | 8u152 | Hannes Wallnoefer | P3 | Resolved | Fixed | b01 |
JDK-8192724 | emb-8u161 | Hannes Wallnoefer | P3 | Resolved | Fixed | b01 |
Reported on nashorn-dev: http://mail.openjdk.java.net/pipermail/nashorn-dev/2016-September/006504.html
When optimistic conversion is triggered during initialization of an object literal, we have a mechanism to update the property map of the object as the types may (and probably will) have changed.
However, this is only done for the top-level object in a nested object initializer. There are cases where the map may have to be updated on outer objects as well, as the example code below shows. The reason is that we may have better type information during recompilation because of type evaluation, for instance.
=================================================================
var o = {
a: "LEARN_MORE",
b: "http:/some.url",
};
var m = {
x: { z: o.a },
y: o.b
};
print(m.x.z);
print(m.y);
===================================================================
Expected output:
LEARN_MORE
http:/some.url
Actual output:
LEARN_MORE
0
When optimistic conversion is triggered during initialization of an object literal, we have a mechanism to update the property map of the object as the types may (and probably will) have changed.
However, this is only done for the top-level object in a nested object initializer. There are cases where the map may have to be updated on outer objects as well, as the example code below shows. The reason is that we may have better type information during recompilation because of type evaluation, for instance.
=================================================================
var o = {
a: "LEARN_MORE",
b: "http:/some.url",
};
var m = {
x: { z: o.a },
y: o.b
};
print(m.x.z);
print(m.y);
===================================================================
Expected output:
LEARN_MORE
http:/some.url
Actual output:
LEARN_MORE
0
- backported by
-
JDK-8168310 Nested object literal property maps not reset in optimistic recompilation
-
- Resolved
-
-
JDK-8183881 Nested object literal property maps not reset in optimistic recompilation
-
- Resolved
-
-
JDK-8192724 Nested object literal property maps not reset in optimistic recompilation
-
- Resolved
-