mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-22 10:01:50 +00:00
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:
parent
c024ad87f9
commit
5bca24da82
18 changed files with 244 additions and 125 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue