It always throws a type errors, even if we are not in strict mode. the correct behaviour here according to spec is to be a nop. The spill setters do it right. @SuppressWarnings("unused") private static void setField(final CallSiteDescriptor desc, final PropertyMap oldMap, final PropertyMap newMap, final MethodHandle setter, final Object self, final Object value) throws Throwable { final ScriptObject obj = (ScriptObject)self; final boolean isStrict = NashornCallSiteDescriptor.isStrict(desc); if (!obj.isExtensible()) { throw typeError("object.non.extensible", desc.getNameToken(2), ScriptRuntime.safeToString(obj)); } else if (obj.compareAndSetMap(oldMap, newMap)) { setter.invokeExact(self, value); } else { obj.set(desc.getNameToken(CallSiteDescriptor.NAME_OPERAND), value, isStrict); } } As this is so small, and we haven't gotten in trouble yet, I suggest postponing to 8u20
|