1. implement ObjectDefineOwnPropertyOperation

2. Add errorcode in ScriptError
3. Fix array length bug
4. Fix ObjectPropertyDescriptor::ObjectPropertyDescriptor(ExecutionState& state, Object* obj)

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
This commit is contained in:
seonghyun kim 2016-12-23 22:21:22 +09:00
commit 5bca24da82
18 changed files with 244 additions and 125 deletions

View file

@ -35,7 +35,7 @@ bool ArrayObject::defineOwnProperty(ExecutionState& state, const ObjectPropertyN
uint32_t idx = P.toValue(state).toArrayIndex(state);
if (idx != Value::InvalidArrayIndexValue) {
setArrayLength(state, idx);
setArrayLength(state, idx + 1);
}
return Object::defineOwnProperty(state, P, desc);
@ -104,6 +104,9 @@ void ArrayObject::iterateArrays(ExecutionState& state, HeapObjectIteratorCallbac
void ArrayObject::convertIntoNonFastMode(ExecutionState& state)
{
if (!isFastModeArray())
return;
if (!structure()->isStructureWithFastAccess()) {
m_structure = structure()->convertToWithFastAccess(state);
}