mirror of
https://gitee.com/openharmony/arkcompiler_ets_runtime
synced 2024-10-07 16:13:49 +00:00
IC polymorphic optimization
Signed-off-by: DaiHN <daihuina1@huawei.com>
This commit is contained in:
parent
0a44a3ea85
commit
9ddc634ceb
@ -2502,6 +2502,7 @@ NO_UB_SANITIZE void EcmaInterpreter::RunInternal(JSThread *thread, ConstantPool
|
||||
JSTaggedValue secondValue = profileTypeArray->Get(slotId + 1);
|
||||
res = ICRuntimeStub::TryLoadICByValue(thread, receiver, propKey, firstValue, secondValue);
|
||||
}
|
||||
// IC miss and not enter the megamorphic state, store as polymorphic
|
||||
if (res.IsHole() && !firstValue.IsHole()) {
|
||||
res = ICRuntimeStub::LoadICByValue(thread,
|
||||
profileTypeArray,
|
||||
@ -2554,6 +2555,7 @@ NO_UB_SANITIZE void EcmaInterpreter::RunInternal(JSThread *thread, ConstantPool
|
||||
JSTaggedValue secondValue = profileTypeArray->Get(slotId + 1);
|
||||
res = ICRuntimeStub::TryStoreICByValue(thread, receiver, propKey, firstValue, secondValue, value);
|
||||
}
|
||||
// IC miss and not enter the megamorphic state, store as polymorphic
|
||||
if (res.IsHole() && !firstValue.IsHole()) {
|
||||
res = ICRuntimeStub::StoreICByValue(thread,
|
||||
profileTypeArray,
|
||||
@ -2867,6 +2869,7 @@ NO_UB_SANITIZE void EcmaInterpreter::RunInternal(JSThread *thread, ConstantPool
|
||||
JSTaggedValue secondValue = profileTypeArray->Get(slotId + 1);
|
||||
res = ICRuntimeStub::TryLoadICByName(thread, receiver, firstValue, secondValue);
|
||||
}
|
||||
// IC miss and not enter the megamorphic state, store as polymorphic
|
||||
if (res.IsHole() && !firstValue.IsHole()) {
|
||||
uint32_t stringId = READ_INST_32_1();
|
||||
JSTaggedValue propKey = constpool->GetObjectFromCache(stringId);
|
||||
@ -2922,6 +2925,7 @@ NO_UB_SANITIZE void EcmaInterpreter::RunInternal(JSThread *thread, ConstantPool
|
||||
JSTaggedValue secondValue = profileTypeArray->Get(slotId + 1);
|
||||
res = ICRuntimeStub::TryStoreICByName(thread, receiver, firstValue, secondValue, value);
|
||||
}
|
||||
// IC miss and not enter the megamorphic state, store as polymorphic
|
||||
if (res.IsHole() && !firstValue.IsHole()) {
|
||||
uint32_t stringId = READ_INST_32_1();
|
||||
JSTaggedValue propKey = constpool->GetObjectFromCache(stringId);
|
||||
|
Loading…
Reference in New Issue
Block a user