diff --git a/static_core/plugins/ets/compiler/codegen_intrinsics_ets.cpp b/static_core/plugins/ets/compiler/codegen_intrinsics_ets.cpp index d95297205a23eb151b49086c5913d9cd8ba59ccf..a5f186353226d18e7ff7d5d3ef995c01ebf3f9ac 100644 --- a/static_core/plugins/ets/compiler/codegen_intrinsics_ets.cpp +++ b/static_core/plugins/ets/compiler/codegen_intrinsics_ets.cpp @@ -709,26 +709,21 @@ void Codegen::CreateWriteString(IntrinsicInst *inst, Reg dst, SRCREGS src) { ASSERT(IsCompressedStringsEnabled()); auto entrypointId = EntrypointId::WRITE_STRING_TO_MEM; - CallFastPath(inst, entrypointId, dst, {}, src[FIRST_OPERAND], src[SECOND_OPERAND]); + CallRuntime(inst, entrypointId, dst, {}, src[FIRST_OPERAND], src[SECOND_OPERAND]); } void Codegen::CreateReadString(IntrinsicInst *inst, Reg dst, SRCREGS src) { ASSERT(IsCompressedStringsEnabled()); auto entrypointId = EntrypointId::CREATE_STRING_FROM_MEM; - auto buf = src[FIRST_OPERAND]; - auto len = src[SECOND_OPERAND]; - if (GetGraph()->IsAotMode()) { - auto *enc = GetEncoder(); - auto offset = GetRuntime()->GetStringClassPointerTlsOffset(GetArch()); - ScopedTmpReg klass(enc); - enc->EncodeLdr(klass, false, MemRef(ThreadReg(), offset)); - CallFastPath(inst, entrypointId, dst, {}, buf, len, klass); - } else { - auto klass = GetRuntime()->GetLineStringClass(GetGraph()->GetMethod(), nullptr); - auto klassImm = TypedImm(reinterpret_cast(klass)); - CallFastPath(inst, entrypointId, dst, {}, buf, len, klassImm); - } + CallRuntime(inst, entrypointId, dst, {}, src[FIRST_OPERAND], src[SECOND_OPERAND]); +} + +void Codegen::CreateGetSizeInBytes(IntrinsicInst *inst, Reg dst, SRCREGS src) +{ + ASSERT(IsCompressedStringsEnabled()); + auto entrypointId = EntrypointId::GET_STRING_SIZE_IN_BYTES; + CallRuntime(inst, entrypointId, dst, {}, src[FIRST_OPERAND]); } void Codegen::CreateMapGet([[maybe_unused]] IntrinsicInst *inst, Reg dst, SRCREGS src) diff --git a/static_core/plugins/ets/compiler/intrinsics_ir_build_ets.inl.h b/static_core/plugins/ets/compiler/intrinsics_ir_build_ets.inl.h index 0d18a6649fec68a731cb8c2bdee9eb7ddb62089f..cd59df4d577583694c6dd956e0959e311dc9b8f7 100644 --- a/static_core/plugins/ets/compiler/intrinsics_ir_build_ets.inl.h +++ b/static_core/plugins/ets/compiler/intrinsics_ir_build_ets.inl.h @@ -50,7 +50,6 @@ template void BuildUnsafeIntrinsic(const BytecodeInstruction *bcInst, bool accRead); void BuildUnsafeLoadIntrinsic(const BytecodeInstruction *bcInst, bool accRead); void BuildUnsafeStoreIntrinsic(const BytecodeInstruction *bcInst, bool accRead); -void BuildStringSizeInBytes(const BytecodeInstruction *bcInst, bool accRead); // CC-OFFNXT(G.NAM.01,G.NAM.03) false positive std::tuple BuildTypedArrayLoadDataAndOffset( const BytecodeInstruction *bcInst, ark::compiler::DataType::Type type, bool accRead, bool needBoundCheck); diff --git a/static_core/plugins/ets/compiler/intrinsics_ir_build_static_call_ets.inl b/static_core/plugins/ets/compiler/intrinsics_ir_build_static_call_ets.inl index 30cf80447761c11efb6da549b749953116f25d35..b9b929789f426ff2ec3ec142d2c11bcdb0e889ce 100644 --- a/static_core/plugins/ets/compiler/intrinsics_ir_build_static_call_ets.inl +++ b/static_core/plugins/ets/compiler/intrinsics_ir_build_static_call_ets.inl @@ -113,10 +113,7 @@ case RuntimeInterface::IntrinsicId::INTRINSIC_UNSAFE_MEMORY_READ_NUMBER: { Builder()->BuildUnsafeLoadIntrinsic(bcInst_, ACC_READ); break; } -case RuntimeInterface::IntrinsicId::INTRINSIC_UNSAFE_MEMORY_GET_STRING_SIZE_IN_BYTES: { - Builder()->BuildStringSizeInBytes(bcInst_, ACC_READ); - break; -} +case RuntimeInterface::IntrinsicId::INTRINSIC_UNSAFE_MEMORY_GET_STRING_SIZE_IN_BYTES: case RuntimeInterface::IntrinsicId::INTRINSIC_UNSAFE_MEMORY_READ_STRING: case RuntimeInterface::IntrinsicId::INTRINSIC_UNSAFE_MEMORY_WRITE_STRING: { if (Builder()->IsInBootContext()) { diff --git a/static_core/plugins/ets/compiler/ir_build_intrinsics_ets.cpp b/static_core/plugins/ets/compiler/ir_build_intrinsics_ets.cpp index eb74a26dd8263e346be66e8cf33209f192c779b9..9f1d4ef29c3484a301cb2a8de5526c9721c0479c 100644 --- a/static_core/plugins/ets/compiler/ir_build_intrinsics_ets.cpp +++ b/static_core/plugins/ets/compiler/ir_build_intrinsics_ets.cpp @@ -509,30 +509,4 @@ void InstBuilder::BuildUnsafeStoreIntrinsic(const BytecodeInstruction *bcInst, b BuildUnsafeIntrinsic(bcInst, accRead); } -void InstBuilder::BuildStringSizeInBytes(const BytecodeInstruction *bcInst, bool accRead) -{ - /* ensure the boot context of the caller */ - if (!IsInBootContext()) { - failed_ = true; - return; - } - - auto bcAddr = GetPc(bcInst->GetAddress()); - auto str = GetArgDefinition(bcInst, 0, accRead); - auto runtime = GetRuntime(); - auto graph = GetGraph(); - auto offset = FindOrCreateConstant(runtime->GetStringLengthOffset(graph->GetArch())); - auto one = FindOrCreateConstant(1U); - auto two = FindOrCreateConstant(ark::coretypes::String::STRING_LENGTH_SHIFT); - - auto len = graph->CreateInstLoadNative(DataType::INT32, bcAddr, str, offset); - auto size = graph->CreateInstShr(DataType::INT32, bcAddr, len, two); - auto shift = graph->CreateInstAnd(DataType::INT32, bcAddr, len, one); - auto add = graph->CreateInstAdd(DataType::INT32, bcAddr, size, shift); - auto result = graph->CreateInstShl(DataType::INT32, bcAddr, add, shift); - - AddInstruction(len, size, shift, add, result); - UpdateDefinitionAcc(result); -} - } // namespace ark::compiler diff --git a/static_core/plugins/ets/irtoc_scripts/string.irt b/static_core/plugins/ets/irtoc_scripts/string.irt index 1b6e316c5208562322f94389f84da6b741111b80..f6da6223eae7bbbe66ae90e4951a4d6873de3f38 100644 --- a/static_core/plugins/ets/irtoc_scripts/string.irt +++ b/static_core/plugins/ets/irtoc_scripts/string.irt @@ -1881,95 +1881,3 @@ Label(:SlowPathEntrypoint) Intrinsic(:SLOW_PATH_ENTRY, str, count).AddImm(entrypoint).MethodAsImm("StringRepeatUsualBridge").Terminator.ptr Intrinsic(:UNREACHABLE).Terminator.void if defines.DEBUG } - -function(:WriteStringToMem, - params: {mem: 'i64', str: 'ref'}, - regmap: $full_regmap, - regalloc_set: $panda_mask, - mode: [:FastPath]) { - - if Options.arch == :arm32 - Intrinsic(:UNREACHABLE).Terminator.void - next - end - - check_string_type(str) - - buf := Bitcast(mem).ptr - len := LoadI(str).Imm(Constants::STRING_LENGTH_OFFSET).u32 - utf16 := AndI(len).Imm(1).u32 - len_0 := ShrI(len).Imm(Constants::STRING_LENGTH_SHIFT).u32 - len := len_0 - - If(len, 0).EQ.Unlikely.b { - Goto(:End) - } - - If(utf16, 1).EQ.Unlikely.b { - mark := 0xfeff - StoreI(buf, mark).Imm(0).u16 - len_1 := ShlI(len).Imm(1).u32 - buf_1 := AddI(buf).Imm(2).ptr - } - buf := Phi(buf, buf_1).ptr - len := Phi(len, len_1).u32 - - str_data := AddI(str).Imm(Constants::STRING_DATA_OFFSET).ptr - copy_u8_chars(str_data, buf, len); - - If(utf16, 1).EQ.Unlikely.b { - len_1 := AddI(len).Imm(2).u32 - } - -Label(:End) - len := Phi(len_0, len, len_1).u32 - Return(len).u32 -Label(:SlowPathEntrypoint) - entrypoint = get_entrypoint_offset("WRITE_STRING_TO_MEM_SLOW_PATH") - Intrinsic(:SLOW_PATH_ENTRY, mem, str).AddImm(entrypoint).MethodAsImm("WriteStringToMemUsualBridge").Terminator.u32 - Intrinsic(:UNREACHABLE).Terminator.void if defines.DEBUG -} - -function(:CreateStringFromMem, - params: {buf: 'i64', len: 'i32', klass: 'ref'}, - regmap: $full_regmap, - regalloc_set: $panda_mask, - mode: [:FastPath]) { - - if Options.arch == :arm32 - Intrinsic(:UNREACHABLE).Terminator.void - next - end - - addr := Bitcast(buf).ptr - mark := LoadI(addr).Imm(0).u16 - - If(mark, Cast(0xFEFF).u16).EQ.Unlikely.b { # UTF-16 string - size_1 := SubI(len).Imm(2).i32 - addr_1 := AddI(addr).Imm(2).ptr - } - - size := Phi(len, size_1).i32 - addr := Phi(addr, addr_1).ptr - - str := allocate_string_tlab_no_debug(klass, size) - str_data := AddI(str).Imm(Constants::STRING_DATA_OFFSET).ptr - copy_u8_chars(addr, str_data, size); - size_0 := ShlI(size).Imm(Constants::STRING_LENGTH_SHIFT).u32 - - If(mark, Cast(0xFEFF).u16).EQ.Unlikely.b { # UTF-16 string - size_1 := OrI(ShrI(size_0).Imm(1).u32).Imm(1).u32 - } - - size := Phi(size_0, size_1).u32 - str_len := AddI(str).Imm(Constants::STRING_LENGTH_OFFSET).ptr - StoreI(str_len, size).Imm(0).u32 - - Intrinsic(:DATA_MEMORY_BARRIER_FULL).void - Return(str).ptr - - Label(:SlowPathEntrypoint) - eid = get_entrypoint_offset("CREATE_STRING_FROM_MEM_SLOW_PATH") - Intrinsic(:SLOW_PATH_ENTRY, buf, len).AddImm(eid).MethodAsImm("CreateStringFromMem3ArgBridge").Terminator.ptr - Intrinsic(:UNREACHABLE).Terminator.void if defines.DEBUG -} diff --git a/static_core/plugins/ets/libllvmbackend/ets_llvm_ir_constructor_gen.inl b/static_core/plugins/ets/libllvmbackend/ets_llvm_ir_constructor_gen.inl index 3a5f5148482b7efe3bfe84f3ee8246c1c43798b6..11ed7a167ad60d74a9cbae083704892cce39a504 100644 --- a/static_core/plugins/ets/libllvmbackend/ets_llvm_ir_constructor_gen.inl +++ b/static_core/plugins/ets/libllvmbackend/ets_llvm_ir_constructor_gen.inl @@ -465,27 +465,6 @@ bool LLVMIrConstructor::EmitFloatArrayFillInternal(Inst *inst, RuntimeInterface: return true; } -bool LLVMIrConstructor::EmitReadString(Inst *inst) -{ - auto entryId = RuntimeInterface::EntrypointId::CREATE_STRING_FROM_MEM; - auto buf = GetInputValue(inst, 0); - auto len = GetInputValue(inst, 1); - auto klassOffset = GetGraph()->GetRuntime()->GetStringClassPointerTlsOffset(GetGraph()->GetArch()); - auto klass = llvmbackend::runtime_calls::LoadTLSValue(&builder_, arkInterface_, klassOffset, builder_.getPtrTy()); - - auto result = CreateFastPathCall(inst, entryId, {buf, len, klass}); - - MarkAsAllocation(result); - ValueMapAdd(inst, result); - - return true; -} - -bool LLVMIrConstructor::EmitWriteString(Inst *inst) -{ - return EmitFastPath(inst, RuntimeInterface::EntrypointId::WRITE_STRING_TO_MEM, 2U); -} - static RuntimeInterface::EntrypointId GetArrayFastCopyToRefEntrypointId(mem::BarrierType barrierType) { using EntrypointId = RuntimeInterface::EntrypointId; @@ -500,7 +479,6 @@ static RuntimeInterface::EntrypointId GetArrayFastCopyToRefEntrypointId(mem::Bar return EntrypointId::ARRAY_FAST_COPY_TO_REF_SYNC; } } - bool LLVMIrConstructor::EmitArrayFastCopyToRef(Inst *inst) { if (GetGraph()->GetArch() == Arch::AARCH32) { diff --git a/static_core/plugins/ets/libllvmbackend/ets_llvm_ir_constructor_h_gen.inl b/static_core/plugins/ets/libllvmbackend/ets_llvm_ir_constructor_h_gen.inl index 14305452c3a9839688f28f96c64b874b0b4520a5..feb09a74384320c5197f5b7b0abbb535789758cf 100644 --- a/static_core/plugins/ets/libllvmbackend/ets_llvm_ir_constructor_h_gen.inl +++ b/static_core/plugins/ets/libllvmbackend/ets_llvm_ir_constructor_h_gen.inl @@ -87,9 +87,6 @@ bool EmitBigUInt64ArrayFillInternal(Inst *inst) return EmitFastPath(inst, RuntimeInterface::EntrypointId::BIG_U_INT64_ARRAY_FILL_INTERNAL_FAST_PATH, 4U); } -bool EmitReadString(Inst *inst); -bool EmitWriteString(Inst *inst); - bool EmitInt8ArraySetValuesFromArray(Inst *inst) { return EmitFastPath(inst, RuntimeInterface::EntrypointId::INT8_ARRAY_SET_VALUES_FROM_ARRAY, 2U); diff --git a/static_core/plugins/ets/runtime/ets_entrypoints.cpp b/static_core/plugins/ets/runtime/ets_entrypoints.cpp index 118750e145a51f287023ea0f74346f113354bd54..96f773bb7155130f97674deaa7eb34b70a61c719 100644 --- a/static_core/plugins/ets/runtime/ets_entrypoints.cpp +++ b/static_core/plugins/ets/runtime/ets_entrypoints.cpp @@ -491,4 +491,33 @@ extern "C" coretypes::String *CreateStringFromCharCodeSingleEntrypoint(uint64_t return EtsString::CreateNewStringFromCharCode(bit_cast(charCode))->GetCoreType(); } +extern "C" int32_t WriteStringToMem(int64_t buf, ObjectHeader *s) +{ + auto str = reinterpret_cast(s); + auto addr = reinterpret_cast(buf); + auto size = static_cast(str->GetUtf8Length()); + + if (str->IsUtf16()) { + if (size != str->CopyDataRegionUtf8(addr, 0, size, size)) { + return -1; + } + } else { + if (memcpy_s(addr, size, str->GetDataMUtf8(), size) != 0) { + return -1; + } + } + return size; +} + +extern "C" ObjectHeader *CreateStringFromMem(int64_t buf, int32_t len) +{ + auto str = EtsString::CreateFromUtf8(reinterpret_cast(buf), static_cast(len)); + return reinterpret_cast(str); +} + +extern "C" int32_t GetStringSizeInBytes(ObjectHeader *str) +{ + return reinterpret_cast(str)->GetUtf8Length(); +} + } // namespace ark::ets diff --git a/static_core/plugins/ets/runtime/ets_entrypoints.yaml b/static_core/plugins/ets/runtime/ets_entrypoints.yaml index 5c7b4486051532ab824b8fd54a514e990485679e..4cf352ec520fef77df5980f76707b3be9c7d867e 100644 --- a/static_core/plugins/ets/runtime/ets_entrypoints.yaml +++ b/static_core/plugins/ets/runtime/ets_entrypoints.yaml @@ -1223,58 +1223,29 @@ - name: WriteStringToMem entrypoint: WriteStringToMem - bridge: none - properties: [irtoc] + bridge: entrypoint + properties: [] signature: - int32_t # bytes written - int64_t # serialization buffer - ark::ObjectHeader* # string to serialize -- name: WriteStringToMemSlowPath - entrypoint: UnsafeMemoryWriteString - bridge: slow_path - properties: [intrinsic] - signature: - - int32_t # bytes written - - int64_t # serialization buffer - - ark::ObjectHeader* # string to serialize - -- name: WriteStringToMemUsual - entrypoint: UnsafeMemoryWriteString - bridge: entrypoint - properties: [intrinsic] - signature: - - int32_t # bytes written - - int64_t # serialization buffer - - ark::ObjectHeader* # string to serialize - - name: CreateStringFromMem entrypoint: CreateStringFromMem - bridge: none - properties: [irtoc] + bridge: entrypoint + properties: [] signature: - ark::ObjectHeader* # deserialized string - int64_t # serialization buffer - int32_t # buffer length - - void* # String class object - -- name: CreateStringFromMemSlowPath - entrypoint: UnsafeMemoryReadString - bridge: slow_path - properties: [intrinsic] - signature: - - ark::ObjectHeader* # deserialized string - - void* # serialization buffer - - int32_t # buffer length -- name: CreateStringFromMem3Arg - entrypoint: UnsafeMemoryReadString - bridge: odd_saved3 - properties: [intrinsic] +- name: GetStringSizeInBytes + entrypoint: GetStringSizeInBytes + bridge: entrypoint + properties: [] signature: - - ark::ObjectHeader* # deserialized string - - void* # serialization buffer - - int32_t # buffer length + - int32_t # utf8 size + - ark::ObjectHeader* # String class object - name: Int8ArraySetValuesFromArray entrypoint: Int8ArraySetValuesFromArray diff --git a/static_core/plugins/ets/runtime/ets_libbase_runtime.yaml b/static_core/plugins/ets/runtime/ets_libbase_runtime.yaml index 4a281a2a665ff68dbf7425d5f6ae1ebdbba79254..b4a08ffea1b7b4e34f784573a8de7b6c065cf126 100644 --- a/static_core/plugins/ets/runtime/ets_libbase_runtime.yaml +++ b/static_core/plugins/ets/runtime/ets_libbase_runtime.yaml @@ -4902,9 +4902,7 @@ intrinsics: - i64 - std.core.String impl: ark::ets::intrinsics::UnsafeMemoryWriteString - codegen_arch: [arm64, amd64] codegen_func: CreateWriteString - llvm_codegen_func: EmitWriteString need_param_locations: true clear_flags: [ runtime_call, require_state, can_throw, heap_inv ] @@ -5015,9 +5013,7 @@ intrinsics: - i64 - i32 impl: ark::ets::intrinsics::UnsafeMemoryReadString - codegen_arch: [arm64, amd64] codegen_func: CreateReadString - llvm_codegen_func: EmitReadString need_param_locations: true - name: UnsafeMemoryGetStringSizeInBytes @@ -5029,6 +5025,7 @@ intrinsics: ret: i32 args: - std.core.String + codegen_func: CreateGetSizeInBytes impl: ark::ets::intrinsics::UnsafeMemoryStringGetSizeInBytes clear_flags: [ runtime_call, require_state, can_throw, heap_inv ] diff --git a/static_core/plugins/ets/runtime/intrinsics/unsafe_memory.cpp b/static_core/plugins/ets/runtime/intrinsics/unsafe_memory.cpp index cdbdf88be2cc40d1d7ec1ef9642d49e1d7d64b85..ef8e1ea9e37b95136e1654c7a40b6881fea4a248 100644 --- a/static_core/plugins/ets/runtime/intrinsics/unsafe_memory.cpp +++ b/static_core/plugins/ets/runtime/intrinsics/unsafe_memory.cpp @@ -29,7 +29,14 @@ namespace { /* make sure the class the intrinsic being called from belongs to the boot context */ bool EnsureBootContext() { - auto *coro = EtsCoroutine::GetCurrent(); + [[maybe_unused]] auto *coro = EtsCoroutine::GetCurrent(); + /* if we get here via the compiled code the check has already been done */ +#ifndef NDEBUG + if (!coro->IsRuntimeCallEnabled()) { + return true; + } +#endif +#if 1 auto ctx = StackWalker::Create(coro).GetMethod()->GetClass()->GetLoadContext(); if (!ctx->IsBootContext()) { auto e = panda_file_items::class_descriptors::ILLEGAL_STATE_ERROR; @@ -37,6 +44,7 @@ bool EnsureBootContext() ThrowEtsException(coro, e, msg); return false; } +#endif return true; } @@ -187,9 +195,6 @@ extern "C" void UnsafeMemoryWriteNumber(EtsLong addr, EtsDouble val) UnsafeMemoryWrite(addr, val); } -/* get the size of the buffer to hold the string content add additional - 2 bytes for the leading byte-order mark which is used in the UTF-16 - case */ extern "C" int UnsafeMemoryStringGetSizeInBytes(EtsString *str) { auto coroutine = EtsCoroutine::GetCurrent(); @@ -200,44 +205,22 @@ extern "C" int UnsafeMemoryStringGetSizeInBytes(EtsString *str) return -1; } - str = handle.GetPtr(); - - uint32_t shift = str->IsUtf16() ? 1 : 0; - uint32_t addend = str->IsUtf16() ? 2 : 0; - auto length = static_cast(str->GetLength()); - int size = (length << shift) + addend; - return size; + return handle.GetPtr()->GetUtf8Length(); } -static constexpr uint16_t UTF16_BOM = 0xFEFF; - extern "C" EtsString *UnsafeMemoryReadString(EtsLong buf, int len) { if (!EnsureBootContext()) { return nullptr; } - ObjectHeader *res = nullptr; - auto vm = ManagedThread::GetCurrent()->GetVM(); - auto ctx = Runtime::GetCurrent()->GetLanguageContext(panda_file::SourceLang::ETS); - auto mark = reinterpret_cast(buf); - auto size = static_cast(len); - - if (*mark == UTF16_BOM) { - auto addr = ++mark; - /* size is in bytes but CreateFromUtf16 takes it as chars, so, - we divide it by half and subtract the length of the BOM */ - res = coretypes::String::CreateFromUtf16(addr, (size / 2U) - 1, false, ctx, vm); - } else { - auto addr = reinterpret_cast(buf); - res = coretypes::String::CreateFromMUtf8(addr, size, size, true, ctx, vm); - } - - return reinterpret_cast(res); + return EtsString::CreateFromUtf8(reinterpret_cast(buf), static_cast(len)); } +extern "C" int32_t WriteStringToMem(int64_t buf, ObjectHeader *s); extern "C" int UnsafeMemoryWriteString(EtsLong addrEts, EtsString *str) { + /* we need the scope because EnsureBootContext() will most likely trigger GC */ auto coroutine = EtsCoroutine::GetCurrent(); [[maybe_unused]] HandleScope scope(coroutine); EtsHandle handle(coroutine, str); @@ -247,17 +230,7 @@ extern "C" int UnsafeMemoryWriteString(EtsLong addrEts, EtsString *str) } str = handle.GetPtr(); - - auto addr = reinterpret_cast(addrEts); - auto size = static_cast(str->GetLength()); - if (str->IsUtf16()) { - *reinterpret_cast(addr) = UTF16_BOM; - // NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-pointer-arithmetic) - addr = reinterpret_cast(addr) + 2U; - size <<= 1U; - return memcpy_s(addr, size, str->GetDataUtf16(), size) == 0 ? size + 2U : -1; - } - return memcpy_s(addr, size, str->GetDataMUtf8(), size) == 0 ? size : -1; + return WriteStringToMem(addrEts, reinterpret_cast(str)); } } // namespace ark::ets::intrinsics diff --git a/static_core/plugins/ets/tests/compiler/inst_generator_test_ext.inc b/static_core/plugins/ets/tests/compiler/inst_generator_test_ext.inc index b5fb3ff0bd16505f38b497610c01dc8b4d84dd0a..146f48ad82c4692fedb2774e3d143718c0a627a9 100644 --- a/static_core/plugins/ets/tests/compiler/inst_generator_test_ext.inc +++ b/static_core/plugins/ets/tests/compiler/inst_generator_test_ext.inc @@ -13,7 +13,10 @@ * limitations under the License. */ -if (id == RuntimeInterface::IntrinsicId::INTRINSIC_STD_CORE_SB_APPEND_STRING) { +if (id == RuntimeInterface::IntrinsicId::INTRINSIC_STD_CORE_SB_APPEND_STRING || + id == RuntimeInterface::IntrinsicId::INTRINSIC_UNSAFE_MEMORY_GET_STRING_SIZE_IN_BYTES || + id == RuntimeInterface::IntrinsicId::INTRINSIC_UNSAFE_MEMORY_READ_STRING || + id == RuntimeInterface::IntrinsicId::INTRINSIC_UNSAFE_MEMORY_WRITE_STRING) { // Skip it as this intrinsic requires LocationBuilder to be run successfully. graph->~Graph(); graphCreator_.GetAllocator()->Resize(0U);