mirror of
https://gitee.com/openharmony/arkcompiler_ets_runtime
synced 2024-11-23 18:20:04 +00:00
!8054 Fix compilation issues
Merge pull request !8054 from lijiamin/master
This commit is contained in:
commit
b4220d044c
@ -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);
|
||||
|
||||
|
@ -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) {
|
||||
|
@ -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,
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -282,7 +282,7 @@ public:
|
||||
return HasDebuggerStmtBit::Decode(extraLiteralInfo_);
|
||||
}
|
||||
|
||||
void SetIsSharedBit(bool isShared)
|
||||
void SetIsShared(bool isShared)
|
||||
{
|
||||
extraLiteralInfo_ = IsSharedBit::Update(extraLiteralInfo_, isShared);
|
||||
}
|
||||
|
@ -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 {
|
||||
|
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user