mirror of
https://gitee.com/openharmony/arkcompiler_ets_runtime
synced 2024-11-23 01:59:58 +00:00
commit
2d7750591e
@ -27,15 +27,20 @@ TEST(GetTypeFromArgTy_FUNC, t01)
|
||||
{
|
||||
struct IntrinDesc IntrinDesc_struc;
|
||||
IntrinArgType input_ls[] = {kArgTyVoid, kArgTyI8, kArgTyI16, kArgTyI32, kArgTyI64, kArgTyU8,
|
||||
kArgTyU16, kArgTyU32, kArgTyU64, kArgTyU1, kArgTyPtr, kArgTyRef,
|
||||
kArgTyU16, kArgTyU32, kArgTyU64, kArgTyU1,
|
||||
kArgTyA64, kArgTyF32, kArgTyF64};
|
||||
PrimType res_ls[] = {
|
||||
PTY_void, PTY_i8, PTY_i16, PTY_i32, PTY_i64, PTY_u8,
|
||||
PTY_u16, PTY_u32, PTY_u64, PTY_u1,
|
||||
PTY_a64, PTY_f32, PTY_f64
|
||||
};
|
||||
MIRType *mirtype_ptr;
|
||||
int n = sizeof(input_ls) / sizeof(input_ls[0]);
|
||||
for (int i = 0; i < n; i++)
|
||||
{
|
||||
mirtype_ptr = IntrinDesc_struc.GetTypeFromArgTy(input_ls[i]);
|
||||
ASSERT_TRUE(mirtype_ptr != nullptr);
|
||||
mirtype_ptr->GetPrimType();
|
||||
EXPECT_EQ(mirtype_ptr->GetPrimType(), res_ls[i]);
|
||||
}
|
||||
}
|
||||
} // namespace
|
||||
|
@ -24,7 +24,10 @@ namespace panda::ecmascript {
|
||||
JitCompilationEnv::JitCompilationEnv(EcmaVM *jitVm, EcmaVM *jsVm, JSHandle<JSFunction> &jsFunction)
|
||||
: CompilationEnv(jitVm), hostThread_(jsVm->GetJSThreadNoCheck()), jsFunction_(jsFunction)
|
||||
{
|
||||
ptManager_ = hostThread_->GetCurrentEcmaContext()->GetPTManager();
|
||||
if (hostThread_ != nullptr && hostThread_->GetCurrentEcmaContext() != nullptr &&
|
||||
hostThread_->GetCurrentEcmaContext()->GetPTManager() != nullptr) {
|
||||
ptManager_ = hostThread_->GetCurrentEcmaContext()->GetPTManager();
|
||||
}
|
||||
Method *method = Method::Cast(jsFunction->GetMethod().GetTaggedObject());
|
||||
jsPandaFile_ = const_cast<JSPandaFile*>(method->GetJSPandaFile());
|
||||
methodLiteral_ = method->GetMethodLiteral();
|
||||
|
@ -51,11 +51,17 @@ JitFort::~JitFort()
|
||||
{
|
||||
constexpr size_t numRegions = JIT_FORT_REG_SPACE_MAX / DEFAULT_REGION_SIZE;
|
||||
for (size_t i = 0; i < numRegions; i++) {
|
||||
regions_[i]->DestroyFreeObjectSets();
|
||||
delete regions_[i];
|
||||
if (regions_[i] != nullptr) {
|
||||
regions_[i]->DestroyFreeObjectSets();
|
||||
delete regions_[i];
|
||||
}
|
||||
}
|
||||
if (allocator_ != nullptr) {
|
||||
delete allocator_;
|
||||
}
|
||||
if (memDescPool_ != nullptr) {
|
||||
delete memDescPool_;
|
||||
}
|
||||
delete allocator_;
|
||||
delete memDescPool_;
|
||||
PageUnmap(jitFortMem_);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user