mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-29 10:02:14 +00:00
In 64bit, we should use only 32bit for addressing
* Object, Array, Environment record internal space should use 32bit addressing on 64bit * Rename SmallValue to EncodedValue. * Implement EncodedSmallValue for using 32bit address on 64bit * Implement special vectors for EncodedSmallValue. - we need these special vector. because when push_back or inserting the value what we want to insert can be removed by GC because the parameter type is 32bit(EncodedSmallValue). * Update GCutil for 32bit addressing on 64bit Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
This commit is contained in:
parent
f1d8535b92
commit
f82c81a5d2
56 changed files with 1573 additions and 545 deletions
|
|
@ -159,10 +159,10 @@ Value ByteCodeInterpreter::interpret(ExecutionState* state, ByteCodeBlock* byteC
|
|||
if (LIKELY(ctx->globalDeclarativeStorage()->size() == slot->m_lexicalIndexCache && globalObject->structure() == slot->m_cachedStructure)) {
|
||||
ASSERT(globalObject->m_values.data() <= slot->m_cachedAddress);
|
||||
ASSERT(slot->m_cachedAddress < (globalObject->m_values.data() + globalObject->structure()->propertyCount()));
|
||||
registerFile[code->m_registerIndex] = *((SmallValue*)slot->m_cachedAddress);
|
||||
registerFile[code->m_registerIndex] = *((ObjectPropertyValue*)slot->m_cachedAddress);
|
||||
isCacheWork = true;
|
||||
} else if (slot->m_cachedStructure == nullptr) {
|
||||
const SmallValue& val = ctx->globalDeclarativeStorage()->at(idx);
|
||||
const EncodedValueVectorElement& val = ctx->globalDeclarativeStorage()->at(idx);
|
||||
isCacheWork = true;
|
||||
if (UNLIKELY(val.isEmpty())) {
|
||||
ErrorObject::throwBuiltinError(*state, ErrorObject::ReferenceError, ctx->globalDeclarativeRecord()->at(idx).m_name.string(), false, String::emptyString, ErrorObject::Messages::IsNotInitialized);
|
||||
|
|
@ -192,7 +192,7 @@ Value ByteCodeInterpreter::interpret(ExecutionState* state, ByteCodeBlock* byteC
|
|||
if (LIKELY(ctx->globalDeclarativeStorage()->size() == slot->m_lexicalIndexCache && globalObject->structure() == slot->m_cachedStructure)) {
|
||||
ASSERT(globalObject->m_values.data() <= slot->m_cachedAddress);
|
||||
ASSERT(slot->m_cachedAddress < (globalObject->m_values.data() + globalObject->structure()->propertyCount()));
|
||||
*((SmallValue*)slot->m_cachedAddress) = registerFile[code->m_registerIndex];
|
||||
*((ObjectPropertyValue*)slot->m_cachedAddress) = registerFile[code->m_registerIndex];
|
||||
isCacheWork = true;
|
||||
} else if (slot->m_cachedStructure == nullptr) {
|
||||
isCacheWork = true;
|
||||
|
|
@ -2074,7 +2074,7 @@ NEVER_INLINE Value ByteCodeInterpreter::getGlobalVariableSlowCase(ExecutionState
|
|||
slot->m_cachedAddress = &go->m_values.data()[findResult.first];
|
||||
slot->m_cachedStructure = go->structure();
|
||||
slot->m_lexicalIndexCache = siz;
|
||||
return *((SmallValue*)slot->m_cachedAddress);
|
||||
return *((ObjectPropertyValue*)slot->m_cachedAddress);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue