src/jdk/nashorn/internal/codegen/CodeGenerator.java
Print this page
*** 1449,1459 ****
final String key = propertyNode.getKeyName();
final Symbol symbol = value == null ? null : propertyNode.getKey().getSymbol();
if (value == null) {
hasGettersSetters = true;
! } else if (key.equals(ScriptObject.PROTO_PROPERTY_NAME)) {
protoNode = value;
continue;
}
keys.add(key);
--- 1449,1462 ----
final String key = propertyNode.getKeyName();
final Symbol symbol = value == null ? null : propertyNode.getKey().getSymbol();
if (value == null) {
hasGettersSetters = true;
! } else if (propertyNode.getKey() instanceof IdentNode &&
! key.equals(ScriptObject.PROTO_PROPERTY_NAME)) {
! // ES6 draft compliant __proto__ inside object literal
! // Identifier key and name is __proto__
protoNode = value;
continue;
}
keys.add(key);