// ### to simplify and speed up we should expand the relevant parts here (clauses 6,7,9,10,12,13)
PropertyDescriptor desc = PropertyDescriptor::fromValue(value);
- desc.configurable = PropertyDescriptor::Undefined;
- desc.enumberable = PropertyDescriptor::Undefined;
- desc.writable = PropertyDescriptor::Undefined;
__defineOwnProperty__(ctx, name, &desc, throwException);
return;
}
PropertyDescriptor *p = members->insert(name);
*p = PropertyDescriptor::fromValue(value);
+ p->configurable = PropertyDescriptor::Set;
+ p->enumberable = PropertyDescriptor::Set;
+ p->writable = PropertyDescriptor::Set;
}
reject:
}
p = current->members->_properties[tableIndex];
// ### check that it's not a repeated attribute
- if (p /*&& !(p->attributes & DontEnumAttribute)*/)
+ if (p && p->descriptor.isEnumerable())
return p->name;
}
}
if (__qmljs_string_equal(var, name)) {
*to_fill = PropertyDescriptor::fromValue(context->locals[i]);
to_fill->writable = PropertyDescriptor::Set;
+ to_fill->enumberable = PropertyDescriptor::Set;
return to_fill;
}
}
if (__qmljs_string_equal(formal, name)) {
*to_fill = PropertyDescriptor::fromValue(context->arguments[i]);
to_fill->writable = PropertyDescriptor::Set;
+ to_fill->enumberable = PropertyDescriptor::Set;
return to_fill;
}
}
}
*to_fill = PropertyDescriptor::fromValue(arguments);
+ to_fill->writable = PropertyDescriptor::Unset;
+ to_fill->enumberable = PropertyDescriptor::Unset;
return to_fill;
}
}
const quint32 i = Value::fromString(name).toUInt32(ctx);
if (i < context->argumentCount) {
*to_fill = PropertyDescriptor::fromValue(context->arguments[i]);
+ to_fill->writable = PropertyDescriptor::Unset;
+ to_fill->enumberable = PropertyDescriptor::Unset;
return to_fill;
}
}
PropertyDescriptor pd;
pd.value = v;
pd.type = Data;
- pd.writable = Set;
- pd.enumberable = Set;
- pd.configurable = Set;
+ pd.writable = Undefined;
+ pd.enumberable = Undefined;
+ pd.configurable = Undefined;
return pd;
}
static inline PropertyDescriptor fromAccessor(Object *getter, Object *setter) {
pd.set = setter;
pd.type = Accessor;
pd.writable = Undefined;
- pd.enumberable = Set;
- pd.configurable = Set;
+ pd.enumberable = Undefined;
+ pd.configurable = Undefined;
return pd;
}