1. remove libunwind from Makefile & source

2. disable thread function in bdwgc
3. remove m_version from ObjectStructure
4. add rawBuffer in TypedArrayObject
5. remove wrong usage of Value::toArrayIndex and Value::toIndex
6. optimize String::tryToUseAsArrayIndex, String::tryToUseAsIndex

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
This commit is contained in:
seonghyun kim 2017-02-08 21:35:03 +09:00 committed by Young-il Choi
commit 1b044658fc
19 changed files with 221 additions and 203 deletions

View file

@ -34,7 +34,12 @@ bool ArrayObject::defineOwnProperty(ExecutionState& state, const ObjectPropertyN
return true;
}
uint64_t idx = P.toValue(state).toArrayIndex(state);
uint64_t idx;
if (LIKELY(P.isUIntType())) {
idx = P.uintValue();
} else {
idx = P.string(state)->tryToUseAsArrayIndex();
}
if (idx != Value::InvalidArrayIndexValue) {
auto oldLenDesc = structure()->readProperty(state, (size_t)0);
uint32_t oldLen = getArrayLength(state);