From 38a00a2a2ec278ae94d59b1499e30473a8089ac6 Mon Sep 17 00:00:00 2001 From: xuyuqing Date: Tue, 12 Aug 2025 15:24:03 +0800 Subject: [PATCH] fix diff Issue: ICSK8Z Signed-off-by: xuyuqing --- ecmascript/compiler/codegen/maple/maple_be/src/cg/emit.cpp | 3 ++- ecmascript/compiler/jit_compilation_env.cpp | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ecmascript/compiler/codegen/maple/maple_be/src/cg/emit.cpp b/ecmascript/compiler/codegen/maple/maple_be/src/cg/emit.cpp index b4c5501520..85f679e415 100644 --- a/ecmascript/compiler/codegen/maple/maple_be/src/cg/emit.cpp +++ b/ecmascript/compiler/codegen/maple/maple_be/src/cg/emit.cpp @@ -365,7 +365,7 @@ void Emitter::EmitAsmLabel(const MIRSymbol &mirSymbol, AsmLabel label) std::string align = std::to_string( static_cast( log2(Globals::GetInstance()->GetBECommon()->GetTypeAlign(mirType->GetTypeIndex())))); - else { + } else { std::string align = std::to_string(Globals::GetInstance()->GetBECommon()->GetTypeAlign(mirType->GetTypeIndex())); } @@ -2578,6 +2578,7 @@ void Emitter::EmitGlobalRootList(const MIRSymbol &mirSymbol) CHECK_FATAL(symAddr != nullptr, "nullptr of symAddr"); MIRSymbol *symAddrSym = GlobalTables::GetGsymTable().GetSymbolFromStidx(symAddr->GetSymbolIndex().Idx()); + CHECK_FATAL(symAddrSym != nullptr, "nullptr check"); const std::string &symAddrName = symAddrSym->GetName(); EmitAddressString(symAddrName + "\n"); } else { diff --git a/ecmascript/compiler/jit_compilation_env.cpp b/ecmascript/compiler/jit_compilation_env.cpp index 01e3be5471..cefb4f807a 100644 --- a/ecmascript/compiler/jit_compilation_env.cpp +++ b/ecmascript/compiler/jit_compilation_env.cpp @@ -37,6 +37,7 @@ JitCompilationEnv::JitCompilationEnv(EcmaVM *jitVm, EcmaVM *jsVm, pcStart_ = method->GetBytecodeArray(); abcId_ = PGOProfiler::GetMethodAbcId(thread_, *jsFunction); if (method->GetFunctionKind() == FunctionKind::CLASS_CONSTRUCTOR) { + ASSERT(methodLiteral_ != nullptr); methodLiteral_->SetFunctionKind(FunctionKind::CLASS_CONSTRUCTOR); } } -- Gitee