mirror of
https://gitee.com/openharmony/arkcompiler_ets_runtime
synced 2025-02-25 23:08:22 +00:00
cleancode-z
Issue:#IADK36 description:cleancode Signed-off-by: zy <zy15615632452@163.com>
This commit is contained in:
parent
b10b6d5f17
commit
0214cebab3
@ -2084,7 +2084,7 @@ void GraphColorRegAllocator::LocalRaForEachUseOperand(const Insn &insn, LocalReg
|
||||
if (base != nullptr) {
|
||||
HandleLocalReg(*base, localRa, bbInfo, false, true);
|
||||
}
|
||||
if (!memOpnd.IsIntactIndexed()) {
|
||||
if (!memOpnd.IsIntactIndexed() && base != nullptr) {
|
||||
HandleLocalReg(*base, localRa, bbInfo, true, true);
|
||||
}
|
||||
if (offset != nullptr) {
|
||||
|
@ -1686,6 +1686,7 @@ void Emitter::EmitIntConst(const MIRSymbol &mirSymbol, MIRAggConst &aggConst, ui
|
||||
EmitScalarConstant(*elemConst, false);
|
||||
}
|
||||
#else
|
||||
ASSERT_NOT_NULL(elemConst);
|
||||
EmitScalarConstant(*elemConst, false);
|
||||
#endif /* USE_32BIT_REF */
|
||||
Emit("\n");
|
||||
|
@ -760,8 +760,10 @@ void AddroffuncNode::Dump(int32) const
|
||||
LogInfo::MapleLogger() << kOpcodeInfo.GetTableItemAt(GetOpCode()).name << " " << GetPrimTypeName(GetPrimType());
|
||||
MIRFunction *func = GlobalTables::GetFunctionTable().GetFunctionFromPuidx(puIdx);
|
||||
CHECK_FATAL(func != nullptr, "null ptr");
|
||||
LogInfo::MapleLogger() << " &"
|
||||
<< GlobalTables::GetGsymTable().GetSymbolFromStidx(func->GetStIdx().Idx())->GetName();
|
||||
MIRSymbol *symbol = GlobalTables::GetGsymTable().GetSymbolFromStidx(func->GetStIdx().Idx());
|
||||
if (symbol != nullptr) {
|
||||
LogInfo::MapleLogger() << " &" << symbol->GetName();
|
||||
}
|
||||
}
|
||||
|
||||
void AddroflabelNode::Dump(int32) const
|
||||
|
@ -198,7 +198,7 @@ JSFunction *JitCompilationEnv::GetJsFunctionByMethodOffset(uint32_t methodOffset
|
||||
} while (calleeOffset != currMethodOffset);
|
||||
JSFunction *currFunc = *jsFunction_;
|
||||
ProfileTypeInfo *currFuncPTI = *profileTypeInfo_;
|
||||
for (int i = funcSlotChain.size() - 1; i >= 0; --i) {
|
||||
for (int i = static_cast<int>(funcSlotChain.size()) - 1; i >= 0; --i) {
|
||||
uint32_t slotId = funcSlotChain[i].first;
|
||||
uint32_t callerOffset = funcSlotChain[i].second;
|
||||
if (Method::Cast(currFunc->GetMethod())->GetMethodId().GetOffset() != callerOffset) {
|
||||
|
@ -361,7 +361,7 @@ void JITProfiler::ConvertCall(uint32_t slotId, long bcOffset)
|
||||
} else if (slotValue.IsJSFunction()) {
|
||||
JSFunction *callee = JSFunction::Cast(slotValue);
|
||||
Method *calleeMethod = Method::Cast(callee->GetMethod());
|
||||
calleeMethodId = calleeMethod->GetMethodId().GetOffset();
|
||||
calleeMethodId = static_cast<int>(calleeMethod->GetMethodId().GetOffset());
|
||||
calleeAbcId = PGOProfiler::GetMethodAbcId(callee);
|
||||
static_cast<JitCompilationEnv *>(compilationEnv_)
|
||||
->UpdateFuncSlotIdMap(calleeMethodId, methodId_.GetOffset(), slotId);
|
||||
|
@ -52,7 +52,7 @@ public:
|
||||
{
|
||||
LockHolder lock(jitTaskPoolMutex_);
|
||||
compilerVm_ = vm;
|
||||
threadId_ = compilerVm_->GetJSThread()->GetThreadId();
|
||||
threadId_ = static_cast<int32_t>(compilerVm_->GetJSThread()->GetThreadId());
|
||||
jitTaskPoolCV_.SignalAll();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user