mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-29 10:02:14 +00:00
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:
parent
2825008995
commit
109be415d1
22 changed files with 268 additions and 234 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue