add runtime stat

Signed-off-by: wupengyong <wupengyong@huawei.com>
Change-Id: Id40e77ef79c6dd1882d0f7c2c68f7c0fba402333
This commit is contained in:
wupengyong 2021-09-16 11:25:47 +08:00
parent 991c3ea9f9
commit 52a2b0f777
5 changed files with 164 additions and 8 deletions

View File

@ -40,6 +40,7 @@ namespace panda::ecmascript {
JSTaggedValue ICRuntimeStub::LoadGlobalICByName(JSThread *thread, ProfileTypeInfo *profileTypeInfo, JSTaggedValue ICRuntimeStub::LoadGlobalICByName(JSThread *thread, ProfileTypeInfo *profileTypeInfo,
JSTaggedValue globalValue, JSTaggedValue key, uint32_t slotId) JSTaggedValue globalValue, JSTaggedValue key, uint32_t slotId)
{ {
INTERPRETER_TRACE(thread, LoadGlobalICByName);
JSTaggedValue handler = profileTypeInfo->Get(slotId); JSTaggedValue handler = profileTypeInfo->Get(slotId);
if (handler.IsHeapObject()) { if (handler.IsHeapObject()) {
auto result = LoadGlobal(handler); auto result = LoadGlobal(handler);
@ -61,6 +62,7 @@ JSTaggedValue ICRuntimeStub::StoreGlobalICByName(JSThread *thread, ProfileTypeIn
JSTaggedValue globalValue, JSTaggedValue key, JSTaggedValue globalValue, JSTaggedValue key,
JSTaggedValue value, uint32_t slotId) JSTaggedValue value, uint32_t slotId)
{ {
INTERPRETER_TRACE(thread, StoreGlobalICByName);
JSTaggedValue handler = profileTypeInfo->Get(slotId); JSTaggedValue handler = profileTypeInfo->Get(slotId);
if (handler.IsHeapObject()) { if (handler.IsHeapObject()) {
auto result = StoreGlobal(thread, value, handler); auto result = StoreGlobal(thread, value, handler);
@ -232,6 +234,7 @@ ARK_INLINE JSTaggedValue ICRuntimeStub::StoreICWithHandler(JSThread *thread, JST
JSTaggedValue holder, JSTaggedValue holder,
JSTaggedValue value, JSTaggedValue handler) JSTaggedValue value, JSTaggedValue handler)
{ {
INTERPRETER_TRACE(thread, StoreICWithHandler);
if (handler.IsInt()) { if (handler.IsInt()) {
auto handlerInfo = static_cast<uint32_t>(handler.GetInt()); auto handlerInfo = static_cast<uint32_t>(handler.GetInt());
if (HandlerBase::IsField(handlerInfo)) { if (HandlerBase::IsField(handlerInfo)) {
@ -258,6 +261,7 @@ ARK_INLINE JSTaggedValue ICRuntimeStub::StoreICWithHandler(JSThread *thread, JST
JSTaggedValue ICRuntimeStub::StorePrototype(JSThread *thread, JSTaggedValue receiver, JSTaggedValue ICRuntimeStub::StorePrototype(JSThread *thread, JSTaggedValue receiver,
JSTaggedValue value, JSTaggedValue handler) JSTaggedValue value, JSTaggedValue handler)
{ {
INTERPRETER_TRACE(thread, StorePrototype);
ASSERT(handler.IsPrototypeHandler()); ASSERT(handler.IsPrototypeHandler());
PrototypeHandler *prototypeHandler = PrototypeHandler::Cast(handler.GetTaggedObject()); PrototypeHandler *prototypeHandler = PrototypeHandler::Cast(handler.GetTaggedObject());
auto cellValue = prototypeHandler->GetProtoCell(); auto cellValue = prototypeHandler->GetProtoCell();
@ -274,6 +278,7 @@ JSTaggedValue ICRuntimeStub::StorePrototype(JSThread *thread, JSTaggedValue rece
void ICRuntimeStub::StoreWithTransition(JSThread *thread, JSObject *receiver, JSTaggedValue value, void ICRuntimeStub::StoreWithTransition(JSThread *thread, JSObject *receiver, JSTaggedValue value,
JSTaggedValue handler) JSTaggedValue handler)
{ {
INTERPRETER_TRACE(thread, StoreWithTransition);
TransitionHandler *transitionHandler = TransitionHandler::Cast(handler.GetTaggedObject()); TransitionHandler *transitionHandler = TransitionHandler::Cast(handler.GetTaggedObject());
JSHClass *newHClass = JSHClass::Cast(transitionHandler->GetTransitionHClass().GetTaggedObject()); JSHClass *newHClass = JSHClass::Cast(transitionHandler->GetTransitionHClass().GetTaggedObject());
receiver->SetClass(newHClass); receiver->SetClass(newHClass);
@ -309,6 +314,7 @@ void ICRuntimeStub::StoreWithTransition(JSThread *thread, JSObject *receiver, JS
ARK_INLINE void ICRuntimeStub::StoreField(JSThread *thread, JSObject *receiver, JSTaggedValue value, uint32_t handler) ARK_INLINE void ICRuntimeStub::StoreField(JSThread *thread, JSObject *receiver, JSTaggedValue value, uint32_t handler)
{ {
INTERPRETER_TRACE(thread, StoreField);
int index = HandlerBase::GetOffset(handler); int index = HandlerBase::GetOffset(handler);
if (HandlerBase::IsInlinedProps(handler)) { if (HandlerBase::IsInlinedProps(handler)) {
SET_VALUE_WITH_BARRIER(thread, receiver, index * JSTaggedValue::TaggedTypeSize(), value); SET_VALUE_WITH_BARRIER(thread, receiver, index * JSTaggedValue::TaggedTypeSize(), value);
@ -342,6 +348,7 @@ ARK_INLINE JSTaggedValue ICRuntimeStub::LoadGlobal(JSTaggedValue handler)
ARK_INLINE JSTaggedValue ICRuntimeStub::StoreGlobal(JSThread *thread, JSTaggedValue value, JSTaggedValue handler) ARK_INLINE JSTaggedValue ICRuntimeStub::StoreGlobal(JSThread *thread, JSTaggedValue value, JSTaggedValue handler)
{ {
INTERPRETER_TRACE(thread, StoreGlobal);
ASSERT(handler.IsPropertyBox()); ASSERT(handler.IsPropertyBox());
PropertyBox *cell = PropertyBox::Cast(handler.GetHeapObject()); PropertyBox *cell = PropertyBox::Cast(handler.GetHeapObject());
if (cell->IsInvalid()) { if (cell->IsInvalid()) {
@ -354,6 +361,7 @@ ARK_INLINE JSTaggedValue ICRuntimeStub::StoreGlobal(JSThread *thread, JSTaggedVa
JSTaggedValue ICRuntimeStub::LoadPrototype(JSThread *thread, JSTaggedValue receiver, JSTaggedValue handler) JSTaggedValue ICRuntimeStub::LoadPrototype(JSThread *thread, JSTaggedValue receiver, JSTaggedValue handler)
{ {
INTERPRETER_TRACE(thread, LoadPrototype);
ASSERT(handler.IsPrototypeHandler()); ASSERT(handler.IsPrototypeHandler());
PrototypeHandler *prototypeHandler = PrototypeHandler::Cast(handler.GetTaggedObject()); PrototypeHandler *prototypeHandler = PrototypeHandler::Cast(handler.GetTaggedObject());
auto cellValue = prototypeHandler->GetProtoCell(); auto cellValue = prototypeHandler->GetProtoCell();
@ -370,6 +378,7 @@ JSTaggedValue ICRuntimeStub::LoadPrototype(JSThread *thread, JSTaggedValue recei
ARK_INLINE JSTaggedValue ICRuntimeStub::LoadICWithHandler(JSThread *thread, JSTaggedValue receiver, ARK_INLINE JSTaggedValue ICRuntimeStub::LoadICWithHandler(JSThread *thread, JSTaggedValue receiver,
JSTaggedValue holder, JSTaggedValue handler) JSTaggedValue holder, JSTaggedValue handler)
{ {
INTERPRETER_TRACE(thread, LoadICWithHandler);
if (LIKELY(handler.IsInt())) { if (LIKELY(handler.IsInt())) {
auto handlerInfo = static_cast<uint32_t>(handler.GetInt()); auto handlerInfo = static_cast<uint32_t>(handler.GetInt());
if (LIKELY(HandlerBase::IsField(handlerInfo))) { if (LIKELY(HandlerBase::IsField(handlerInfo))) {
@ -410,6 +419,7 @@ ARK_INLINE JSTaggedValue ICRuntimeStub::LoadElement(JSObject *receiver, JSTagged
JSTaggedValue ICRuntimeStub::StoreElement(JSThread *thread, JSObject *receiver, JSTaggedValue key, JSTaggedValue ICRuntimeStub::StoreElement(JSThread *thread, JSObject *receiver, JSTaggedValue key,
JSTaggedValue value, uint32_t handlerInfo) JSTaggedValue value, uint32_t handlerInfo)
{ {
INTERPRETER_TRACE(thread, StoreElement);
ASSERT(HandlerBase::IsElement(handlerInfo)); ASSERT(HandlerBase::IsElement(handlerInfo));
auto index = TryToElementsIndex(key); auto index = TryToElementsIndex(key);
if (index < 0) { if (index < 0) {

View File

@ -184,6 +184,7 @@ int32_t FastRuntimeStub::TryToElementsIndex(JSTaggedValue key)
JSTaggedValue FastRuntimeStub::CallGetter(JSThread *thread, JSTaggedValue receiver, JSTaggedValue holder, JSTaggedValue FastRuntimeStub::CallGetter(JSThread *thread, JSTaggedValue receiver, JSTaggedValue holder,
JSTaggedValue value) JSTaggedValue value)
{ {
INTERPRETER_TRACE(thread, CallGetter);
// Accessor // Accessor
[[maybe_unused]] EcmaHandleScope handleScope(thread); [[maybe_unused]] EcmaHandleScope handleScope(thread);
AccessorData *accessor = AccessorData::Cast(value.GetTaggedObject()); AccessorData *accessor = AccessorData::Cast(value.GetTaggedObject());
@ -198,6 +199,7 @@ JSTaggedValue FastRuntimeStub::CallGetter(JSThread *thread, JSTaggedValue receiv
JSTaggedValue FastRuntimeStub::CallSetter(JSThread *thread, JSTaggedValue receiver, JSTaggedValue value, JSTaggedValue FastRuntimeStub::CallSetter(JSThread *thread, JSTaggedValue receiver, JSTaggedValue value,
JSTaggedValue accessorValue) JSTaggedValue accessorValue)
{ {
INTERPRETER_TRACE(thread, CallSetter);
// Accessor // Accessor
[[maybe_unused]] EcmaHandleScope handleScope(thread); [[maybe_unused]] EcmaHandleScope handleScope(thread);
JSHandle<JSTaggedValue> objHandle(thread, receiver); JSHandle<JSTaggedValue> objHandle(thread, receiver);
@ -223,6 +225,7 @@ bool FastRuntimeStub::ShouldCallSetter(JSTaggedValue receiver, JSTaggedValue hol
JSTaggedValue FastRuntimeStub::AddPropertyByName(JSThread *thread, JSTaggedValue receiver, JSTaggedValue key, JSTaggedValue FastRuntimeStub::AddPropertyByName(JSThread *thread, JSTaggedValue receiver, JSTaggedValue key,
JSTaggedValue value) JSTaggedValue value)
{ {
INTERPRETER_TRACE(thread, AddPropertyByName);
[[maybe_unused]] EcmaHandleScope handleScope(thread); [[maybe_unused]] EcmaHandleScope handleScope(thread);
if (UNLIKELY(!JSObject::Cast(receiver)->IsExtensible())) { if (UNLIKELY(!JSObject::Cast(receiver)->IsExtensible())) {
THROW_TYPE_ERROR_AND_RETURN(thread, "Cannot add property in prevent extensions ", JSTaggedValue::Exception()); THROW_TYPE_ERROR_AND_RETURN(thread, "Cannot add property in prevent extensions ", JSTaggedValue::Exception());
@ -292,6 +295,7 @@ JSTaggedValue FastRuntimeStub::AddPropertyByName(JSThread *thread, JSTaggedValue
JSTaggedValue FastRuntimeStub::AddPropertyByIndex(JSThread *thread, JSTaggedValue receiver, uint32_t index, JSTaggedValue FastRuntimeStub::AddPropertyByIndex(JSThread *thread, JSTaggedValue receiver, uint32_t index,
JSTaggedValue value) JSTaggedValue value)
{ {
INTERPRETER_TRACE(thread, AddPropertyByIndex);
[[maybe_unused]] EcmaHandleScope handleScope(thread); [[maybe_unused]] EcmaHandleScope handleScope(thread);
if (UNLIKELY(!JSObject::Cast(receiver)->IsExtensible())) { if (UNLIKELY(!JSObject::Cast(receiver)->IsExtensible())) {
THROW_TYPE_ERROR_AND_RETURN(thread, "Cannot add property in prevent extensions ", JSTaggedValue::Exception()); THROW_TYPE_ERROR_AND_RETURN(thread, "Cannot add property in prevent extensions ", JSTaggedValue::Exception());
@ -305,6 +309,7 @@ JSTaggedValue FastRuntimeStub::AddPropertyByIndex(JSThread *thread, JSTaggedValu
template<bool UseOwn> template<bool UseOwn>
JSTaggedValue FastRuntimeStub::GetPropertyByIndex(JSThread *thread, JSTaggedValue receiver, uint32_t index) JSTaggedValue FastRuntimeStub::GetPropertyByIndex(JSThread *thread, JSTaggedValue receiver, uint32_t index)
{ {
INTERPRETER_TRACE(thread, GetPropertyByIndex);
[[maybe_unused]] EcmaHandleScope handleScope(thread); [[maybe_unused]] EcmaHandleScope handleScope(thread);
JSTaggedValue holder = receiver; JSTaggedValue holder = receiver;
do { do {
@ -351,6 +356,7 @@ JSTaggedValue FastRuntimeStub::GetPropertyByIndex(JSThread *thread, JSTaggedValu
template<bool UseOwn> template<bool UseOwn>
JSTaggedValue FastRuntimeStub::GetPropertyByValue(JSThread *thread, JSTaggedValue receiver, JSTaggedValue key) JSTaggedValue FastRuntimeStub::GetPropertyByValue(JSThread *thread, JSTaggedValue receiver, JSTaggedValue key)
{ {
INTERPRETER_TRACE(thread, GetPropertyByValue);
if (UNLIKELY(!key.IsNumber() && !key.IsStringOrSymbol())) { if (UNLIKELY(!key.IsNumber() && !key.IsStringOrSymbol())) {
return JSTaggedValue::Hole(); return JSTaggedValue::Hole();
} }
@ -432,6 +438,7 @@ template<bool UseOwn>
JSTaggedValue FastRuntimeStub::SetPropertyByName(JSThread *thread, JSTaggedValue receiver, JSTaggedValue key, JSTaggedValue FastRuntimeStub::SetPropertyByName(JSThread *thread, JSTaggedValue receiver, JSTaggedValue key,
JSTaggedValue value) JSTaggedValue value)
{ {
INTERPRETER_TRACE(thread, SetPropertyByName);
// property // property
JSTaggedValue holder = receiver; JSTaggedValue holder = receiver;
do { do {
@ -504,6 +511,7 @@ template<bool UseOwn>
JSTaggedValue FastRuntimeStub::SetPropertyByIndex(JSThread *thread, JSTaggedValue receiver, uint32_t index, JSTaggedValue FastRuntimeStub::SetPropertyByIndex(JSThread *thread, JSTaggedValue receiver, uint32_t index,
JSTaggedValue value) JSTaggedValue value)
{ {
INTERPRETER_TRACE(thread, SetPropertyByIndex);
JSTaggedValue holder = receiver; JSTaggedValue holder = receiver;
do { do {
auto *hclass = holder.GetTaggedObject()->GetClass(); auto *hclass = holder.GetTaggedObject()->GetClass();
@ -539,6 +547,7 @@ template<bool UseOwn>
JSTaggedValue FastRuntimeStub::SetPropertyByValue(JSThread *thread, JSTaggedValue receiver, JSTaggedValue key, JSTaggedValue FastRuntimeStub::SetPropertyByValue(JSThread *thread, JSTaggedValue receiver, JSTaggedValue key,
JSTaggedValue value) JSTaggedValue value)
{ {
INTERPRETER_TRACE(thread, SetPropertyByValue);
if (UNLIKELY(!key.IsNumber() && !key.IsStringOrSymbol())) { if (UNLIKELY(!key.IsNumber() && !key.IsStringOrSymbol())) {
return JSTaggedValue::Hole(); return JSTaggedValue::Hole();
} }
@ -579,6 +588,7 @@ JSTaggedValue FastRuntimeStub::GetGlobalOwnProperty(JSTaggedValue receiver, JSTa
JSTaggedValue FastRuntimeStub::FastTypeOf(JSThread *thread, JSTaggedValue obj) JSTaggedValue FastRuntimeStub::FastTypeOf(JSThread *thread, JSTaggedValue obj)
{ {
INTERPRETER_TRACE(thread, FastTypeOf);
const GlobalEnvConstants *globalConst = thread->GlobalConstants(); const GlobalEnvConstants *globalConst = thread->GlobalConstants();
switch (obj.GetRawData()) { switch (obj.GetRawData()) {
case JSTaggedValue::VALUE_TRUE: case JSTaggedValue::VALUE_TRUE:
@ -611,6 +621,7 @@ JSTaggedValue FastRuntimeStub::FastTypeOf(JSThread *thread, JSTaggedValue obj)
bool FastRuntimeStub::FastSetPropertyByIndex(JSThread *thread, JSTaggedValue receiver, uint32_t index, bool FastRuntimeStub::FastSetPropertyByIndex(JSThread *thread, JSTaggedValue receiver, uint32_t index,
JSTaggedValue value) JSTaggedValue value)
{ {
INTERPRETER_TRACE(thread, FastSetPropertyByIndex);
JSTaggedValue result = FastRuntimeStub::SetPropertyByIndex(thread, receiver, index, value); JSTaggedValue result = FastRuntimeStub::SetPropertyByIndex(thread, receiver, index, value);
if (!result.IsHole()) { if (!result.IsHole()) {
return result != JSTaggedValue::Exception(); return result != JSTaggedValue::Exception();
@ -622,6 +633,7 @@ bool FastRuntimeStub::FastSetPropertyByIndex(JSThread *thread, JSTaggedValue rec
bool FastRuntimeStub::FastSetPropertyByValue(JSThread *thread, JSTaggedValue receiver, JSTaggedValue key, bool FastRuntimeStub::FastSetPropertyByValue(JSThread *thread, JSTaggedValue receiver, JSTaggedValue key,
JSTaggedValue value) JSTaggedValue value)
{ {
INTERPRETER_TRACE(thread, FastSetPropertyByValue);
JSTaggedValue result = FastRuntimeStub::SetPropertyByValue(thread, receiver, key, value); JSTaggedValue result = FastRuntimeStub::SetPropertyByValue(thread, receiver, key, value);
if (!result.IsHole()) { if (!result.IsHole()) {
return result != JSTaggedValue::Exception(); return result != JSTaggedValue::Exception();
@ -634,6 +646,7 @@ bool FastRuntimeStub::FastSetPropertyByValue(JSThread *thread, JSTaggedValue rec
// must not use for interpreter // must not use for interpreter
JSTaggedValue FastRuntimeStub::FastGetPropertyByName(JSThread *thread, JSTaggedValue receiver, JSTaggedValue key) JSTaggedValue FastRuntimeStub::FastGetPropertyByName(JSThread *thread, JSTaggedValue receiver, JSTaggedValue key)
{ {
INTERPRETER_TRACE(thread, FastGetPropertyByName);
ASSERT(key.IsStringOrSymbol()); ASSERT(key.IsStringOrSymbol());
if (key.IsString() && !EcmaString::Cast(key.GetTaggedObject())->IsInternString()) { if (key.IsString() && !EcmaString::Cast(key.GetTaggedObject())->IsInternString()) {
JSHandle<JSTaggedValue> receiverHandler(thread, receiver); JSHandle<JSTaggedValue> receiverHandler(thread, receiver);
@ -653,6 +666,7 @@ JSTaggedValue FastRuntimeStub::FastGetPropertyByName(JSThread *thread, JSTaggedV
JSTaggedValue FastRuntimeStub::FastGetPropertyByValue(JSThread *thread, JSTaggedValue receiver, JSTaggedValue key) JSTaggedValue FastRuntimeStub::FastGetPropertyByValue(JSThread *thread, JSTaggedValue receiver, JSTaggedValue key)
{ {
INTERPRETER_TRACE(thread, FastGetPropertyByValue);
JSTaggedValue result = FastRuntimeStub::GetPropertyByValue(thread, receiver, key); JSTaggedValue result = FastRuntimeStub::GetPropertyByValue(thread, receiver, key);
if (result.IsHole()) { if (result.IsHole()) {
return JSTaggedValue::GetProperty(thread, JSHandle<JSTaggedValue>(thread, receiver), return JSTaggedValue::GetProperty(thread, JSHandle<JSTaggedValue>(thread, receiver),
@ -666,6 +680,7 @@ JSTaggedValue FastRuntimeStub::FastGetPropertyByValue(JSThread *thread, JSTagged
template<bool UseHole> // UseHole is only for Array::Sort() which requires Hole order template<bool UseHole> // UseHole is only for Array::Sort() which requires Hole order
JSTaggedValue FastRuntimeStub::FastGetPropertyByIndex(JSThread *thread, JSTaggedValue receiver, uint32_t index) JSTaggedValue FastRuntimeStub::FastGetPropertyByIndex(JSThread *thread, JSTaggedValue receiver, uint32_t index)
{ {
INTERPRETER_TRACE(thread, FastGetPropertyByIndex);
JSTaggedValue result = GetPropertyByIndex(thread, receiver, index); JSTaggedValue result = GetPropertyByIndex(thread, receiver, index);
if (result.IsHole() && !UseHole) { if (result.IsHole() && !UseHole) {
return JSTaggedValue::GetProperty(thread, JSHandle<JSTaggedValue>(thread, receiver), index) return JSTaggedValue::GetProperty(thread, JSHandle<JSTaggedValue>(thread, receiver), index)
@ -677,6 +692,7 @@ JSTaggedValue FastRuntimeStub::FastGetPropertyByIndex(JSThread *thread, JSTagged
JSTaggedValue FastRuntimeStub::NewLexicalEnvDyn(JSThread *thread, ObjectFactory *factory, uint16_t numVars) JSTaggedValue FastRuntimeStub::NewLexicalEnvDyn(JSThread *thread, ObjectFactory *factory, uint16_t numVars)
{ {
INTERPRETER_TRACE(thread, NewLexicalEnvDyn);
[[maybe_unused]] EcmaHandleScope handleScope(thread); [[maybe_unused]] EcmaHandleScope handleScope(thread);
LexicalEnv *newEnv = factory->InlineNewLexicalEnv(numVars); LexicalEnv *newEnv = factory->InlineNewLexicalEnv(numVars);
if (UNLIKELY(newEnv == nullptr)) { if (UNLIKELY(newEnv == nullptr)) {
@ -736,6 +752,7 @@ JSTaggedValue FastRuntimeStub::GetElementWithArray(JSTaggedValue receiver, uint3
bool FastRuntimeStub::SetElement(JSThread *thread, JSTaggedValue receiver, uint32_t index, JSTaggedValue value, bool FastRuntimeStub::SetElement(JSThread *thread, JSTaggedValue receiver, uint32_t index, JSTaggedValue value,
bool mayThrow) bool mayThrow)
{ {
INTERPRETER_TRACE(thread, SetElement);
JSTaggedValue holder = receiver; JSTaggedValue holder = receiver;
bool onPrototype = false; bool onPrototype = false;
@ -808,6 +825,7 @@ bool FastRuntimeStub::SetElement(JSThread *thread, JSTaggedValue receiver, uint3
bool FastRuntimeStub::SetPropertyByName(JSThread *thread, JSTaggedValue receiver, JSTaggedValue key, bool FastRuntimeStub::SetPropertyByName(JSThread *thread, JSTaggedValue receiver, JSTaggedValue key,
JSTaggedValue value, bool mayThrow) JSTaggedValue value, bool mayThrow)
{ {
INTERPRETER_TRACE(thread, SetPropertyByName);
// property // property
JSTaggedValue holder = receiver; JSTaggedValue holder = receiver;
bool onPrototype = false; bool onPrototype = false;
@ -930,6 +948,7 @@ bool FastRuntimeStub::SetPropertyByName(JSThread *thread, JSTaggedValue receiver
bool FastRuntimeStub::SetGlobalOwnProperty(JSThread *thread, JSTaggedValue receiver, JSTaggedValue key, bool FastRuntimeStub::SetGlobalOwnProperty(JSThread *thread, JSTaggedValue receiver, JSTaggedValue key,
JSTaggedValue value, bool mayThrow) JSTaggedValue value, bool mayThrow)
{ {
INTERPRETER_TRACE(thread, SetGlobalOwnProperty);
uint32_t index = 0; uint32_t index = 0;
if (JSTaggedValue::ToElementIndex(key, &index)) { if (JSTaggedValue::ToElementIndex(key, &index)) {
return SetElement(thread, receiver, index, value, mayThrow); return SetElement(thread, receiver, index, value, mayThrow);
@ -1011,6 +1030,7 @@ bool FastRuntimeStub::SetGlobalOwnProperty(JSThread *thread, JSTaggedValue recei
void FastRuntimeStub::SetOwnPropertyByName(JSThread *thread, JSTaggedValue receiver, JSTaggedValue key, void FastRuntimeStub::SetOwnPropertyByName(JSThread *thread, JSTaggedValue receiver, JSTaggedValue key,
JSTaggedValue value) JSTaggedValue value)
{ {
INTERPRETER_TRACE(thread, SetOwnPropertyByName);
TaggedArray *properties = TaggedArray::Cast(JSObject::Cast(receiver)->GetProperties().GetHeapObject()); TaggedArray *properties = TaggedArray::Cast(JSObject::Cast(receiver)->GetProperties().GetHeapObject());
PropertyAttributes attr; PropertyAttributes attr;
uint32_t indexOrEntry; uint32_t indexOrEntry;
@ -1045,6 +1065,7 @@ void FastRuntimeStub::SetOwnPropertyByName(JSThread *thread, JSTaggedValue recei
// set element that is not accessor and is writable // set element that is not accessor and is writable
bool FastRuntimeStub::SetOwnElement(JSThread *thread, JSTaggedValue receiver, uint32_t index, JSTaggedValue value) bool FastRuntimeStub::SetOwnElement(JSThread *thread, JSTaggedValue receiver, uint32_t index, JSTaggedValue value)
{ {
INTERPRETER_TRACE(thread, SetOwnElement);
PropertyAttributes attr; PropertyAttributes attr;
uint32_t indexOrEntry; uint32_t indexOrEntry;
TaggedArray *elements = TaggedArray::Cast(JSObject::Cast(receiver)->GetElements().GetHeapObject()); TaggedArray *elements = TaggedArray::Cast(JSObject::Cast(receiver)->GetElements().GetHeapObject());
@ -1068,6 +1089,7 @@ bool FastRuntimeStub::SetOwnElement(JSThread *thread, JSTaggedValue receiver, ui
bool FastRuntimeStub::FastSetProperty(JSThread *thread, JSTaggedValue receiver, JSTaggedValue key, JSTaggedValue value, bool FastRuntimeStub::FastSetProperty(JSThread *thread, JSTaggedValue receiver, JSTaggedValue key, JSTaggedValue value,
bool mayThrow) bool mayThrow)
{ {
INTERPRETER_TRACE(thread, FastSetProperty);
if (receiver.IsJSObject() && !receiver.IsTypedArray() && (key.IsStringOrSymbol())) { if (receiver.IsJSObject() && !receiver.IsTypedArray() && (key.IsStringOrSymbol())) {
uint32_t index = 0; uint32_t index = 0;
if (UNLIKELY(JSTaggedValue::ToElementIndex(key, &index))) { if (UNLIKELY(JSTaggedValue::ToElementIndex(key, &index))) {
@ -1090,6 +1112,7 @@ bool FastRuntimeStub::FastSetProperty(JSThread *thread, JSTaggedValue receiver,
JSTaggedValue FastRuntimeStub::FastGetProperty(JSThread *thread, JSTaggedValue receiver, JSTaggedValue key) JSTaggedValue FastRuntimeStub::FastGetProperty(JSThread *thread, JSTaggedValue receiver, JSTaggedValue key)
{ {
INTERPRETER_TRACE(thread, FastGetProperty);
JSTaggedValue result; JSTaggedValue result;
if (receiver.IsJSObject() && !receiver.IsTypedArray() && (key.IsStringOrSymbol())) { if (receiver.IsJSObject() && !receiver.IsTypedArray() && (key.IsStringOrSymbol())) {
uint32_t index = 0; uint32_t index = 0;
@ -1123,6 +1146,7 @@ JSTaggedValue FastRuntimeStub::FastGetProperty(JSThread *thread, JSTaggedValue r
JSTaggedValue FastRuntimeStub::FindOwnProperty(JSThread *thread, JSObject *obj, TaggedArray *properties, JSTaggedValue FastRuntimeStub::FindOwnProperty(JSThread *thread, JSObject *obj, TaggedArray *properties,
JSTaggedValue key, PropertyAttributes *attr, uint32_t *indexOrEntry) JSTaggedValue key, PropertyAttributes *attr, uint32_t *indexOrEntry)
{ {
INTERPRETER_TRACE(thread, FindOwnProperty);
if (!properties->IsDictionaryMode()) { if (!properties->IsDictionaryMode()) {
JSHClass *cls = obj->GetJSHClass(); JSHClass *cls = obj->GetJSHClass();
JSTaggedValue attrs = cls->GetAttributes(); JSTaggedValue attrs = cls->GetAttributes();
@ -1194,6 +1218,7 @@ JSTaggedValue FastRuntimeStub::FindOwnElement(TaggedArray *elements, uint32_t in
JSTaggedValue FastRuntimeStub::FindOwnProperty(JSThread *thread, JSObject *obj, JSTaggedValue key) JSTaggedValue FastRuntimeStub::FindOwnProperty(JSThread *thread, JSObject *obj, JSTaggedValue key)
{ {
INTERPRETER_TRACE(thread, FindOwnProperty);
TaggedArray *array = TaggedArray::Cast(obj->GetProperties().GetHeapObject()); TaggedArray *array = TaggedArray::Cast(obj->GetProperties().GetHeapObject());
if (!array->IsDictionaryMode()) { if (!array->IsDictionaryMode()) {
JSHClass *cls = obj->GetJSHClass(); JSHClass *cls = obj->GetJSHClass();
@ -1255,6 +1280,7 @@ JSTaggedValue FastRuntimeStub::FindOwnElement(JSObject *obj, uint32_t index)
JSTaggedValue FastRuntimeStub::HasOwnProperty(JSThread *thread, JSObject *obj, JSTaggedValue key) JSTaggedValue FastRuntimeStub::HasOwnProperty(JSThread *thread, JSObject *obj, JSTaggedValue key)
{ {
INTERPRETER_TRACE(thread, HasOwnProperty);
uint32_t index = 0; uint32_t index = 0;
if (UNLIKELY(JSTaggedValue::ToElementIndex(key, &index))) { if (UNLIKELY(JSTaggedValue::ToElementIndex(key, &index))) {
return FastRuntimeStub::FindOwnElement(obj, index); return FastRuntimeStub::FindOwnElement(obj, index);

View File

@ -205,6 +205,7 @@ namespace panda::ecmascript {
JSTaggedValue EcmaInterpreter::ExecuteNative(JSThread *thread, const CallParams& params) JSTaggedValue EcmaInterpreter::ExecuteNative(JSThread *thread, const CallParams& params)
{ {
INTERPRETER_TRACE(thread, ExecuteNative);
JSTaggedType *sp = const_cast<JSTaggedType *>(thread->GetCurrentSPFrame()); JSTaggedType *sp = const_cast<JSTaggedType *>(thread->GetCurrentSPFrame());
JSMethod *methodToCall = params.callTarget->GetCallTarget(); JSMethod *methodToCall = params.callTarget->GetCallTarget();
ASSERT(methodToCall->GetNumVregs() == 0); ASSERT(methodToCall->GetNumVregs() == 0);
@ -242,6 +243,7 @@ JSTaggedValue EcmaInterpreter::ExecuteNative(JSThread *thread, const CallParams&
JSTaggedValue EcmaInterpreter::Execute(JSThread *thread, const CallParams& params) JSTaggedValue EcmaInterpreter::Execute(JSThread *thread, const CallParams& params)
{ {
INTERPRETER_TRACE(thread, Execute);
JSMethod *method = params.callTarget->GetCallTarget(); JSMethod *method = params.callTarget->GetCallTarget();
ASSERT(thread->IsEcmaInterpreter()); ASSERT(thread->IsEcmaInterpreter());
if (method->IsNative()) { if (method->IsNative()) {

View File

@ -67,6 +67,7 @@ JSTaggedValue SlowRuntimeStub::CallSpreadDyn(JSThread *thread, JSTaggedValue fun
JSTaggedValue SlowRuntimeStub::NegDyn(JSThread *thread, JSTaggedValue value) JSTaggedValue SlowRuntimeStub::NegDyn(JSThread *thread, JSTaggedValue value)
{ {
INTERPRETER_TRACE(thread, NegDyn);
[[maybe_unused]] EcmaHandleScope handleScope(thread); [[maybe_unused]] EcmaHandleScope handleScope(thread);
JSHandle<JSTaggedValue> input(thread, value); JSHandle<JSTaggedValue> input(thread, value);
@ -89,6 +90,7 @@ JSTaggedValue SlowRuntimeStub::NegDyn(JSThread *thread, JSTaggedValue value)
JSTaggedValue SlowRuntimeStub::AsyncFunctionEnter(JSThread *thread) JSTaggedValue SlowRuntimeStub::AsyncFunctionEnter(JSThread *thread)
{ {
INTERPRETER_TRACE(thread, AsyncFunctionEnter);
ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); ObjectFactory *factory = thread->GetEcmaVM()->GetFactory();
[[maybe_unused]] EcmaHandleScope handleScope(thread); [[maybe_unused]] EcmaHandleScope handleScope(thread);
// 1. create promise // 1. create promise
@ -126,6 +128,7 @@ JSTaggedValue SlowRuntimeStub::ToNumber(JSThread *thread, JSTaggedValue value)
JSTaggedValue SlowRuntimeStub::NotDyn(JSThread *thread, JSTaggedValue value) JSTaggedValue SlowRuntimeStub::NotDyn(JSThread *thread, JSTaggedValue value)
{ {
INTERPRETER_TRACE(thread, NotDyn);
[[maybe_unused]] EcmaHandleScope handleScope(thread); [[maybe_unused]] EcmaHandleScope handleScope(thread);
JSHandle<JSTaggedValue> valueHandle(thread, value); JSHandle<JSTaggedValue> valueHandle(thread, value);
int32_t number = JSTaggedValue::ToInt32(thread, valueHandle); int32_t number = JSTaggedValue::ToInt32(thread, valueHandle);
@ -135,6 +138,7 @@ JSTaggedValue SlowRuntimeStub::NotDyn(JSThread *thread, JSTaggedValue value)
JSTaggedValue SlowRuntimeStub::IncDyn(JSThread *thread, JSTaggedValue value) JSTaggedValue SlowRuntimeStub::IncDyn(JSThread *thread, JSTaggedValue value)
{ {
INTERPRETER_TRACE(thread, IncDyn);
[[maybe_unused]] EcmaHandleScope handleScope(thread); [[maybe_unused]] EcmaHandleScope handleScope(thread);
JSHandle<JSTaggedValue> valueHandle(thread, value); JSHandle<JSTaggedValue> valueHandle(thread, value);
@ -145,6 +149,7 @@ JSTaggedValue SlowRuntimeStub::IncDyn(JSThread *thread, JSTaggedValue value)
JSTaggedValue SlowRuntimeStub::DecDyn(JSThread *thread, JSTaggedValue value) JSTaggedValue SlowRuntimeStub::DecDyn(JSThread *thread, JSTaggedValue value)
{ {
INTERPRETER_TRACE(thread, DecDyn);
[[maybe_unused]] EcmaHandleScope handleScope(thread); [[maybe_unused]] EcmaHandleScope handleScope(thread);
JSHandle<JSTaggedValue> valueHandle(thread, value); JSHandle<JSTaggedValue> valueHandle(thread, value);
@ -155,6 +160,7 @@ JSTaggedValue SlowRuntimeStub::DecDyn(JSThread *thread, JSTaggedValue value)
void SlowRuntimeStub::ThrowDyn(JSThread *thread, JSTaggedValue value) void SlowRuntimeStub::ThrowDyn(JSThread *thread, JSTaggedValue value)
{ {
INTERPRETER_TRACE(thread, ThrowDyn);
[[maybe_unused]] EcmaHandleScope handleScope(thread); [[maybe_unused]] EcmaHandleScope handleScope(thread);
ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); ObjectFactory *factory = thread->GetEcmaVM()->GetFactory();
@ -165,6 +171,7 @@ void SlowRuntimeStub::ThrowDyn(JSThread *thread, JSTaggedValue value)
JSTaggedValue SlowRuntimeStub::GetPropIterator(JSThread *thread, JSTaggedValue value) JSTaggedValue SlowRuntimeStub::GetPropIterator(JSThread *thread, JSTaggedValue value)
{ {
INTERPRETER_TRACE(thread, GetPropIterator);
[[maybe_unused]] EcmaHandleScope handleScope(thread); [[maybe_unused]] EcmaHandleScope handleScope(thread);
JSHandle<JSTaggedValue> objHandle(thread, value); JSHandle<JSTaggedValue> objHandle(thread, value);
@ -175,6 +182,7 @@ JSTaggedValue SlowRuntimeStub::GetPropIterator(JSThread *thread, JSTaggedValue v
void SlowRuntimeStub::ThrowConstAssignment(JSThread *thread, JSTaggedValue value) void SlowRuntimeStub::ThrowConstAssignment(JSThread *thread, JSTaggedValue value)
{ {
INTERPRETER_TRACE(thread, ThrowConstAssignment);
[[maybe_unused]] EcmaHandleScope handleScope(thread); [[maybe_unused]] EcmaHandleScope handleScope(thread);
ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); ObjectFactory *factory = thread->GetEcmaVM()->GetFactory();
@ -194,11 +202,8 @@ JSTaggedValue SlowRuntimeStub::Add2Dyn(JSThread *thread, EcmaVM *ecma_vm, JSTagg
JSHandle<JSTaggedValue> leftValue(thread, left); JSHandle<JSTaggedValue> leftValue(thread, left);
JSHandle<JSTaggedValue> rightValue(thread, right); JSHandle<JSTaggedValue> rightValue(thread, right);
if (leftValue->IsString() && rightValue->IsString()) { if (leftValue->IsString() && rightValue->IsString()) {
JSHandle<EcmaString> stringA0 = JSTaggedValue::ToString(thread, leftValue); EcmaString *newString = EcmaString::Concat(JSHandle<EcmaString>(leftValue),
RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); JSHandle<EcmaString>(rightValue), ecma_vm);
JSHandle<EcmaString> stringA1 = JSTaggedValue::ToString(thread, rightValue);
RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread);
EcmaString *newString = EcmaString::Concat(stringA0, stringA1, ecma_vm);
return JSTaggedValue(newString); return JSTaggedValue(newString);
} }
JSHandle<JSTaggedValue> primitiveA0(thread, JSTaggedValue::ToPrimitive(thread, leftValue)); JSHandle<JSTaggedValue> primitiveA0(thread, JSTaggedValue::ToPrimitive(thread, leftValue));
@ -378,6 +383,7 @@ JSTaggedValue SlowRuntimeStub::GreaterEqDyn(JSThread *thread, JSTaggedValue left
JSTaggedValue SlowRuntimeStub::ToJSTaggedValueWithInt32(JSThread *thread, JSTaggedValue value) JSTaggedValue SlowRuntimeStub::ToJSTaggedValueWithInt32(JSThread *thread, JSTaggedValue value)
{ {
INTERPRETER_TRACE(thread, ToJSTaggedValueWithInt32);
[[maybe_unused]] EcmaHandleScope handleScope(thread); [[maybe_unused]] EcmaHandleScope handleScope(thread);
JSHandle<JSTaggedValue> valueHandle(thread, value); JSHandle<JSTaggedValue> valueHandle(thread, value);
int32_t res = JSTaggedValue::ToInt32(thread, valueHandle); int32_t res = JSTaggedValue::ToInt32(thread, valueHandle);
@ -387,6 +393,7 @@ JSTaggedValue SlowRuntimeStub::ToJSTaggedValueWithInt32(JSThread *thread, JSTagg
JSTaggedValue SlowRuntimeStub::ToJSTaggedValueWithUint32(JSThread *thread, JSTaggedValue value) JSTaggedValue SlowRuntimeStub::ToJSTaggedValueWithUint32(JSThread *thread, JSTaggedValue value)
{ {
INTERPRETER_TRACE(thread, ToJSTaggedValueWithUint32);
[[maybe_unused]] EcmaHandleScope handleScope(thread); [[maybe_unused]] EcmaHandleScope handleScope(thread);
JSHandle<JSTaggedValue> valueHandle(thread, value); JSHandle<JSTaggedValue> valueHandle(thread, value);
int32_t res = JSTaggedValue::ToUint32(thread, valueHandle); int32_t res = JSTaggedValue::ToUint32(thread, valueHandle);
@ -508,6 +515,7 @@ JSTaggedValue SlowRuntimeStub::ExpDyn(JSThread *thread, JSTaggedValue base, JSTa
JSTaggedValue SlowRuntimeStub::IsInDyn(JSThread *thread, JSTaggedValue prop, JSTaggedValue obj) JSTaggedValue SlowRuntimeStub::IsInDyn(JSThread *thread, JSTaggedValue prop, JSTaggedValue obj)
{ {
INTERPRETER_TRACE(thread, IsInDyn);
[[maybe_unused]] EcmaHandleScope handleScope(thread); [[maybe_unused]] EcmaHandleScope handleScope(thread);
JSHandle<JSTaggedValue> propHandle(thread, prop); JSHandle<JSTaggedValue> propHandle(thread, prop);
@ -524,6 +532,7 @@ JSTaggedValue SlowRuntimeStub::IsInDyn(JSThread *thread, JSTaggedValue prop, JST
JSTaggedValue SlowRuntimeStub::InstanceofDyn(JSThread *thread, JSTaggedValue obj, JSTaggedValue target) JSTaggedValue SlowRuntimeStub::InstanceofDyn(JSThread *thread, JSTaggedValue obj, JSTaggedValue target)
{ {
INTERPRETER_TRACE(thread, InstanceofDyn);
[[maybe_unused]] EcmaHandleScope handleScope(thread); [[maybe_unused]] EcmaHandleScope handleScope(thread);
JSHandle<JSTaggedValue> objHandle(thread, obj); JSHandle<JSTaggedValue> objHandle(thread, obj);
@ -673,6 +682,7 @@ JSTaggedValue SlowRuntimeStub::NewObjSpreadDyn(JSThread *thread, JSTaggedValue f
void SlowRuntimeStub::ThrowUndefinedIfHole(JSThread *thread, JSTaggedValue obj) void SlowRuntimeStub::ThrowUndefinedIfHole(JSThread *thread, JSTaggedValue obj)
{ {
INTERPRETER_TRACE(thread, ThrowUndefinedIfHole);
[[maybe_unused]] EcmaHandleScope handleScope(thread); [[maybe_unused]] EcmaHandleScope handleScope(thread);
ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); ObjectFactory *factory = thread->GetEcmaVM()->GetFactory();
@ -685,6 +695,7 @@ void SlowRuntimeStub::ThrowUndefinedIfHole(JSThread *thread, JSTaggedValue obj)
JSTaggedValue SlowRuntimeStub::ThrowIfSuperNotCorrectCall(JSThread *thread, uint16_t index, JSTaggedValue thisValue) JSTaggedValue SlowRuntimeStub::ThrowIfSuperNotCorrectCall(JSThread *thread, uint16_t index, JSTaggedValue thisValue)
{ {
INTERPRETER_TRACE(thread, ThrowIfSuperNotCorrectCall);
[[maybe_unused]] EcmaHandleScope handleScope(thread); [[maybe_unused]] EcmaHandleScope handleScope(thread);
if (index == 0 && (thisValue.IsUndefined() || thisValue.IsHole())) { if (index == 0 && (thisValue.IsUndefined() || thisValue.IsHole())) {
@ -698,6 +709,7 @@ JSTaggedValue SlowRuntimeStub::ThrowIfSuperNotCorrectCall(JSThread *thread, uint
void SlowRuntimeStub::ThrowIfNotObject(JSThread *thread) void SlowRuntimeStub::ThrowIfNotObject(JSThread *thread)
{ {
INTERPRETER_TRACE(thread, ThrowIfNotObject);
[[maybe_unused]] EcmaHandleScope handleScope(thread); [[maybe_unused]] EcmaHandleScope handleScope(thread);
THROW_TYPE_ERROR(thread, "Inner return result is not object"); THROW_TYPE_ERROR(thread, "Inner return result is not object");
@ -705,6 +717,7 @@ void SlowRuntimeStub::ThrowIfNotObject(JSThread *thread)
void SlowRuntimeStub::ThrowThrowNotExists(JSThread *thread) void SlowRuntimeStub::ThrowThrowNotExists(JSThread *thread)
{ {
INTERPRETER_TRACE(thread, ThrowThrowNotExists);
[[maybe_unused]] EcmaHandleScope handleScope(thread); [[maybe_unused]] EcmaHandleScope handleScope(thread);
THROW_TYPE_ERROR(thread, "Throw method is not defined"); THROW_TYPE_ERROR(thread, "Throw method is not defined");
@ -712,6 +725,7 @@ void SlowRuntimeStub::ThrowThrowNotExists(JSThread *thread)
void SlowRuntimeStub::ThrowPatternNonCoercible(JSThread *thread) void SlowRuntimeStub::ThrowPatternNonCoercible(JSThread *thread)
{ {
INTERPRETER_TRACE(thread, ThrowPatternNonCoercible);
[[maybe_unused]] EcmaHandleScope handleScope(thread); [[maybe_unused]] EcmaHandleScope handleScope(thread);
JSHandle<EcmaString> msg(thread->GlobalConstants()->GetHandledObjNotCoercibleString()); JSHandle<EcmaString> msg(thread->GlobalConstants()->GetHandledObjNotCoercibleString());
@ -795,6 +809,7 @@ JSTaggedValue SlowRuntimeStub::StOwnByValue(JSThread *thread, JSTaggedValue obj,
JSTaggedValue SlowRuntimeStub::CreateEmptyArray(JSThread *thread, ObjectFactory *factory, JSHandle<GlobalEnv> globalEnv) JSTaggedValue SlowRuntimeStub::CreateEmptyArray(JSThread *thread, ObjectFactory *factory, JSHandle<GlobalEnv> globalEnv)
{ {
INTERPRETER_TRACE(thread, CreateEmptyArray);
[[maybe_unused]] EcmaHandleScope handleScope(thread); [[maybe_unused]] EcmaHandleScope handleScope(thread);
JSHandle<JSFunction> builtinObj(globalEnv->GetArrayFunction()); JSHandle<JSFunction> builtinObj(globalEnv->GetArrayFunction());
@ -805,6 +820,7 @@ JSTaggedValue SlowRuntimeStub::CreateEmptyArray(JSThread *thread, ObjectFactory
JSTaggedValue SlowRuntimeStub::CreateEmptyObject(JSThread *thread, ObjectFactory *factory, JSTaggedValue SlowRuntimeStub::CreateEmptyObject(JSThread *thread, ObjectFactory *factory,
JSHandle<GlobalEnv> globalEnv) JSHandle<GlobalEnv> globalEnv)
{ {
INTERPRETER_TRACE(thread, CreateEmptyObject);
[[maybe_unused]] EcmaHandleScope handleScope(thread); [[maybe_unused]] EcmaHandleScope handleScope(thread);
JSHandle<JSFunction> builtinObj(globalEnv->GetObjectFunction()); JSHandle<JSFunction> builtinObj(globalEnv->GetObjectFunction());
@ -814,6 +830,7 @@ JSTaggedValue SlowRuntimeStub::CreateEmptyObject(JSThread *thread, ObjectFactory
JSTaggedValue SlowRuntimeStub::CreateObjectWithBuffer(JSThread *thread, ObjectFactory *factory, JSObject *literal) JSTaggedValue SlowRuntimeStub::CreateObjectWithBuffer(JSThread *thread, ObjectFactory *factory, JSObject *literal)
{ {
INTERPRETER_TRACE(thread, CreateObjectWithBuffer);
[[maybe_unused]] EcmaHandleScope handleScope(thread); [[maybe_unused]] EcmaHandleScope handleScope(thread);
JSHandle<JSObject> obj(thread, literal); JSHandle<JSObject> obj(thread, literal);
@ -826,6 +843,7 @@ JSTaggedValue SlowRuntimeStub::CreateObjectWithBuffer(JSThread *thread, ObjectFa
JSTaggedValue SlowRuntimeStub::CreateObjectHavingMethod(JSThread *thread, ObjectFactory *factory, JSObject *literal, JSTaggedValue SlowRuntimeStub::CreateObjectHavingMethod(JSThread *thread, ObjectFactory *factory, JSObject *literal,
JSTaggedValue env, ConstantPool *constpool) JSTaggedValue env, ConstantPool *constpool)
{ {
INTERPRETER_TRACE(thread, CreateObjectHavingMethod);
[[maybe_unused]] EcmaHandleScope handleScope(thread); [[maybe_unused]] EcmaHandleScope handleScope(thread);
JSHandle<JSObject> obj(thread, literal); JSHandle<JSObject> obj(thread, literal);
@ -838,6 +856,7 @@ JSTaggedValue SlowRuntimeStub::CreateObjectHavingMethod(JSThread *thread, Object
JSTaggedValue SlowRuntimeStub::SetObjectWithProto(JSThread *thread, JSTaggedValue proto, JSTaggedValue obj) JSTaggedValue SlowRuntimeStub::SetObjectWithProto(JSThread *thread, JSTaggedValue proto, JSTaggedValue obj)
{ {
INTERPRETER_TRACE(thread, SetObjectWithProto);
[[maybe_unused]] EcmaHandleScope handleScope(thread); [[maybe_unused]] EcmaHandleScope handleScope(thread);
if (!proto.IsECMAObject() && !proto.IsNull()) { if (!proto.IsECMAObject() && !proto.IsNull()) {
@ -852,6 +871,7 @@ JSTaggedValue SlowRuntimeStub::SetObjectWithProto(JSThread *thread, JSTaggedValu
JSTaggedValue SlowRuntimeStub::IterNext(JSThread *thread, JSTaggedValue iter) JSTaggedValue SlowRuntimeStub::IterNext(JSThread *thread, JSTaggedValue iter)
{ {
INTERPRETER_TRACE(thread, IterNext);
[[maybe_unused]] EcmaHandleScope handleScope(thread); [[maybe_unused]] EcmaHandleScope handleScope(thread);
JSHandle<JSTaggedValue> iterHandle(thread, iter); JSHandle<JSTaggedValue> iterHandle(thread, iter);
@ -862,6 +882,7 @@ JSTaggedValue SlowRuntimeStub::IterNext(JSThread *thread, JSTaggedValue iter)
JSTaggedValue SlowRuntimeStub::CloseIterator(JSThread *thread, JSTaggedValue iter) JSTaggedValue SlowRuntimeStub::CloseIterator(JSThread *thread, JSTaggedValue iter)
{ {
INTERPRETER_TRACE(thread, CloseIterator);
[[maybe_unused]] EcmaHandleScope handleScope(thread); [[maybe_unused]] EcmaHandleScope handleScope(thread);
ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); ObjectFactory *factory = thread->GetEcmaVM()->GetFactory();
@ -888,6 +909,7 @@ JSTaggedValue SlowRuntimeStub::CloseIterator(JSThread *thread, JSTaggedValue ite
JSTaggedValue SlowRuntimeStub::ImportModule([[maybe_unused]] JSThread *thread, JSTaggedValue SlowRuntimeStub::ImportModule([[maybe_unused]] JSThread *thread,
[[maybe_unused]] JSTaggedValue moduleName) [[maybe_unused]] JSTaggedValue moduleName)
{ {
INTERPRETER_TRACE(thread, ImportModule);
[[maybe_unused]] EcmaHandleScope scope(thread); [[maybe_unused]] EcmaHandleScope scope(thread);
JSHandle<JSTaggedValue> name(thread, moduleName); JSHandle<JSTaggedValue> name(thread, moduleName);
JSHandle<JSTaggedValue> module = thread->GetEcmaVM()->GetModuleByName(name); JSHandle<JSTaggedValue> module = thread->GetEcmaVM()->GetModuleByName(name);
@ -897,6 +919,7 @@ JSTaggedValue SlowRuntimeStub::ImportModule([[maybe_unused]] JSThread *thread,
void SlowRuntimeStub::StModuleVar([[maybe_unused]] JSThread *thread, [[maybe_unused]] JSTaggedValue exportName, void SlowRuntimeStub::StModuleVar([[maybe_unused]] JSThread *thread, [[maybe_unused]] JSTaggedValue exportName,
[[maybe_unused]] JSTaggedValue exportObj) [[maybe_unused]] JSTaggedValue exportObj)
{ {
INTERPRETER_TRACE(thread, StModuleVar);
[[maybe_unused]] EcmaHandleScope scope(thread); [[maybe_unused]] EcmaHandleScope scope(thread);
JSHandle<JSTaggedValue> name(thread, exportName); JSHandle<JSTaggedValue> name(thread, exportName);
JSHandle<JSTaggedValue> value(thread, exportObj); JSHandle<JSTaggedValue> value(thread, exportObj);
@ -905,6 +928,7 @@ void SlowRuntimeStub::StModuleVar([[maybe_unused]] JSThread *thread, [[maybe_unu
void SlowRuntimeStub::CopyModule(JSThread *thread, JSTaggedValue srcModule) void SlowRuntimeStub::CopyModule(JSThread *thread, JSTaggedValue srcModule)
{ {
INTERPRETER_TRACE(thread, CopyModule);
[[maybe_unused]] EcmaHandleScope scope(thread); [[maybe_unused]] EcmaHandleScope scope(thread);
JSHandle<JSTaggedValue> srcModuleObj(thread, srcModule); JSHandle<JSTaggedValue> srcModuleObj(thread, srcModule);
thread->GetEcmaVM()->GetModuleManager()->CopyModule(thread, srcModuleObj); thread->GetEcmaVM()->GetModuleManager()->CopyModule(thread, srcModuleObj);
@ -914,6 +938,7 @@ JSTaggedValue SlowRuntimeStub::LdModvarByName([[maybe_unused]] JSThread *thread,
[[maybe_unused]] JSTaggedValue moduleObj, [[maybe_unused]] JSTaggedValue moduleObj,
[[maybe_unused]] JSTaggedValue itemName) [[maybe_unused]] JSTaggedValue itemName)
{ {
INTERPRETER_TRACE(thread, LdModvarByName);
[[maybe_unused]] EcmaHandleScope scope(thread); [[maybe_unused]] EcmaHandleScope scope(thread);
JSHandle<JSTaggedValue> module(thread, moduleObj); JSHandle<JSTaggedValue> module(thread, moduleObj);
JSHandle<JSTaggedValue> item(thread, itemName); JSHandle<JSTaggedValue> item(thread, itemName);
@ -923,6 +948,7 @@ JSTaggedValue SlowRuntimeStub::LdModvarByName([[maybe_unused]] JSThread *thread,
JSTaggedValue SlowRuntimeStub::CreateRegExpWithLiteral(JSThread *thread, JSTaggedValue pattern, uint8_t flags) JSTaggedValue SlowRuntimeStub::CreateRegExpWithLiteral(JSThread *thread, JSTaggedValue pattern, uint8_t flags)
{ {
INTERPRETER_TRACE(thread, CreateRegExpWithLiteral);
[[maybe_unused]] EcmaHandleScope handleScope(thread); [[maybe_unused]] EcmaHandleScope handleScope(thread);
ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); ObjectFactory *factory = thread->GetEcmaVM()->GetFactory();
@ -962,6 +988,7 @@ JSTaggedValue SlowRuntimeStub::CreateRegExpWithLiteral(JSThread *thread, JSTagge
JSTaggedValue SlowRuntimeStub::CreateArrayWithBuffer(JSThread *thread, ObjectFactory *factory, JSArray *literal) JSTaggedValue SlowRuntimeStub::CreateArrayWithBuffer(JSThread *thread, ObjectFactory *factory, JSArray *literal)
{ {
INTERPRETER_TRACE(thread, CreateArrayWithBuffer);
[[maybe_unused]] EcmaHandleScope handleScope(thread); [[maybe_unused]] EcmaHandleScope handleScope(thread);
JSHandle<JSArray> array(thread, literal); JSHandle<JSArray> array(thread, literal);
@ -973,6 +1000,7 @@ JSTaggedValue SlowRuntimeStub::CreateArrayWithBuffer(JSThread *thread, ObjectFac
JSTaggedValue SlowRuntimeStub::GetTemplateObject(JSThread *thread, JSTaggedValue literal) JSTaggedValue SlowRuntimeStub::GetTemplateObject(JSThread *thread, JSTaggedValue literal)
{ {
INTERPRETER_TRACE(thread, GetTemplateObject);
[[maybe_unused]] EcmaHandleScope handleScope(thread); [[maybe_unused]] EcmaHandleScope handleScope(thread);
JSHandle<JSTaggedValue> templateLiteral(thread, literal); JSHandle<JSTaggedValue> templateLiteral(thread, literal);
@ -983,6 +1011,7 @@ JSTaggedValue SlowRuntimeStub::GetTemplateObject(JSThread *thread, JSTaggedValue
JSTaggedValue SlowRuntimeStub::GetNextPropName(JSThread *thread, JSTaggedValue iter) JSTaggedValue SlowRuntimeStub::GetNextPropName(JSThread *thread, JSTaggedValue iter)
{ {
INTERPRETER_TRACE(thread, GetNextPropName);
[[maybe_unused]] EcmaHandleScope handleScope(thread); [[maybe_unused]] EcmaHandleScope handleScope(thread);
JSHandle<JSTaggedValue> iterator(thread, iter); JSHandle<JSTaggedValue> iterator(thread, iter);
@ -995,6 +1024,7 @@ JSTaggedValue SlowRuntimeStub::GetNextPropName(JSThread *thread, JSTaggedValue i
JSTaggedValue SlowRuntimeStub::CopyDataProperties(JSThread *thread, JSTaggedValue dst, JSTaggedValue src) JSTaggedValue SlowRuntimeStub::CopyDataProperties(JSThread *thread, JSTaggedValue dst, JSTaggedValue src)
{ {
INTERPRETER_TRACE(thread, CopyDataProperties);
[[maybe_unused]] EcmaHandleScope handleScope(thread); [[maybe_unused]] EcmaHandleScope handleScope(thread);
JSHandle<JSTaggedValue> dstHandle(thread, dst); JSHandle<JSTaggedValue> dstHandle(thread, dst);
@ -1022,6 +1052,7 @@ JSTaggedValue SlowRuntimeStub::CopyDataProperties(JSThread *thread, JSTaggedValu
JSTaggedValue SlowRuntimeStub::GetIteratorNext(JSThread *thread, JSTaggedValue obj, JSTaggedValue method) JSTaggedValue SlowRuntimeStub::GetIteratorNext(JSThread *thread, JSTaggedValue obj, JSTaggedValue method)
{ {
INTERPRETER_TRACE(thread, GetIteratorNext);
[[maybe_unused]] EcmaHandleScope handleScope(thread); [[maybe_unused]] EcmaHandleScope handleScope(thread);
JSHandle<JSTaggedValue> iter(thread, obj); JSHandle<JSTaggedValue> iter(thread, obj);
@ -1039,7 +1070,7 @@ JSTaggedValue SlowRuntimeStub::GetIteratorNext(JSThread *thread, JSTaggedValue o
JSTaggedValue SlowRuntimeStub::GetUnmapedArgs(JSThread *thread, JSTaggedType *sp, uint32_t actualNumArgs, JSTaggedValue SlowRuntimeStub::GetUnmapedArgs(JSThread *thread, JSTaggedType *sp, uint32_t actualNumArgs,
uint32_t startIdx) uint32_t startIdx)
{ {
INTERPRETER_TRACE(thread, GetUnmappedArgs); INTERPRETER_TRACE(thread, GetUnmapedArgs);
[[maybe_unused]] EcmaHandleScope handleScope(thread); [[maybe_unused]] EcmaHandleScope handleScope(thread);
ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); ObjectFactory *factory = thread->GetEcmaVM()->GetFactory();
@ -1292,12 +1323,14 @@ JSTaggedValue SlowRuntimeStub::TryLdGlobalByName(JSThread *thread, JSTaggedValue
JSTaggedValue SlowRuntimeStub::TryStGlobalByName(JSThread *thread, JSTaggedValue prop) JSTaggedValue SlowRuntimeStub::TryStGlobalByName(JSThread *thread, JSTaggedValue prop)
{ {
INTERPRETER_TRACE(thread, TryStGlobalByName);
// If fast path is fail, not need slow path, just throw error. // If fast path is fail, not need slow path, just throw error.
return ThrowReferenceError(thread, prop, " is not defined"); return ThrowReferenceError(thread, prop, " is not defined");
} }
JSTaggedValue SlowRuntimeStub::LdGlobalVar(JSThread *thread, JSTaggedValue global, JSTaggedValue prop) JSTaggedValue SlowRuntimeStub::LdGlobalVar(JSThread *thread, JSTaggedValue global, JSTaggedValue prop)
{ {
INTERPRETER_TRACE(thread, LdGlobalVar);
[[maybe_unused]] EcmaHandleScope handleScope(thread); [[maybe_unused]] EcmaHandleScope handleScope(thread);
JSHandle<JSTaggedValue> objHandle(thread, global.GetTaggedObject()->GetClass()->GetPrototype()); JSHandle<JSTaggedValue> objHandle(thread, global.GetTaggedObject()->GetClass()->GetPrototype());
@ -1309,6 +1342,7 @@ JSTaggedValue SlowRuntimeStub::LdGlobalVar(JSThread *thread, JSTaggedValue globa
JSTaggedValue SlowRuntimeStub::StGlobalVar(JSThread *thread, JSTaggedValue prop, JSTaggedValue value) JSTaggedValue SlowRuntimeStub::StGlobalVar(JSThread *thread, JSTaggedValue prop, JSTaggedValue value)
{ {
INTERPRETER_TRACE(thread, StGlobalVar);
[[maybe_unused]] EcmaHandleScope handleScope(thread); [[maybe_unused]] EcmaHandleScope handleScope(thread);
JSHandle<JSTaggedValue> global(thread, thread->GetEcmaVM()->GetGlobalEnv()->GetGlobalObject()); JSHandle<JSTaggedValue> global(thread, thread->GetEcmaVM()->GetGlobalEnv()->GetGlobalObject());
@ -1322,6 +1356,7 @@ JSTaggedValue SlowRuntimeStub::StGlobalVar(JSThread *thread, JSTaggedValue prop,
JSTaggedValue SlowRuntimeStub::TryUpdateGlobalRecord(JSThread *thread, JSTaggedValue prop, JSTaggedValue value) JSTaggedValue SlowRuntimeStub::TryUpdateGlobalRecord(JSThread *thread, JSTaggedValue prop, JSTaggedValue value)
{ {
INTERPRETER_TRACE(thread, TryUpdateGlobalRecord);
[[maybe_unused]] EcmaHandleScope handleScope(thread); [[maybe_unused]] EcmaHandleScope handleScope(thread);
EcmaVM *vm = thread->GetEcmaVM(); EcmaVM *vm = thread->GetEcmaVM();
@ -1338,6 +1373,7 @@ JSTaggedValue SlowRuntimeStub::TryUpdateGlobalRecord(JSThread *thread, JSTaggedV
JSTaggedValue SlowRuntimeStub::LdGlobalRecord(JSThread *thread, JSTaggedValue key, bool *found) JSTaggedValue SlowRuntimeStub::LdGlobalRecord(JSThread *thread, JSTaggedValue key, bool *found)
{ {
INTERPRETER_TRACE(thread, LdGlobalRecord);
[[maybe_unused]] EcmaHandleScope handleScope(thread); [[maybe_unused]] EcmaHandleScope handleScope(thread);
EcmaVM *vm = thread->GetEcmaVM(); EcmaVM *vm = thread->GetEcmaVM();
@ -1353,6 +1389,7 @@ JSTaggedValue SlowRuntimeStub::LdGlobalRecord(JSThread *thread, JSTaggedValue ke
JSTaggedValue SlowRuntimeStub::StGlobalRecord(JSThread *thread, JSTaggedValue prop, JSTaggedValue value, bool isConst) JSTaggedValue SlowRuntimeStub::StGlobalRecord(JSThread *thread, JSTaggedValue prop, JSTaggedValue value, bool isConst)
{ {
INTERPRETER_TRACE(thread, StGlobalRecord);
[[maybe_unused]] EcmaHandleScope handleScope(thread); [[maybe_unused]] EcmaHandleScope handleScope(thread);
EcmaVM *vm = thread->GetEcmaVM(); EcmaVM *vm = thread->GetEcmaVM();
@ -1375,6 +1412,7 @@ JSTaggedValue SlowRuntimeStub::StGlobalRecord(JSThread *thread, JSTaggedValue pr
JSTaggedValue SlowRuntimeStub::ThrowReferenceError(JSThread *thread, JSTaggedValue prop, const char *desc) JSTaggedValue SlowRuntimeStub::ThrowReferenceError(JSThread *thread, JSTaggedValue prop, const char *desc)
{ {
INTERPRETER_TRACE(thread, ThrowReferenceError);
[[maybe_unused]] EcmaHandleScope handleScope(thread); [[maybe_unused]] EcmaHandleScope handleScope(thread);
ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); ObjectFactory *factory = thread->GetEcmaVM()->GetFactory();
JSHandle<EcmaString> propName = JSTaggedValue::ToString(thread, JSHandle<JSTaggedValue>(thread, prop)); JSHandle<EcmaString> propName = JSTaggedValue::ToString(thread, JSHandle<JSTaggedValue>(thread, prop));
@ -1388,6 +1426,7 @@ JSTaggedValue SlowRuntimeStub::ThrowReferenceError(JSThread *thread, JSTaggedVal
JSTaggedValue SlowRuntimeStub::ThrowTypeError(JSThread *thread, const char *message) JSTaggedValue SlowRuntimeStub::ThrowTypeError(JSThread *thread, const char *message)
{ {
INTERPRETER_TRACE(thread, ThrowTypeError);
[[maybe_unused]] EcmaHandleScope handleScope(thread); [[maybe_unused]] EcmaHandleScope handleScope(thread);
ASSERT_NO_ABRUPT_COMPLETION(thread); ASSERT_NO_ABRUPT_COMPLETION(thread);
THROW_TYPE_ERROR_AND_RETURN(thread, message, JSTaggedValue::Exception()); THROW_TYPE_ERROR_AND_RETURN(thread, message, JSTaggedValue::Exception());
@ -1395,6 +1434,7 @@ JSTaggedValue SlowRuntimeStub::ThrowTypeError(JSThread *thread, const char *mess
JSTaggedValue SlowRuntimeStub::ThrowSyntaxError(JSThread *thread, const char *message) JSTaggedValue SlowRuntimeStub::ThrowSyntaxError(JSThread *thread, const char *message)
{ {
INTERPRETER_TRACE(thread, ThrowSyntaxError);
[[maybe_unused]] EcmaHandleScope handleScope(thread); [[maybe_unused]] EcmaHandleScope handleScope(thread);
ASSERT_NO_ABRUPT_COMPLETION(thread); ASSERT_NO_ABRUPT_COMPLETION(thread);
THROW_SYNTAX_ERROR_AND_RETURN(thread, message, JSTaggedValue::Exception()); THROW_SYNTAX_ERROR_AND_RETURN(thread, message, JSTaggedValue::Exception());
@ -1514,6 +1554,7 @@ JSTaggedValue SlowRuntimeStub::DefinefuncDyn(JSThread *thread, JSFunction *func)
JSTaggedValue SlowRuntimeStub::NewClassFunc(JSThread *thread, JSFunction *func) JSTaggedValue SlowRuntimeStub::NewClassFunc(JSThread *thread, JSFunction *func)
{ {
INTERPRETER_TRACE(thread, NewClassFunc);
[[maybe_unused]] EcmaHandleScope handleScope(thread); [[maybe_unused]] EcmaHandleScope handleScope(thread);
auto method = func->GetCallTarget(); auto method = func->GetCallTarget();
@ -1528,6 +1569,7 @@ JSTaggedValue SlowRuntimeStub::NewClassFunc(JSThread *thread, JSFunction *func)
JSTaggedValue SlowRuntimeStub::DefineClass(JSThread *thread, JSFunction *func, TaggedArray *literal, JSTaggedValue SlowRuntimeStub::DefineClass(JSThread *thread, JSFunction *func, TaggedArray *literal,
JSTaggedValue proto, JSTaggedValue lexenv, ConstantPool *constpool) JSTaggedValue proto, JSTaggedValue lexenv, ConstantPool *constpool)
{ {
INTERPRETER_TRACE(thread, DefineClass);
[[maybe_unused]] EcmaHandleScope handleScope(thread); [[maybe_unused]] EcmaHandleScope handleScope(thread);
JSHandle<GlobalEnv> env = thread->GetEcmaVM()->GetGlobalEnv(); JSHandle<GlobalEnv> env = thread->GetEcmaVM()->GetGlobalEnv();
const GlobalEnvConstants *globalConst = thread->GlobalConstants(); const GlobalEnvConstants *globalConst = thread->GlobalConstants();
@ -1652,6 +1694,7 @@ JSTaggedValue SlowRuntimeStub::DefineClass(JSThread *thread, JSFunction *func, T
JSTaggedValue SlowRuntimeStub::SuperCall(JSThread *thread, JSTaggedValue func, JSTaggedValue newTarget, JSTaggedValue SlowRuntimeStub::SuperCall(JSThread *thread, JSTaggedValue func, JSTaggedValue newTarget,
uint16_t firstVRegIdx, uint16_t length) uint16_t firstVRegIdx, uint16_t length)
{ {
INTERPRETER_TRACE(thread, SuperCall);
[[maybe_unused]] EcmaHandleScope handleScope(thread); [[maybe_unused]] EcmaHandleScope handleScope(thread);
ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); ObjectFactory *factory = thread->GetEcmaVM()->GetFactory();
EcmaFrameHandler frameHandler(thread); EcmaFrameHandler frameHandler(thread);
@ -1677,6 +1720,7 @@ JSTaggedValue SlowRuntimeStub::SuperCall(JSThread *thread, JSTaggedValue func, J
JSTaggedValue SlowRuntimeStub::SuperCallSpread(JSThread *thread, JSTaggedValue func, JSTaggedValue newTarget, JSTaggedValue SlowRuntimeStub::SuperCallSpread(JSThread *thread, JSTaggedValue func, JSTaggedValue newTarget,
JSTaggedValue array) JSTaggedValue array)
{ {
INTERPRETER_TRACE(thread, SuperCallSpread);
[[maybe_unused]] EcmaHandleScope handleScope(thread); [[maybe_unused]] EcmaHandleScope handleScope(thread);
EcmaFrameHandler frameHandler(thread); EcmaFrameHandler frameHandler(thread);
@ -1699,6 +1743,7 @@ JSTaggedValue SlowRuntimeStub::SuperCallSpread(JSThread *thread, JSTaggedValue f
JSTaggedValue SlowRuntimeStub::DefineMethod(JSThread *thread, JSFunction *func, JSTaggedValue homeObject) JSTaggedValue SlowRuntimeStub::DefineMethod(JSThread *thread, JSFunction *func, JSTaggedValue homeObject)
{ {
INTERPRETER_TRACE(thread, DefineMethod);
[[maybe_unused]] EcmaHandleScope handleScope(thread); [[maybe_unused]] EcmaHandleScope handleScope(thread);
ASSERT(homeObject.IsECMAObject()); ASSERT(homeObject.IsECMAObject());
JSHandle<JSTaggedValue> homeObjectHandle(thread, homeObject); JSHandle<JSTaggedValue> homeObjectHandle(thread, homeObject);
@ -1716,6 +1761,7 @@ JSTaggedValue SlowRuntimeStub::DefineMethod(JSThread *thread, JSFunction *func,
JSTaggedValue SlowRuntimeStub::LdSuperByValue(JSThread *thread, JSTaggedValue obj, JSTaggedValue key, JSTaggedValue SlowRuntimeStub::LdSuperByValue(JSThread *thread, JSTaggedValue obj, JSTaggedValue key,
JSTaggedValue thisFunc) JSTaggedValue thisFunc)
{ {
INTERPRETER_TRACE(thread, LdSuperByValue);
[[maybe_unused]] EcmaHandleScope handleScope(thread); [[maybe_unused]] EcmaHandleScope handleScope(thread);
ASSERT(thisFunc.IsJSFunction()); ASSERT(thisFunc.IsJSFunction());
// get Homeobject form function // get Homeobject form function
@ -1740,6 +1786,7 @@ JSTaggedValue SlowRuntimeStub::LdSuperByValue(JSThread *thread, JSTaggedValue ob
JSTaggedValue SlowRuntimeStub::StSuperByValue(JSThread *thread, JSTaggedValue obj, JSTaggedValue key, JSTaggedValue SlowRuntimeStub::StSuperByValue(JSThread *thread, JSTaggedValue obj, JSTaggedValue key,
JSTaggedValue value, JSTaggedValue thisFunc) JSTaggedValue value, JSTaggedValue thisFunc)
{ {
INTERPRETER_TRACE(thread, StSuperByValue);
[[maybe_unused]] EcmaHandleScope handleScope(thread); [[maybe_unused]] EcmaHandleScope handleScope(thread);
ASSERT(thisFunc.IsJSFunction()); ASSERT(thisFunc.IsJSFunction());
// get Homeobject form function // get Homeobject form function
@ -1794,6 +1841,7 @@ JSTaggedValue SlowRuntimeStub::GetCallSpreadArgs(JSThread *thread, JSTaggedValue
void SlowRuntimeStub::ThrowDeleteSuperProperty(JSThread *thread) void SlowRuntimeStub::ThrowDeleteSuperProperty(JSThread *thread)
{ {
INTERPRETER_TRACE(thread, ThrowDeleteSuperProperty);
[[maybe_unused]] EcmaHandleScope handleScope(thread); [[maybe_unused]] EcmaHandleScope handleScope(thread);
ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); ObjectFactory *factory = thread->GetEcmaVM()->GetFactory();
@ -1804,6 +1852,7 @@ void SlowRuntimeStub::ThrowDeleteSuperProperty(JSThread *thread)
JSTaggedValue SlowRuntimeStub::NotifyInlineCache(JSThread *thread, JSFunction *func, JSMethod *method) JSTaggedValue SlowRuntimeStub::NotifyInlineCache(JSThread *thread, JSFunction *func, JSMethod *method)
{ {
INTERPRETER_TRACE(thread, NotifyInlineCache);
uint32_t icSlotSize = method->GetSlotSize(); uint32_t icSlotSize = method->GetSlotSize();
if (icSlotSize > 0 && icSlotSize < ProfileTypeInfo::INVALID_SLOT_INDEX) { if (icSlotSize > 0 && icSlotSize < ProfileTypeInfo::INVALID_SLOT_INDEX) {
ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); ObjectFactory *factory = thread->GetEcmaVM()->GetFactory();

View File

@ -83,7 +83,7 @@ namespace panda::ecmascript {
V(RefeqDyn) \ V(RefeqDyn) \
V(TypeofDyn) \ V(TypeofDyn) \
V(LdnewobjrangeDyn) \ V(LdnewobjrangeDyn) \
V(IsinDyn) \ V(IsInDyn) \
V(InstanceofDyn) \ V(InstanceofDyn) \
V(NewobjspreadDyn) \ V(NewobjspreadDyn) \
V(CallArg0Dyn) \ V(CallArg0Dyn) \
@ -97,7 +97,6 @@ namespace panda::ecmascript {
V(StlexvarDyn) \ V(StlexvarDyn) \
V(LdlexvarDyn) \ V(LdlexvarDyn) \
V(LdlexenvDyn) \ V(LdlexenvDyn) \
V(GetUnmappedArgs) \
V(GetPropIterator) \ V(GetPropIterator) \
V(CreateIterResultObj) \ V(CreateIterResultObj) \
V(DefineGeneratorFunc) \ V(DefineGeneratorFunc) \
@ -138,6 +137,76 @@ namespace panda::ecmascript {
V(CompressCollector_RunPhases) \ V(CompressCollector_RunPhases) \
V(OldSpaceCollector_RunPhases) \ V(OldSpaceCollector_RunPhases) \
V(SemiSpaceCollector_RunPhases) \ V(SemiSpaceCollector_RunPhases) \
V(LoadGlobalICByName) \
V(StoreGlobalICByName) \
V(StoreICWithHandler) \
V(StorePrototype) \
V(StoreWithTransition) \
V(StoreField) \
V(StoreGlobal) \
V(LoadPrototype) \
V(LoadICWithHandler) \
V(StoreElement) \
V(CallGetter) \
V(CallSetter) \
V(AddPropertyByName) \
V(AddPropertyByIndex) \
V(GetPropertyByIndex) \
V(GetPropertyByValue) \
V(SetPropertyByName) \
V(SetPropertyByIndex) \
V(SetPropertyByValue) \
V(FastTypeOf) \
V(FastSetPropertyByIndex) \
V(FastSetPropertyByValue) \
V(FastGetPropertyByName) \
V(FastGetPropertyByValue) \
V(FastGetPropertyByIndex) \
V(NewLexicalEnvDyn) \
V(SetElement) \
V(SetGlobalOwnProperty) \
V(SetOwnPropertyByName) \
V(SetOwnElement) \
V(FastSetProperty) \
V(FastGetProperty) \
V(FindOwnProperty) \
V(HasOwnProperty) \
V(ExecuteNative) \
V(Execute) \
V(ToJSTaggedValueWithInt32) \
V(ToJSTaggedValueWithUint32) \
V(ThrowIfSuperNotCorrectCall) \
V(CreateEmptyArray) \
V(CreateEmptyObject) \
V(CreateObjectWithBuffer) \
V(CreateObjectHavingMethod) \
V(SetObjectWithProto) \
V(ImportModule) \
V(StModuleVar) \
V(CopyModule) \
V(LdModvarByName) \
V(CreateRegExpWithLiteral) \
V(CreateArrayWithBuffer) \
V(GetNextPropName) \
V(CopyDataProperties) \
V(GetUnmapedArgs) \
V(TryStGlobalByName) \
V(LdGlobalVar) \
V(StGlobalVar) \
V(TryUpdateGlobalRecord) \
V(LdGlobalRecord) \
V(StGlobalRecord) \
V(ThrowReferenceError) \
V(ThrowTypeError) \
V(ThrowSyntaxError) \
V(NewClassFunc) \
V(DefineClass) \
V(SuperCall) \
V(SuperCallSpread) \
V(DefineMethod) \
V(LdSuperByValue) \
V(StSuperByValue) \
V(ThrowDeleteSuperProperty) \
V(GetIteratorNext) V(GetIteratorNext)
// NOLINTNEXTLINE(cppcoreguidelines-macro-usage) // NOLINTNEXTLINE(cppcoreguidelines-macro-usage)