!8054 Fix compilation issues

Merge pull request !8054 from lijiamin/master
This commit is contained in:
openharmony_ci 2024-07-09 20:11:53 +00:00 committed by Gitee
commit b4220d044c
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
8 changed files with 12 additions and 17 deletions

View File

@ -98,7 +98,7 @@ void BytecodeInfoCollector::ProcessClasses()
panda_file::IndexAccessor indexAccessor(*pf, methodId);
panda_file::FunctionKind funcKind = indexAccessor.GetFunctionKind();
bool isShared = JSPandaFile::IsSendableFunctionKind(funcKind);
methodLiteral->SetIsSharedBit(isShared);
methodLiteral->SetIsShared(isShared);
FunctionKind kind = JSPandaFile::GetFunctionKind(funcKind);
methodLiteral->SetFunctionKind(kind);

View File

@ -1146,7 +1146,7 @@ void JSFunction::InitializeForConcurrentFunction(JSThread *thread)
}
}
bool JSFunction::IsSendableFunction() const
bool JSFunction::IsSendableOrConcurrentFunction() const
{
if (this->GetClass()->IsJSSharedFunction() || this->GetClass()->IsJSSharedAsyncFunction() ||
this->GetFunctionKind() == ecmascript::FunctionKind::CONCURRENT_FUNCTION) {

View File

@ -323,7 +323,7 @@ public:
void InitializeForConcurrentFunction(JSThread *thread);
bool IsSendableFunction() const;
bool IsSendableOrConcurrentFunction() const;
bool IsSharedFunction() const;
static void InitializeJSFunction(JSThread *thread, const JSHandle<JSFunction> &func,

View File

@ -340,14 +340,6 @@ FunctionKind JSPandaFile::GetFunctionKind(panda_file::FunctionKind funcKind)
return kind;
}
bool JSPandaFile::IsSendableFunctionKind(panda_file::FunctionKind funcKind)
{
if ((static_cast<uint32_t>(funcKind) & SENDABLE_FUNCTION_MASK) != 0) {
return true;
}
return false;
}
FunctionKind JSPandaFile::GetFunctionKind(ConstPoolType type)
{
FunctionKind kind;

View File

@ -452,7 +452,10 @@ public:
}
static FunctionKind PUBLIC_API GetFunctionKind(panda_file::FunctionKind funcKind);
static FunctionKind GetFunctionKind(ConstPoolType type);
static bool PUBLIC_API IsSendableFunctionKind(panda_file::FunctionKind funcKind);
static bool PUBLIC_API IsSendableFunctionKind(panda_file::FunctionKind funcKind)
{
return (static_cast<uint32_t>(funcKind) & SENDABLE_FUNCTION_MASK) != 0;
}
bool PUBLIC_API IsFirstMergedAbc() const;
const void *GetBase() const

View File

@ -282,7 +282,7 @@ public:
return HasDebuggerStmtBit::Decode(extraLiteralInfo_);
}
void SetIsSharedBit(bool isShared)
void SetIsShared(bool isShared)
{
extraLiteralInfo_ = IsSharedBit::Update(extraLiteralInfo_, isShared);
}

View File

@ -81,7 +81,7 @@ void PandaFileTranslator::TranslateClasses(const JSThread *thread, JSPandaFile *
panda_file::IndexAccessor indexAccessor(*pf, methodId);
panda_file::FunctionKind funcKind = indexAccessor.GetFunctionKind();
bool isShared = JSPandaFile::IsSendableFunctionKind(funcKind);
methodLiteral->SetIsSharedBit(isShared);
methodLiteral->SetIsShared(isShared);
FunctionKind kind = JSPandaFile::GetFunctionKind(funcKind);
methodLiteral->SetFunctionKind(kind);
} else {

View File

@ -564,7 +564,7 @@ void PGOProfiler::HandlePGOPreDump()
return;
}
auto func = JSFunction::Cast(funcValue);
if (func->IsSendableFunction()) {
if (func->IsSendableOrConcurrentFunction()) {
return;
}
JSTaggedValue methodValue = func->GetMethod();
@ -610,7 +610,7 @@ void PGOProfiler::HandlePGODumpByDumpThread(bool force)
continue;
}
auto func = JSFunction::Cast(value);
if (func->IsSendableFunction()) {
if (func->IsSendableOrConcurrentFunction()) {
current = PopFromProfileQueue();
continue;
}
@ -685,7 +685,7 @@ void PGOProfiler::ProfileBytecode(ApEntityId abcId, const CString &recordName, J
{
ECMA_BYTRACE_NAME(HITRACE_TAG_ARK, "PGOProfiler::ProfileBytecode");
JSFunction *function = JSFunction::Cast(funcValue);
if (function->IsSendableFunction()) {
if (function->IsSendableOrConcurrentFunction()) {
return;
}
Method *method = Method::Cast(function->GetMethod());