1. remove Increment, Decrement opcode

2. implement fast String buffer access
3. remove hash from AtomicStringMap
4. implement simple dtoa cache

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
This commit is contained in:
seonghyun kim 2017-01-12 21:28:24 +09:00
commit 109be415d1
22 changed files with 268 additions and 234 deletions

View file

@ -17,12 +17,12 @@ StringObject::StringObject(ExecutionState& state, String* value)
ObjectGetResult StringObject::getOwnProperty(ExecutionState& state, const ObjectPropertyName& P) ESCARGOT_OBJECT_SUBCLASS_MUST_REDEFINE
{
Value::ValueIndex idx;
if (LIKELY(P.isUIntType())) {
if (P.isUIntType()) {
idx = P.uintValue();
} else {
idx = P.toValue(state).toIndex(state);
idx = P.string(state)->tryToUseAsIndex();
}
if (LIKELY(idx != Value::InvalidIndexValue)) {
if (idx != Value::InvalidIndexValue) {
size_t strLen = m_primitiveValue->length();
if (LIKELY(idx < strLen)) {
return ObjectGetResult(Value(String::fromCharCode(m_primitiveValue->charAt(idx))), false, true, false);