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 b4c55015208eb2b316cb0d7a2cbec557dec6edbd..85f679e415fdb561f04c003974c7e59f5dfbe84f 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 01e3be547199f9afba96dc504e861a638a96b704..cefb4f807aeca7cca2cfe879e04ca345b3e6fee4 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); } }