mirror of
https://gitee.com/openharmony/arkcompiler_ets_runtime
synced 2024-11-23 18:20:04 +00:00
add runtime stat
Signed-off-by: wupengyong <wupengyong@huawei.com> Change-Id: Id40e77ef79c6dd1882d0f7c2c68f7c0fba402333
This commit is contained in:
parent
991c3ea9f9
commit
52a2b0f777
@ -40,6 +40,7 @@ namespace panda::ecmascript {
|
||||
JSTaggedValue ICRuntimeStub::LoadGlobalICByName(JSThread *thread, ProfileTypeInfo *profileTypeInfo,
|
||||
JSTaggedValue globalValue, JSTaggedValue key, uint32_t slotId)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, LoadGlobalICByName);
|
||||
JSTaggedValue handler = profileTypeInfo->Get(slotId);
|
||||
if (handler.IsHeapObject()) {
|
||||
auto result = LoadGlobal(handler);
|
||||
@ -61,6 +62,7 @@ JSTaggedValue ICRuntimeStub::StoreGlobalICByName(JSThread *thread, ProfileTypeIn
|
||||
JSTaggedValue globalValue, JSTaggedValue key,
|
||||
JSTaggedValue value, uint32_t slotId)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, StoreGlobalICByName);
|
||||
JSTaggedValue handler = profileTypeInfo->Get(slotId);
|
||||
if (handler.IsHeapObject()) {
|
||||
auto result = StoreGlobal(thread, value, handler);
|
||||
@ -232,6 +234,7 @@ ARK_INLINE JSTaggedValue ICRuntimeStub::StoreICWithHandler(JSThread *thread, JST
|
||||
JSTaggedValue holder,
|
||||
JSTaggedValue value, JSTaggedValue handler)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, StoreICWithHandler);
|
||||
if (handler.IsInt()) {
|
||||
auto handlerInfo = static_cast<uint32_t>(handler.GetInt());
|
||||
if (HandlerBase::IsField(handlerInfo)) {
|
||||
@ -258,6 +261,7 @@ ARK_INLINE JSTaggedValue ICRuntimeStub::StoreICWithHandler(JSThread *thread, JST
|
||||
JSTaggedValue ICRuntimeStub::StorePrototype(JSThread *thread, JSTaggedValue receiver,
|
||||
JSTaggedValue value, JSTaggedValue handler)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, StorePrototype);
|
||||
ASSERT(handler.IsPrototypeHandler());
|
||||
PrototypeHandler *prototypeHandler = PrototypeHandler::Cast(handler.GetTaggedObject());
|
||||
auto cellValue = prototypeHandler->GetProtoCell();
|
||||
@ -274,6 +278,7 @@ JSTaggedValue ICRuntimeStub::StorePrototype(JSThread *thread, JSTaggedValue rece
|
||||
void ICRuntimeStub::StoreWithTransition(JSThread *thread, JSObject *receiver, JSTaggedValue value,
|
||||
JSTaggedValue handler)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, StoreWithTransition);
|
||||
TransitionHandler *transitionHandler = TransitionHandler::Cast(handler.GetTaggedObject());
|
||||
JSHClass *newHClass = JSHClass::Cast(transitionHandler->GetTransitionHClass().GetTaggedObject());
|
||||
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)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, StoreField);
|
||||
int index = HandlerBase::GetOffset(handler);
|
||||
if (HandlerBase::IsInlinedProps(handler)) {
|
||||
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)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, StoreGlobal);
|
||||
ASSERT(handler.IsPropertyBox());
|
||||
PropertyBox *cell = PropertyBox::Cast(handler.GetHeapObject());
|
||||
if (cell->IsInvalid()) {
|
||||
@ -354,6 +361,7 @@ ARK_INLINE JSTaggedValue ICRuntimeStub::StoreGlobal(JSThread *thread, JSTaggedVa
|
||||
|
||||
JSTaggedValue ICRuntimeStub::LoadPrototype(JSThread *thread, JSTaggedValue receiver, JSTaggedValue handler)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, LoadPrototype);
|
||||
ASSERT(handler.IsPrototypeHandler());
|
||||
PrototypeHandler *prototypeHandler = PrototypeHandler::Cast(handler.GetTaggedObject());
|
||||
auto cellValue = prototypeHandler->GetProtoCell();
|
||||
@ -370,6 +378,7 @@ JSTaggedValue ICRuntimeStub::LoadPrototype(JSThread *thread, JSTaggedValue recei
|
||||
ARK_INLINE JSTaggedValue ICRuntimeStub::LoadICWithHandler(JSThread *thread, JSTaggedValue receiver,
|
||||
JSTaggedValue holder, JSTaggedValue handler)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, LoadICWithHandler);
|
||||
if (LIKELY(handler.IsInt())) {
|
||||
auto handlerInfo = static_cast<uint32_t>(handler.GetInt());
|
||||
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 value, uint32_t handlerInfo)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, StoreElement);
|
||||
ASSERT(HandlerBase::IsElement(handlerInfo));
|
||||
auto index = TryToElementsIndex(key);
|
||||
if (index < 0) {
|
||||
|
@ -184,6 +184,7 @@ int32_t FastRuntimeStub::TryToElementsIndex(JSTaggedValue key)
|
||||
JSTaggedValue FastRuntimeStub::CallGetter(JSThread *thread, JSTaggedValue receiver, JSTaggedValue holder,
|
||||
JSTaggedValue value)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, CallGetter);
|
||||
// Accessor
|
||||
[[maybe_unused]] EcmaHandleScope handleScope(thread);
|
||||
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 accessorValue)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, CallSetter);
|
||||
// Accessor
|
||||
[[maybe_unused]] EcmaHandleScope handleScope(thread);
|
||||
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 value)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, AddPropertyByName);
|
||||
[[maybe_unused]] EcmaHandleScope handleScope(thread);
|
||||
if (UNLIKELY(!JSObject::Cast(receiver)->IsExtensible())) {
|
||||
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 value)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, AddPropertyByIndex);
|
||||
[[maybe_unused]] EcmaHandleScope handleScope(thread);
|
||||
if (UNLIKELY(!JSObject::Cast(receiver)->IsExtensible())) {
|
||||
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>
|
||||
JSTaggedValue FastRuntimeStub::GetPropertyByIndex(JSThread *thread, JSTaggedValue receiver, uint32_t index)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, GetPropertyByIndex);
|
||||
[[maybe_unused]] EcmaHandleScope handleScope(thread);
|
||||
JSTaggedValue holder = receiver;
|
||||
do {
|
||||
@ -351,6 +356,7 @@ JSTaggedValue FastRuntimeStub::GetPropertyByIndex(JSThread *thread, JSTaggedValu
|
||||
template<bool UseOwn>
|
||||
JSTaggedValue FastRuntimeStub::GetPropertyByValue(JSThread *thread, JSTaggedValue receiver, JSTaggedValue key)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, GetPropertyByValue);
|
||||
if (UNLIKELY(!key.IsNumber() && !key.IsStringOrSymbol())) {
|
||||
return JSTaggedValue::Hole();
|
||||
}
|
||||
@ -432,6 +438,7 @@ template<bool UseOwn>
|
||||
JSTaggedValue FastRuntimeStub::SetPropertyByName(JSThread *thread, JSTaggedValue receiver, JSTaggedValue key,
|
||||
JSTaggedValue value)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, SetPropertyByName);
|
||||
// property
|
||||
JSTaggedValue holder = receiver;
|
||||
do {
|
||||
@ -504,6 +511,7 @@ template<bool UseOwn>
|
||||
JSTaggedValue FastRuntimeStub::SetPropertyByIndex(JSThread *thread, JSTaggedValue receiver, uint32_t index,
|
||||
JSTaggedValue value)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, SetPropertyByIndex);
|
||||
JSTaggedValue holder = receiver;
|
||||
do {
|
||||
auto *hclass = holder.GetTaggedObject()->GetClass();
|
||||
@ -539,6 +547,7 @@ template<bool UseOwn>
|
||||
JSTaggedValue FastRuntimeStub::SetPropertyByValue(JSThread *thread, JSTaggedValue receiver, JSTaggedValue key,
|
||||
JSTaggedValue value)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, SetPropertyByValue);
|
||||
if (UNLIKELY(!key.IsNumber() && !key.IsStringOrSymbol())) {
|
||||
return JSTaggedValue::Hole();
|
||||
}
|
||||
@ -579,6 +588,7 @@ JSTaggedValue FastRuntimeStub::GetGlobalOwnProperty(JSTaggedValue receiver, JSTa
|
||||
|
||||
JSTaggedValue FastRuntimeStub::FastTypeOf(JSThread *thread, JSTaggedValue obj)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, FastTypeOf);
|
||||
const GlobalEnvConstants *globalConst = thread->GlobalConstants();
|
||||
switch (obj.GetRawData()) {
|
||||
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,
|
||||
JSTaggedValue value)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, FastSetPropertyByIndex);
|
||||
JSTaggedValue result = FastRuntimeStub::SetPropertyByIndex(thread, receiver, index, value);
|
||||
if (!result.IsHole()) {
|
||||
return result != JSTaggedValue::Exception();
|
||||
@ -622,6 +633,7 @@ bool FastRuntimeStub::FastSetPropertyByIndex(JSThread *thread, JSTaggedValue rec
|
||||
bool FastRuntimeStub::FastSetPropertyByValue(JSThread *thread, JSTaggedValue receiver, JSTaggedValue key,
|
||||
JSTaggedValue value)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, FastSetPropertyByValue);
|
||||
JSTaggedValue result = FastRuntimeStub::SetPropertyByValue(thread, receiver, key, value);
|
||||
if (!result.IsHole()) {
|
||||
return result != JSTaggedValue::Exception();
|
||||
@ -634,6 +646,7 @@ bool FastRuntimeStub::FastSetPropertyByValue(JSThread *thread, JSTaggedValue rec
|
||||
// must not use for interpreter
|
||||
JSTaggedValue FastRuntimeStub::FastGetPropertyByName(JSThread *thread, JSTaggedValue receiver, JSTaggedValue key)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, FastGetPropertyByName);
|
||||
ASSERT(key.IsStringOrSymbol());
|
||||
if (key.IsString() && !EcmaString::Cast(key.GetTaggedObject())->IsInternString()) {
|
||||
JSHandle<JSTaggedValue> receiverHandler(thread, receiver);
|
||||
@ -653,6 +666,7 @@ JSTaggedValue FastRuntimeStub::FastGetPropertyByName(JSThread *thread, JSTaggedV
|
||||
|
||||
JSTaggedValue FastRuntimeStub::FastGetPropertyByValue(JSThread *thread, JSTaggedValue receiver, JSTaggedValue key)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, FastGetPropertyByValue);
|
||||
JSTaggedValue result = FastRuntimeStub::GetPropertyByValue(thread, receiver, key);
|
||||
if (result.IsHole()) {
|
||||
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
|
||||
JSTaggedValue FastRuntimeStub::FastGetPropertyByIndex(JSThread *thread, JSTaggedValue receiver, uint32_t index)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, FastGetPropertyByIndex);
|
||||
JSTaggedValue result = GetPropertyByIndex(thread, receiver, index);
|
||||
if (result.IsHole() && !UseHole) {
|
||||
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)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, NewLexicalEnvDyn);
|
||||
[[maybe_unused]] EcmaHandleScope handleScope(thread);
|
||||
LexicalEnv *newEnv = factory->InlineNewLexicalEnv(numVars);
|
||||
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 mayThrow)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, SetElement);
|
||||
JSTaggedValue holder = receiver;
|
||||
bool onPrototype = false;
|
||||
|
||||
@ -808,6 +825,7 @@ bool FastRuntimeStub::SetElement(JSThread *thread, JSTaggedValue receiver, uint3
|
||||
bool FastRuntimeStub::SetPropertyByName(JSThread *thread, JSTaggedValue receiver, JSTaggedValue key,
|
||||
JSTaggedValue value, bool mayThrow)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, SetPropertyByName);
|
||||
// property
|
||||
JSTaggedValue holder = receiver;
|
||||
bool onPrototype = false;
|
||||
@ -930,6 +948,7 @@ bool FastRuntimeStub::SetPropertyByName(JSThread *thread, JSTaggedValue receiver
|
||||
bool FastRuntimeStub::SetGlobalOwnProperty(JSThread *thread, JSTaggedValue receiver, JSTaggedValue key,
|
||||
JSTaggedValue value, bool mayThrow)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, SetGlobalOwnProperty);
|
||||
uint32_t index = 0;
|
||||
if (JSTaggedValue::ToElementIndex(key, &index)) {
|
||||
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,
|
||||
JSTaggedValue value)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, SetOwnPropertyByName);
|
||||
TaggedArray *properties = TaggedArray::Cast(JSObject::Cast(receiver)->GetProperties().GetHeapObject());
|
||||
PropertyAttributes attr;
|
||||
uint32_t indexOrEntry;
|
||||
@ -1045,6 +1065,7 @@ void FastRuntimeStub::SetOwnPropertyByName(JSThread *thread, JSTaggedValue recei
|
||||
// set element that is not accessor and is writable
|
||||
bool FastRuntimeStub::SetOwnElement(JSThread *thread, JSTaggedValue receiver, uint32_t index, JSTaggedValue value)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, SetOwnElement);
|
||||
PropertyAttributes attr;
|
||||
uint32_t indexOrEntry;
|
||||
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 mayThrow)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, FastSetProperty);
|
||||
if (receiver.IsJSObject() && !receiver.IsTypedArray() && (key.IsStringOrSymbol())) {
|
||||
uint32_t index = 0;
|
||||
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)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, FastGetProperty);
|
||||
JSTaggedValue result;
|
||||
if (receiver.IsJSObject() && !receiver.IsTypedArray() && (key.IsStringOrSymbol())) {
|
||||
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 key, PropertyAttributes *attr, uint32_t *indexOrEntry)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, FindOwnProperty);
|
||||
if (!properties->IsDictionaryMode()) {
|
||||
JSHClass *cls = obj->GetJSHClass();
|
||||
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)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, FindOwnProperty);
|
||||
TaggedArray *array = TaggedArray::Cast(obj->GetProperties().GetHeapObject());
|
||||
if (!array->IsDictionaryMode()) {
|
||||
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)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, HasOwnProperty);
|
||||
uint32_t index = 0;
|
||||
if (UNLIKELY(JSTaggedValue::ToElementIndex(key, &index))) {
|
||||
return FastRuntimeStub::FindOwnElement(obj, index);
|
||||
|
@ -205,6 +205,7 @@ namespace panda::ecmascript {
|
||||
|
||||
JSTaggedValue EcmaInterpreter::ExecuteNative(JSThread *thread, const CallParams& params)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, ExecuteNative);
|
||||
JSTaggedType *sp = const_cast<JSTaggedType *>(thread->GetCurrentSPFrame());
|
||||
JSMethod *methodToCall = params.callTarget->GetCallTarget();
|
||||
ASSERT(methodToCall->GetNumVregs() == 0);
|
||||
@ -242,6 +243,7 @@ JSTaggedValue EcmaInterpreter::ExecuteNative(JSThread *thread, const CallParams&
|
||||
|
||||
JSTaggedValue EcmaInterpreter::Execute(JSThread *thread, const CallParams& params)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, Execute);
|
||||
JSMethod *method = params.callTarget->GetCallTarget();
|
||||
ASSERT(thread->IsEcmaInterpreter());
|
||||
if (method->IsNative()) {
|
||||
|
@ -67,6 +67,7 @@ JSTaggedValue SlowRuntimeStub::CallSpreadDyn(JSThread *thread, JSTaggedValue fun
|
||||
|
||||
JSTaggedValue SlowRuntimeStub::NegDyn(JSThread *thread, JSTaggedValue value)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, NegDyn);
|
||||
[[maybe_unused]] EcmaHandleScope handleScope(thread);
|
||||
|
||||
JSHandle<JSTaggedValue> input(thread, value);
|
||||
@ -89,6 +90,7 @@ JSTaggedValue SlowRuntimeStub::NegDyn(JSThread *thread, JSTaggedValue value)
|
||||
|
||||
JSTaggedValue SlowRuntimeStub::AsyncFunctionEnter(JSThread *thread)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, AsyncFunctionEnter);
|
||||
ObjectFactory *factory = thread->GetEcmaVM()->GetFactory();
|
||||
[[maybe_unused]] EcmaHandleScope handleScope(thread);
|
||||
// 1. create promise
|
||||
@ -126,6 +128,7 @@ JSTaggedValue SlowRuntimeStub::ToNumber(JSThread *thread, JSTaggedValue value)
|
||||
|
||||
JSTaggedValue SlowRuntimeStub::NotDyn(JSThread *thread, JSTaggedValue value)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, NotDyn);
|
||||
[[maybe_unused]] EcmaHandleScope handleScope(thread);
|
||||
JSHandle<JSTaggedValue> valueHandle(thread, value);
|
||||
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)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, IncDyn);
|
||||
[[maybe_unused]] EcmaHandleScope handleScope(thread);
|
||||
|
||||
JSHandle<JSTaggedValue> valueHandle(thread, value);
|
||||
@ -145,6 +149,7 @@ JSTaggedValue SlowRuntimeStub::IncDyn(JSThread *thread, JSTaggedValue value)
|
||||
|
||||
JSTaggedValue SlowRuntimeStub::DecDyn(JSThread *thread, JSTaggedValue value)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, DecDyn);
|
||||
[[maybe_unused]] EcmaHandleScope handleScope(thread);
|
||||
|
||||
JSHandle<JSTaggedValue> valueHandle(thread, value);
|
||||
@ -155,6 +160,7 @@ JSTaggedValue SlowRuntimeStub::DecDyn(JSThread *thread, JSTaggedValue value)
|
||||
|
||||
void SlowRuntimeStub::ThrowDyn(JSThread *thread, JSTaggedValue value)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, ThrowDyn);
|
||||
[[maybe_unused]] EcmaHandleScope handleScope(thread);
|
||||
|
||||
ObjectFactory *factory = thread->GetEcmaVM()->GetFactory();
|
||||
@ -165,6 +171,7 @@ void SlowRuntimeStub::ThrowDyn(JSThread *thread, JSTaggedValue value)
|
||||
|
||||
JSTaggedValue SlowRuntimeStub::GetPropIterator(JSThread *thread, JSTaggedValue value)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, GetPropIterator);
|
||||
[[maybe_unused]] EcmaHandleScope handleScope(thread);
|
||||
|
||||
JSHandle<JSTaggedValue> objHandle(thread, value);
|
||||
@ -175,6 +182,7 @@ JSTaggedValue SlowRuntimeStub::GetPropIterator(JSThread *thread, JSTaggedValue v
|
||||
|
||||
void SlowRuntimeStub::ThrowConstAssignment(JSThread *thread, JSTaggedValue value)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, ThrowConstAssignment);
|
||||
[[maybe_unused]] EcmaHandleScope handleScope(thread);
|
||||
|
||||
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> rightValue(thread, right);
|
||||
if (leftValue->IsString() && rightValue->IsString()) {
|
||||
JSHandle<EcmaString> stringA0 = JSTaggedValue::ToString(thread, leftValue);
|
||||
RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread);
|
||||
JSHandle<EcmaString> stringA1 = JSTaggedValue::ToString(thread, rightValue);
|
||||
RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread);
|
||||
EcmaString *newString = EcmaString::Concat(stringA0, stringA1, ecma_vm);
|
||||
EcmaString *newString = EcmaString::Concat(JSHandle<EcmaString>(leftValue),
|
||||
JSHandle<EcmaString>(rightValue), ecma_vm);
|
||||
return JSTaggedValue(newString);
|
||||
}
|
||||
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)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, ToJSTaggedValueWithInt32);
|
||||
[[maybe_unused]] EcmaHandleScope handleScope(thread);
|
||||
JSHandle<JSTaggedValue> valueHandle(thread, value);
|
||||
int32_t res = JSTaggedValue::ToInt32(thread, valueHandle);
|
||||
@ -387,6 +393,7 @@ JSTaggedValue SlowRuntimeStub::ToJSTaggedValueWithInt32(JSThread *thread, JSTagg
|
||||
|
||||
JSTaggedValue SlowRuntimeStub::ToJSTaggedValueWithUint32(JSThread *thread, JSTaggedValue value)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, ToJSTaggedValueWithUint32);
|
||||
[[maybe_unused]] EcmaHandleScope handleScope(thread);
|
||||
JSHandle<JSTaggedValue> valueHandle(thread, value);
|
||||
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)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, IsInDyn);
|
||||
[[maybe_unused]] EcmaHandleScope handleScope(thread);
|
||||
|
||||
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)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, InstanceofDyn);
|
||||
[[maybe_unused]] EcmaHandleScope handleScope(thread);
|
||||
|
||||
JSHandle<JSTaggedValue> objHandle(thread, obj);
|
||||
@ -673,6 +682,7 @@ JSTaggedValue SlowRuntimeStub::NewObjSpreadDyn(JSThread *thread, JSTaggedValue f
|
||||
|
||||
void SlowRuntimeStub::ThrowUndefinedIfHole(JSThread *thread, JSTaggedValue obj)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, ThrowUndefinedIfHole);
|
||||
[[maybe_unused]] EcmaHandleScope handleScope(thread);
|
||||
|
||||
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)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, ThrowIfSuperNotCorrectCall);
|
||||
[[maybe_unused]] EcmaHandleScope handleScope(thread);
|
||||
|
||||
if (index == 0 && (thisValue.IsUndefined() || thisValue.IsHole())) {
|
||||
@ -698,6 +709,7 @@ JSTaggedValue SlowRuntimeStub::ThrowIfSuperNotCorrectCall(JSThread *thread, uint
|
||||
|
||||
void SlowRuntimeStub::ThrowIfNotObject(JSThread *thread)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, ThrowIfNotObject);
|
||||
[[maybe_unused]] EcmaHandleScope handleScope(thread);
|
||||
|
||||
THROW_TYPE_ERROR(thread, "Inner return result is not object");
|
||||
@ -705,6 +717,7 @@ void SlowRuntimeStub::ThrowIfNotObject(JSThread *thread)
|
||||
|
||||
void SlowRuntimeStub::ThrowThrowNotExists(JSThread *thread)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, ThrowThrowNotExists);
|
||||
[[maybe_unused]] EcmaHandleScope handleScope(thread);
|
||||
|
||||
THROW_TYPE_ERROR(thread, "Throw method is not defined");
|
||||
@ -712,6 +725,7 @@ void SlowRuntimeStub::ThrowThrowNotExists(JSThread *thread)
|
||||
|
||||
void SlowRuntimeStub::ThrowPatternNonCoercible(JSThread *thread)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, ThrowPatternNonCoercible);
|
||||
[[maybe_unused]] EcmaHandleScope handleScope(thread);
|
||||
|
||||
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)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, CreateEmptyArray);
|
||||
[[maybe_unused]] EcmaHandleScope handleScope(thread);
|
||||
|
||||
JSHandle<JSFunction> builtinObj(globalEnv->GetArrayFunction());
|
||||
@ -805,6 +820,7 @@ JSTaggedValue SlowRuntimeStub::CreateEmptyArray(JSThread *thread, ObjectFactory
|
||||
JSTaggedValue SlowRuntimeStub::CreateEmptyObject(JSThread *thread, ObjectFactory *factory,
|
||||
JSHandle<GlobalEnv> globalEnv)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, CreateEmptyObject);
|
||||
[[maybe_unused]] EcmaHandleScope handleScope(thread);
|
||||
|
||||
JSHandle<JSFunction> builtinObj(globalEnv->GetObjectFunction());
|
||||
@ -814,6 +830,7 @@ JSTaggedValue SlowRuntimeStub::CreateEmptyObject(JSThread *thread, ObjectFactory
|
||||
|
||||
JSTaggedValue SlowRuntimeStub::CreateObjectWithBuffer(JSThread *thread, ObjectFactory *factory, JSObject *literal)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, CreateObjectWithBuffer);
|
||||
[[maybe_unused]] EcmaHandleScope handleScope(thread);
|
||||
|
||||
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 env, ConstantPool *constpool)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, CreateObjectHavingMethod);
|
||||
[[maybe_unused]] EcmaHandleScope handleScope(thread);
|
||||
|
||||
JSHandle<JSObject> obj(thread, literal);
|
||||
@ -838,6 +856,7 @@ JSTaggedValue SlowRuntimeStub::CreateObjectHavingMethod(JSThread *thread, Object
|
||||
|
||||
JSTaggedValue SlowRuntimeStub::SetObjectWithProto(JSThread *thread, JSTaggedValue proto, JSTaggedValue obj)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, SetObjectWithProto);
|
||||
[[maybe_unused]] EcmaHandleScope handleScope(thread);
|
||||
|
||||
if (!proto.IsECMAObject() && !proto.IsNull()) {
|
||||
@ -852,6 +871,7 @@ JSTaggedValue SlowRuntimeStub::SetObjectWithProto(JSThread *thread, JSTaggedValu
|
||||
|
||||
JSTaggedValue SlowRuntimeStub::IterNext(JSThread *thread, JSTaggedValue iter)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, IterNext);
|
||||
[[maybe_unused]] EcmaHandleScope handleScope(thread);
|
||||
|
||||
JSHandle<JSTaggedValue> iterHandle(thread, iter);
|
||||
@ -862,6 +882,7 @@ JSTaggedValue SlowRuntimeStub::IterNext(JSThread *thread, JSTaggedValue iter)
|
||||
|
||||
JSTaggedValue SlowRuntimeStub::CloseIterator(JSThread *thread, JSTaggedValue iter)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, CloseIterator);
|
||||
[[maybe_unused]] EcmaHandleScope handleScope(thread);
|
||||
|
||||
ObjectFactory *factory = thread->GetEcmaVM()->GetFactory();
|
||||
@ -888,6 +909,7 @@ JSTaggedValue SlowRuntimeStub::CloseIterator(JSThread *thread, JSTaggedValue ite
|
||||
JSTaggedValue SlowRuntimeStub::ImportModule([[maybe_unused]] JSThread *thread,
|
||||
[[maybe_unused]] JSTaggedValue moduleName)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, ImportModule);
|
||||
[[maybe_unused]] EcmaHandleScope scope(thread);
|
||||
JSHandle<JSTaggedValue> name(thread, moduleName);
|
||||
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,
|
||||
[[maybe_unused]] JSTaggedValue exportObj)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, StModuleVar);
|
||||
[[maybe_unused]] EcmaHandleScope scope(thread);
|
||||
JSHandle<JSTaggedValue> name(thread, exportName);
|
||||
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)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, CopyModule);
|
||||
[[maybe_unused]] EcmaHandleScope scope(thread);
|
||||
JSHandle<JSTaggedValue> srcModuleObj(thread, srcModule);
|
||||
thread->GetEcmaVM()->GetModuleManager()->CopyModule(thread, srcModuleObj);
|
||||
@ -914,6 +938,7 @@ JSTaggedValue SlowRuntimeStub::LdModvarByName([[maybe_unused]] JSThread *thread,
|
||||
[[maybe_unused]] JSTaggedValue moduleObj,
|
||||
[[maybe_unused]] JSTaggedValue itemName)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, LdModvarByName);
|
||||
[[maybe_unused]] EcmaHandleScope scope(thread);
|
||||
JSHandle<JSTaggedValue> module(thread, moduleObj);
|
||||
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)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, CreateRegExpWithLiteral);
|
||||
[[maybe_unused]] EcmaHandleScope handleScope(thread);
|
||||
|
||||
ObjectFactory *factory = thread->GetEcmaVM()->GetFactory();
|
||||
@ -962,6 +988,7 @@ JSTaggedValue SlowRuntimeStub::CreateRegExpWithLiteral(JSThread *thread, JSTagge
|
||||
|
||||
JSTaggedValue SlowRuntimeStub::CreateArrayWithBuffer(JSThread *thread, ObjectFactory *factory, JSArray *literal)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, CreateArrayWithBuffer);
|
||||
[[maybe_unused]] EcmaHandleScope handleScope(thread);
|
||||
|
||||
JSHandle<JSArray> array(thread, literal);
|
||||
@ -973,6 +1000,7 @@ JSTaggedValue SlowRuntimeStub::CreateArrayWithBuffer(JSThread *thread, ObjectFac
|
||||
|
||||
JSTaggedValue SlowRuntimeStub::GetTemplateObject(JSThread *thread, JSTaggedValue literal)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, GetTemplateObject);
|
||||
[[maybe_unused]] EcmaHandleScope handleScope(thread);
|
||||
|
||||
JSHandle<JSTaggedValue> templateLiteral(thread, literal);
|
||||
@ -983,6 +1011,7 @@ JSTaggedValue SlowRuntimeStub::GetTemplateObject(JSThread *thread, JSTaggedValue
|
||||
|
||||
JSTaggedValue SlowRuntimeStub::GetNextPropName(JSThread *thread, JSTaggedValue iter)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, GetNextPropName);
|
||||
[[maybe_unused]] EcmaHandleScope handleScope(thread);
|
||||
|
||||
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)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, CopyDataProperties);
|
||||
[[maybe_unused]] EcmaHandleScope handleScope(thread);
|
||||
|
||||
JSHandle<JSTaggedValue> dstHandle(thread, dst);
|
||||
@ -1022,6 +1052,7 @@ JSTaggedValue SlowRuntimeStub::CopyDataProperties(JSThread *thread, JSTaggedValu
|
||||
|
||||
JSTaggedValue SlowRuntimeStub::GetIteratorNext(JSThread *thread, JSTaggedValue obj, JSTaggedValue method)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, GetIteratorNext);
|
||||
[[maybe_unused]] EcmaHandleScope handleScope(thread);
|
||||
|
||||
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,
|
||||
uint32_t startIdx)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, GetUnmappedArgs);
|
||||
INTERPRETER_TRACE(thread, GetUnmapedArgs);
|
||||
[[maybe_unused]] EcmaHandleScope handleScope(thread);
|
||||
|
||||
ObjectFactory *factory = thread->GetEcmaVM()->GetFactory();
|
||||
@ -1292,12 +1323,14 @@ JSTaggedValue SlowRuntimeStub::TryLdGlobalByName(JSThread *thread, JSTaggedValue
|
||||
|
||||
JSTaggedValue SlowRuntimeStub::TryStGlobalByName(JSThread *thread, JSTaggedValue prop)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, TryStGlobalByName);
|
||||
// If fast path is fail, not need slow path, just throw error.
|
||||
return ThrowReferenceError(thread, prop, " is not defined");
|
||||
}
|
||||
|
||||
JSTaggedValue SlowRuntimeStub::LdGlobalVar(JSThread *thread, JSTaggedValue global, JSTaggedValue prop)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, LdGlobalVar);
|
||||
[[maybe_unused]] EcmaHandleScope handleScope(thread);
|
||||
|
||||
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)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, StGlobalVar);
|
||||
[[maybe_unused]] EcmaHandleScope handleScope(thread);
|
||||
|
||||
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)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, TryUpdateGlobalRecord);
|
||||
[[maybe_unused]] EcmaHandleScope handleScope(thread);
|
||||
|
||||
EcmaVM *vm = thread->GetEcmaVM();
|
||||
@ -1338,6 +1373,7 @@ JSTaggedValue SlowRuntimeStub::TryUpdateGlobalRecord(JSThread *thread, JSTaggedV
|
||||
|
||||
JSTaggedValue SlowRuntimeStub::LdGlobalRecord(JSThread *thread, JSTaggedValue key, bool *found)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, LdGlobalRecord);
|
||||
[[maybe_unused]] EcmaHandleScope handleScope(thread);
|
||||
|
||||
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)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, StGlobalRecord);
|
||||
[[maybe_unused]] EcmaHandleScope handleScope(thread);
|
||||
|
||||
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)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, ThrowReferenceError);
|
||||
[[maybe_unused]] EcmaHandleScope handleScope(thread);
|
||||
ObjectFactory *factory = thread->GetEcmaVM()->GetFactory();
|
||||
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)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, ThrowTypeError);
|
||||
[[maybe_unused]] EcmaHandleScope handleScope(thread);
|
||||
ASSERT_NO_ABRUPT_COMPLETION(thread);
|
||||
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)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, ThrowSyntaxError);
|
||||
[[maybe_unused]] EcmaHandleScope handleScope(thread);
|
||||
ASSERT_NO_ABRUPT_COMPLETION(thread);
|
||||
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)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, NewClassFunc);
|
||||
[[maybe_unused]] EcmaHandleScope handleScope(thread);
|
||||
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 proto, JSTaggedValue lexenv, ConstantPool *constpool)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, DefineClass);
|
||||
[[maybe_unused]] EcmaHandleScope handleScope(thread);
|
||||
JSHandle<GlobalEnv> env = thread->GetEcmaVM()->GetGlobalEnv();
|
||||
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,
|
||||
uint16_t firstVRegIdx, uint16_t length)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, SuperCall);
|
||||
[[maybe_unused]] EcmaHandleScope handleScope(thread);
|
||||
ObjectFactory *factory = thread->GetEcmaVM()->GetFactory();
|
||||
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 array)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, SuperCallSpread);
|
||||
[[maybe_unused]] EcmaHandleScope handleScope(thread);
|
||||
EcmaFrameHandler frameHandler(thread);
|
||||
|
||||
@ -1699,6 +1743,7 @@ JSTaggedValue SlowRuntimeStub::SuperCallSpread(JSThread *thread, JSTaggedValue f
|
||||
|
||||
JSTaggedValue SlowRuntimeStub::DefineMethod(JSThread *thread, JSFunction *func, JSTaggedValue homeObject)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, DefineMethod);
|
||||
[[maybe_unused]] EcmaHandleScope handleScope(thread);
|
||||
ASSERT(homeObject.IsECMAObject());
|
||||
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 thisFunc)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, LdSuperByValue);
|
||||
[[maybe_unused]] EcmaHandleScope handleScope(thread);
|
||||
ASSERT(thisFunc.IsJSFunction());
|
||||
// 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 value, JSTaggedValue thisFunc)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, StSuperByValue);
|
||||
[[maybe_unused]] EcmaHandleScope handleScope(thread);
|
||||
ASSERT(thisFunc.IsJSFunction());
|
||||
// get Homeobject form function
|
||||
@ -1794,6 +1841,7 @@ JSTaggedValue SlowRuntimeStub::GetCallSpreadArgs(JSThread *thread, JSTaggedValue
|
||||
|
||||
void SlowRuntimeStub::ThrowDeleteSuperProperty(JSThread *thread)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, ThrowDeleteSuperProperty);
|
||||
[[maybe_unused]] EcmaHandleScope handleScope(thread);
|
||||
|
||||
ObjectFactory *factory = thread->GetEcmaVM()->GetFactory();
|
||||
@ -1804,6 +1852,7 @@ void SlowRuntimeStub::ThrowDeleteSuperProperty(JSThread *thread)
|
||||
|
||||
JSTaggedValue SlowRuntimeStub::NotifyInlineCache(JSThread *thread, JSFunction *func, JSMethod *method)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, NotifyInlineCache);
|
||||
uint32_t icSlotSize = method->GetSlotSize();
|
||||
if (icSlotSize > 0 && icSlotSize < ProfileTypeInfo::INVALID_SLOT_INDEX) {
|
||||
ObjectFactory *factory = thread->GetEcmaVM()->GetFactory();
|
||||
|
@ -83,7 +83,7 @@ namespace panda::ecmascript {
|
||||
V(RefeqDyn) \
|
||||
V(TypeofDyn) \
|
||||
V(LdnewobjrangeDyn) \
|
||||
V(IsinDyn) \
|
||||
V(IsInDyn) \
|
||||
V(InstanceofDyn) \
|
||||
V(NewobjspreadDyn) \
|
||||
V(CallArg0Dyn) \
|
||||
@ -97,7 +97,6 @@ namespace panda::ecmascript {
|
||||
V(StlexvarDyn) \
|
||||
V(LdlexvarDyn) \
|
||||
V(LdlexenvDyn) \
|
||||
V(GetUnmappedArgs) \
|
||||
V(GetPropIterator) \
|
||||
V(CreateIterResultObj) \
|
||||
V(DefineGeneratorFunc) \
|
||||
@ -138,6 +137,76 @@ namespace panda::ecmascript {
|
||||
V(CompressCollector_RunPhases) \
|
||||
V(OldSpaceCollector_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)
|
||||
|
||||
// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
|
||||
|
Loading…
Reference in New Issue
Block a user