# Copyright (c) 2021-2024 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# This file describes copmiler-to-runtime entrypoints.
# Fields:
#  * properties:
#    - no_return: entrypoint doesn't jump back to the caller.
#    - external: don't generate entrypoint and bridge declarations, initialize table's element by nullptr.
#    - irtoc: entrypoint is generated by irtoc tool
#    - intrinsic: this is call of intrinsic wrapped in entrypoint bridge
#  * signature: signature of the entrypoint, the first element is the return value, the rest are arguments.
#  * entrypoint: entrypoint function name.

entrypoints:
- name: Deoptimize
  entrypoint: DeoptimizeEntrypoint
  bridge: entrypoint
  properties: [no_return]
  signature:
  - void
  - uint64_t

- name: AbstractMethodError
  entrypoint: AbstractMethodErrorEntrypoint
  bridge: entrypoint
  properties: [no_return]
  signature:
  - void
  - ark::Method*

- name: AnnotateSanitizers
  entrypoint: AnnotateSanitizersEntrypoint
  bridge: entrypoint
  properties: []
  signature:
  - void
  - void const*
  - size_t

- name: AnnotateSanitizersNoBridge
  entrypoint: AnnotateSanitizersEntrypoint
  bridge: none
  properties: []
  signature:
  - void
  - void const*
  - size_t

- name: CheckCast
  entrypoint: CheckCastEntrypoint
  bridge: entrypoint
  properties: []
  signature:
  - void
  - const ark::ObjectHeader*
  - ark::Class*

- name: CheckCastSlowPath
  entrypoint: CheckCastEntrypoint
  bridge: slow_path
  properties: []
  signature:
  - void
  - const ark::ObjectHeader*
  - ark::Class*

- name: CheckCastDeoptimize
  entrypoint: CheckCastDeoptimizeEntrypoint
  bridge: entrypoint
  properties: []
  signature:
  - void
  - const ark::ObjectHeader*
  - ark::Class*

- name: CheckCastInterface
  entrypoint: CheckCastInterfaceEntrypoint
  bridge: none
  properties: [irtoc]
  signature:
  - void
  - const ark::ObjectHeader*
  - ark::Class*

- name: CheckStoreArrayReference
  entrypoint: CheckStoreArrayReferenceEntrypoint
  bridge: entrypoint
  properties: []
  signature:
  - void
  - ark::coretypes::Array*
  - ark::ObjectHeader*

- name: CheckStoreArrayReferenceDeoptimize
  entrypoint: CheckStoreArrayReferenceDeoptimizeEntrypoint
  bridge: entrypoint
  properties: []
  signature:
  - void
  - ark::coretypes::Array*
  - ark::ObjectHeader*

- name: ArithmeticException
  entrypoint: ArithmeticExceptionEntrypoint
  bridge: entrypoint
  properties: [no_return]
  signature:
  - void

- name: ArrayIndexOutOfBoundsException
  entrypoint: ArrayIndexOutOfBoundsExceptionEntrypoint
  bridge: entrypoint
  properties: [no_return]
  signature:
  - void
  - ssize_t
  - size_t

- name: StringIndexOutOfBoundsException
  entrypoint: StringIndexOutOfBoundsExceptionEntrypoint
  bridge: entrypoint
  properties: [no_return]
  signature:
  - void
  - ssize_t
  - size_t

- name: ClassCastException
  entrypoint: ClassCastExceptionEntrypoint
  bridge: entrypoint
  properties: [no_return]
  signature:
  - void
  - ark::Class*
  - ark::ObjectHeader*

- name: NegativeArraySizeException
  entrypoint: NegativeArraySizeExceptionEntrypoint
  bridge: entrypoint
  properties: [no_return]
  signature:
  - void
  - ssize_t

- name: NullPointerException
  entrypoint: NullPointerExceptionEntrypoint
  bridge: entrypoint
  properties: [no_return]
  signature:
  - void

- name: StackOverflowException
  entrypoint: StackOverflowExceptionEntrypoint
  bridge: entrypoint
  properties: [no_return]
  signature:
  - void

- name: ThrowException
  entrypoint: ThrowExceptionEntrypoint
  bridge: entrypoint
  properties: [no_return]
  signature:
  - void
  - ark::ObjectHeader*

- name: CreateEmptyString
  entrypoint: CreateEmptyStringEntrypoint
  bridge: entrypoint
  properties: []
  signature:
  - ark::coretypes::String*

- name: CreateEmptyStringSlowPath
  entrypoint: CreateEmptyStringEntrypoint
  bridge: slow_path
  properties: []
  signature:
  - ark::coretypes::String*

- name: CreateEmptyString1Arg
  entrypoint: CreateEmptyStringEntrypoint
  bridge: odd_saved1
  properties: []
  signature:
  - ark::coretypes::String*

- name: CreateStringFromChars
  entrypoint: CreateStringFromCharsEntrypoint
  bridge: entrypoint
  properties: []
  signature:
  - ark::coretypes::String*
  - ark::ObjectHeader*

- name: CreateStringFromString
  entrypoint: CreateStringFromStringEntrypoint
  bridge: entrypoint
  properties: []
  signature:
  - ark::coretypes::String*
  - ark::ObjectHeader*

- name: CreateMultiArray
  entrypoint: CreateMultiArrayEntrypoint
  bridge: entrypoint
  properties: []
  signature:
  - ark::coretypes::Array*
  - ark::Class*
  - uint32_t
  - size_t*

- name: ResolveLiteralArray
  entrypoint: ResolveLiteralArrayEntrypoint
  bridge: entrypoint
  properties: []
  signature:
  - ark::coretypes::Array*
  - const ark::Method*
  - uint32_t

- name: CreateObjectByClass
  entrypoint: CreateObjectByClassEntrypoint
  bridge: entrypoint
  properties: []
  signature:
  - ark::ObjectHeader*
  - ark::Class*

- name: CloneObject
  entrypoint: CloneObjectEntrypoint
  bridge: entrypoint
  properties: []
  signature:
  - ark::ObjectHeader*
  - ark::ObjectHeader*

- name: PostBarrierWrite
  entrypoint: PostBarrierWriteEntrypoint
  bridge: entrypoint
  properties: []
  signature:
  - ark::ObjectHeader*
  - ark::ObjectHeader*
  - size_t

- name: Safepoint
  entrypoint: SafepointEntrypoint
  bridge: entrypoint
  properties: []
  signature:
  - void

- name: GetCalleeMethod
  entrypoint: GetCalleeMethodEntrypoint
  bridge: entrypoint
  properties: []
  signature:
  - ark::Method*
  - const ark::Method*
  - size_t

- name: GetCalleeMethodDirect
  entrypoint: GetCalleeMethodEntrypoint
  bridge: none
  properties: []
  signature:
  - ark::Method*
  - const ark::Method*
  - size_t

- name: GetUnknownCalleeMethod
  entrypoint: GetUnknownCalleeMethodEntrypoint
  bridge: entrypoint
  properties: []
  signature:
  - ark::Method*
  - const ark::Method*
  - size_t
  - size_t*

- name: GetFieldOffset
  entrypoint: GetFieldOffsetEntrypoint
  bridge: entrypoint
  properties: []
  signature:
  - size_t
  - ark::Method*
  - uint32_t

- name: GetStaticFieldAddress
  entrypoint: GetStaticFieldAddressEntrypoint
  bridge: entrypoint
  properties: []
  signature:
  - uintptr_t
  - ark::Method*
  - uint32_t

- name: UnresolvedStoreStaticBarriered
  entrypoint: UnresolvedStoreStaticBarrieredEntrypoint
  bridge: entrypoint
  properties: []
  signature:
  - void
  - ark::Method*
  - uint32_t
  - ark::ObjectHeader*

- name: GetUnknownStaticFieldMemoryAddress
  entrypoint: GetUnknownStaticFieldMemoryAddressEntrypoint
  bridge: entrypoint
  properties: []
  signature:
  - uintptr_t
  - ark::Method*
  - uint32_t
  - size_t*

- name: InitializeClass
  entrypoint: InitializeClassEntrypoint
  bridge: entrypoint
  properties: []
  signature:
  - void
  - ark::Class*

- name: InitializeClassById
  entrypoint: InitializeClassByIdEntrypoint
  bridge: entrypoint
  properties: []
  signature:
  - ark::Class*
  - const ark::Method*
  - ark::FileEntityId

- name: InitializeClassByIdDirect
  entrypoint: InitializeClassByIdEntrypoint
  bridge: none
  properties: []
  signature:
  - ark::Class*
  - const ark::Method*
  - ark::FileEntityId

- name: IsInstance
  entrypoint: IsInstanceEntrypoint
  bridge: entrypoint
  properties: []
  signature:
  - uint8_t
  - ark::ObjectHeader*
  - ark::Class*

- name: PostWrbUpdateCardFuncNoBridge
  entrypoint: PostWrbUpdateCardFuncEntrypoint
  bridge: none
  properties: []
  signature:
  - void
  - const void*
  - const void*

- name: ResolveClass
  entrypoint: ResolveClassEntrypoint
  bridge: entrypoint
  properties: []
  signature:
  - ark::Class*
  - const ark::Method*
  - ark::FileEntityId

- name: ResolveClassDirect
  entrypoint: ResolveClassEntrypoint
  bridge: none
  properties: []
  signature:
  - ark::Class*
  - const ark::Method*
  - ark::FileEntityId

- name: ResolveClassObject
  entrypoint: ResolveClassObjectEntrypoint
  bridge: entrypoint
  properties: []
  signature:
  - ark::ObjectHeader*
  - const ark::Method*
  - ark::FileEntityId

- name: ResolveString
  entrypoint: ResolveStringEntrypoint
  bridge: entrypoint
  properties: []
  signature:
  - ark::coretypes::String*
  - const ark::Method*
  - ark::FileEntityId

- name: ResolveStringAot
  entrypoint: ResolveStringAotEntrypoint
  bridge: entrypoint
  properties: []
  signature:
  - ark::coretypes::String*
  - const ark::Method*
  - ark::FileEntityId
  - ark::ObjectHeader**

- name: ResolveUnknownVirtualCall
  entrypoint: ResolveUnknownVirtualCallEntrypoint
  bridge: entrypoint
  properties: []
  signature:
  - uintptr_t
  - const ark::Method*
  - ark::ObjectHeader*
  - size_t
  - size_t*

- name: ResolveVirtualCallAot
  entrypoint: ResolveVirtualCallAotEntrypoint
  bridge: entrypoint
  properties: []
  signature:
  - uintptr_t
  - const ark::Method*
  - ark::ObjectHeader*
  - size_t
  - uintptr_t

- name: ResolveVirtualCallAotSlowPath
  entrypoint: ResolveVirtualCallAotEntrypoint
  bridge: slow_path
  properties: []
  signature:
  - uintptr_t
  - const ark::Method*
  - ark::ObjectHeader*
  - size_t
  - uintptr_t

- name: ResolveVirtualCall
  entrypoint: ResolveVirtualCallEntrypoint
  bridge: entrypoint
  properties: []
  signature:
  - uintptr_t
  - const ark::Method*
  - ark::ObjectHeader*

- name: Trace
  entrypoint: TraceEntrypoint
  bridge: entrypoint
  properties: []
  signature:
  - void
  - size_t pid
  - ...

- name: WriteTlabStats
  entrypoint: WriteTlabStatsEntrypoint
  bridge: entrypoint
  properties: []
  signature:
  - void
  - void const*
  - size_t

- name: WriteTlabStatsNoBridge
  entrypoint: WriteTlabStatsEntrypoint
  bridge: none
  properties: []
  signature:
  - void
  - void const*
  - size_t

- name: LockObject
  entrypoint: LockObjectEntrypoint
  bridge: entrypoint
  properties: []
  signature:
  - void
  - ark::ObjectHeader*

- name: UnlockObject
  entrypoint: UnlockObjectEntrypoint
  bridge: entrypoint
  properties: []
  signature:
  - void
  - ark::ObjectHeader*

- name: IncompatibleClassChangeErrorForMethodConflict
  entrypoint: IncompatibleClassChangeErrorForMethodConflictEntrypoint
  bridge: none
  properties: [no_return]
  signature:
  - void
  - ark::Method*

- name: AllocateObjectTlab
  entrypoint: AllocateObjectTlab
  bridge: none
  properties: [irtoc]
  signature:
  - ark::ObjectHeader*
  - ark::Class*
  - size_t

- name: CreateObjectByClassSlowPath
  entrypoint: CreateObjectByClassEntrypoint
  bridge: slow_path
  properties: []
  signature:
  - ark::ObjectHeader*
  - ark::Class*

- name: AllocateArrayTlab8
  entrypoint: AllocateArrayTlab8
  bridge: none
  properties: [irtoc]
  signature:
    - ark::coretypes::Array*
    - ark::Class*
    - size_t

- name: AllocateArrayTlab16
  entrypoint: AllocateArrayTlab16
  bridge: none
  properties: [irtoc]
  signature:
    - ark::coretypes::Array*
    - ark::Class*
    - size_t

- name: AllocateArrayTlab32
  entrypoint: AllocateArrayTlab32
  bridge: none
  properties: [irtoc]
  signature:
    - ark::coretypes::Array*
    - ark::Class*
    - size_t

- name: AllocateArrayTlab64
  entrypoint: AllocateArrayTlab64
  bridge: none
  properties: [irtoc]
  signature:
    - ark::coretypes::Array*
    - ark::Class*
    - size_t

- name: CreateArray
  entrypoint: CreateArraySlowPathEntrypoint
  bridge: entrypoint
  properties: []
  signature:
    - ark::coretypes::Array*
    - ark::Class*
    - size_t

- name: CreateArraySlowPath
  entrypoint: CreateArraySlowPathEntrypoint
  bridge: slow_path
  properties: []
  signature:
    - ark::coretypes::Array*
    - ark::Class*
    - size_t

- name: ClassResolver
  entrypoint: ClassResolver
  bridge: none
  properties: [irtoc]
  signature:
    - ark::Class*
    - void*

- name: ClassInitResolver
  entrypoint: ClassInitResolver
  bridge: none
  properties: [irtoc]
  signature:
    - ark::Class*
    - void*

- name: CallVirtualResolver
  entrypoint: CallVirtualResolver
  bridge: none
  properties: [irtoc]
  signature:
    - void*

- name: IntfInlineCache
  entrypoint: IntfInlineCache
  bridge: none
  properties: [irtoc]
  signature:
    - ark::Method*
    - const ark::Method*
    - ark::ObjectHeader*
    - size_t
    - void*

- name: MonitorEnterFastPath
  entrypoint: MonitorEnterFastPath
  bridge: none
  properties: [irtoc]
  signature:
    - void
    - ark::ObjectHeader*

- name: MonitorExitFastPath
  entrypoint: MonitorExitFastPath
  bridge: none
  properties: [irtoc]
  signature:
    - void
    - ark::ObjectHeader*

- name: EmptyPostWriteBarrier
  entrypoint: EmptyPostWriteBarrier
  bridge: none
  properties: [irtoc]
  signature:
    - void

- name: PostInterGenerationalBarrier0
  entrypoint: PostInterGenerationalBarrier0
  bridge: none
  properties: [irtoc]
  signature:
    - void
    - ark::ObjectHeader*

- name: PostInterGenerationalBarrier1
  entrypoint: PostInterGenerationalBarrier1
  bridge: none
  properties: [irtoc]
  signature:
    - void
    - ark::ObjectHeader*
    - size_t
    - ark::ObjectHeader*

- name: PostInterGenerationalBarrier2
  entrypoint: PostInterGenerationalBarrier2
  bridge: none
  properties: [irtoc]
  signature:
    - void
    - ark::ObjectHeader*
    - size_t
    - ark::ObjectHeader*
    - ark::ObjectHeader*

- name: PostInterRegionBarrierMarkSingleFast
  entrypoint: PostInterRegionBarrierMarkSingleFast
  bridge: none
  properties: [irtoc]
  signature:
    - void
    - ark::ObjectHeader*
    - size_t
    - ark::ObjectHeader*

- name: PostInterRegionBarrierMarkPairFast
  entrypoint: PostInterRegionBarrierMarkPairFast
  bridge: none
  properties: [irtoc]
  signature:
    - void
    - ark::ObjectHeader*
    - size_t
    - ark::ObjectHeader*
    - ark::ObjectHeader*

- name: PostInterRegionBarrierSlow
  entrypoint: PostInterRegionBarrierSlow
  bridge: none
  properties: [irtoc]
  signature:
    - void
    - ark::ObjectHeader*

- name: PostInterRegionBarrierTwoCardsSlow
  entrypoint: PostInterRegionBarrierTwoCardsSlow
  bridge: none
  properties: [irtoc]
  signature:
    - void
    - ark::ObjectHeader*

- name: MonitorEnterOddSaved
  entrypoint: LockObjectSlowPathEntrypoint
  bridge: odd_saved
  properties: []
  signature:
    - void
    - ark::ObjectHeader*

- name: MonitorExitOddSaved
  entrypoint: UnlockObjectSlowPathEntrypoint
  bridge: odd_saved
  properties: []
  signature:
    - void
    - ark::ObjectHeader*

- name: MonitorEnterSlowPath
  entrypoint: LockObjectSlowPathEntrypoint
  bridge: slow_path
  properties: []
  signature:
    - void
    - ark::ObjectHeader*

- name: MonitorExitSlowPath
  entrypoint: UnlockObjectSlowPathEntrypoint
  bridge: slow_path
  properties: []
  signature:
    - void
    - ark::ObjectHeader*

- name: JsCastDoubleToInt32NoBridge
  entrypoint: JsCastDoubleToInt32
  bridge: none
  properties: []
  signature:
    - int32_t
    - double

- name: JsCastDoubleToInt32
  entrypoint: JsCastDoubleToInt32Entrypoint
  bridge: entrypoint
  properties: []
  signature:
    - int32_t
    - uint64_t

- name: ExpandCompiledCodeArgsDyn
  entrypoint: ExpandCompiledCodeArgsDyn
  bridge: none
  properties: []
  signature:
    - void
    - ark::Method*
    - uint32_t
    - uint32_t

- name: StringEquals
  entrypoint: StringEquals
  bridge: none
  properties: [irtoc]
  signature:
    - uint8_t
    - ark::coretypes::String*
    - ark::coretypes::String*

- name: StringEqualsCompressed
  entrypoint: StringEqualsCompressed
  bridge: none
  properties: [irtoc]
  signature:
    - uint8_t
    - ark::coretypes::String*
    - ark::coretypes::String*

- name: StringEqualsUnroll
  entrypoint: StringEqualsUnroll
  bridge: none
  properties: [irtoc]
  signature:
    - uint8_t
    - ark::coretypes::String*
    - ark::coretypes::String*

- name: StringEqualsUnrollCompressed
  entrypoint: StringEqualsUnrollCompressed
  bridge: none
  properties: [irtoc]
  signature:
    - uint8_t
    - ark::coretypes::String*
    - ark::coretypes::String*

- name: StringBuilderBool
  entrypoint: StringBuilderBool
  bridge: none
  properties: [irtoc]
  signature:
    - ark::coretypes::String*
    - ark::coretypes::String*
    - uint8_t

- name: StringBuilderChar
  entrypoint: StringBuilderChar
  bridge: none
  properties: [irtoc]
  signature:
    - ark::coretypes::String*
    - ark::coretypes::String*
    - uint16_t

- name: StringBuilderString
  entrypoint: StringBuilderString
  bridge: none
  properties: [irtoc]
  signature:
    - ark::coretypes::String*
    - ark::coretypes::String*
    - ark::coretypes::String*

- name: StringBuilderStringCompressed
  entrypoint: StringBuilderStringCompressed
  bridge: none
  properties: [irtoc]
  signature:
    - ark::coretypes::String*
    - ark::coretypes::String*
    - ark::coretypes::String*

- name: StringBuilderStringSlowPath
  entrypoint: CoreStringBuilderString
  bridge: slow_path
  properties: []
  signature:
    - ark::ObjectHeader*
    - ark::ObjectHeader*
    - void*

- name: StringBuilderStringUsual
  entrypoint: CoreStringBuilderString
  bridge: entrypoint
  properties: []
  signature:
    - ark::ObjectHeader*
    - ark::ObjectHeader*
    - void*

- name: StringBuilderCharSlowPath
  entrypoint: CoreStringBuilderChar
  bridge: slow_path
  properties: []
  signature:
    - ark::ObjectHeader*
    - ark::ObjectHeader*
    - uint16_t

- name: StringBuilderCharUsual
  entrypoint: CoreStringBuilderChar
  bridge: entrypoint
  properties: []
  signature:
    - ark::ObjectHeader*
    - ark::ObjectHeader*
    - uint16_t

- name: StringBuilderBoolSlowPath
  entrypoint: CoreStringBuilderBool
  bridge: slow_path
  properties: []
  signature:
    - ark::ObjectHeader*
    - ark::ObjectHeader*
    - uint8_t

- name: StringBuilderBoolUsual
  entrypoint: CoreStringBuilderBool
  bridge: entrypoint
  properties: []
  signature:
    - ark::ObjectHeader*
    - ark::ObjectHeader*
    - uint8_t

- name: CoreStringBuilderInt
  entrypoint: CoreStringBuilderInt
  bridge: entrypoint
  properties: []
  signature:
    - ark::ObjectHeader*
    - ark::ObjectHeader*
    - int32_t

- name: CoreStringBuilderLong
  entrypoint: CoreStringBuilderLong
  bridge: entrypoint
  properties: []
  signature:
    - ark::ObjectHeader*
    - ark::ObjectHeader*
    - int64_t

- name: StringHashCode
  entrypoint: StringHashCode
  bridge: none
  properties: [irtoc]
  signature:
    - uint32_t                 # resulting hashcode
    - ark::coretypes::String*  # src string

- name: StringHashCodeCompressed
  entrypoint: StringHashCodeCompressed
  bridge: none
  properties: [irtoc]
  signature:
    - uint32_t                 # resulting hashcode
    - ark::coretypes::String*  # src string

- name: CreateStringFromStringTlab
  entrypoint: CreateStringFromStringTlab
  bridge: none
  properties: [irtoc]
  signature:
    - ark::coretypes::String*  # resulting string
    - ark::coretypes::String*  # src string

- name: CreateStringFromStringTlabCompressed
  entrypoint: CreateStringFromStringTlabCompressed
  bridge: none
  properties: [irtoc]
  signature:
    - ark::coretypes::String*  # resulting string
    - ark::coretypes::String*  # src string

- name: CreateStringFromStringSlowPath
  entrypoint: CreateStringFromStringEntrypoint
  bridge: slow_path
  properties: []
  signature:
    - ark::ObjectHeader*  # resulting string
    - ark::ObjectHeader*  # src string

- name: CreateStringFromStringOddSaved
  entrypoint: CreateStringFromStringEntrypoint
  bridge: odd_saved
  properties: []
  signature:
    - ark::ObjectHeader*  # resulting string
    - ark::ObjectHeader*  # src string

- name: CreateStringFromCharArrayTlab
  entrypoint: CreateStringFromCharArrayTlab
  bridge: none
  properties: [irtoc]
  signature:
    - ark::coretypes::String*  # resulting string
    - uint32_t                 # offset
    - uint32_t                 # length
    - ark::ObjectHeader*       # u16 array
    - ark::Class*              # string class pointer

- name: CreateStringFromCharArrayTlabCompressed
  entrypoint: CreateStringFromCharArrayTlabCompressed
  bridge: none
  properties: [irtoc]
  signature:
    - ark::coretypes::String*  # resulting string
    - uint32_t                 # offset
    - uint32_t                 # length
    - ark::ObjectHeader*       # u16 array
    - ark::Class*              # string class pointer

- name: CreateStringFromCharArraySlowPath
  entrypoint: CreateStringFromCharsWithOffsetEntrypoint
  bridge: slow_path
  properties: []
  signature:
    - ark::coretypes::String*  # resulting string
    - uint32_t                 # offset
    - uint32_t                 # length
    - ark::ObjectHeader*       # u16 array

- name: CreateStringFromCharArray4Arg
  entrypoint: CreateStringFromCharsWithOffsetEntrypoint
  bridge: odd_saved4
  properties: []
  signature:
    - ark::coretypes::String*  # resulting string
    - uint32_t                 # offset
    - uint32_t                 # length
    - ark::ObjectHeader*       # u16 array

- name: CreateStringFromZeroBasedCharArrayTlab
  entrypoint: CreateStringFromZeroBasedCharArrayTlab
  bridge: none
  properties: [irtoc]
  signature:
    - ark::coretypes::String*  # resulting string
    - uint32_t                 # length
    - ark::ObjectHeader*       # u16 array
    - ark::Class*              # string class pointer

- name: CreateStringFromZeroBasedCharArrayTlabCompressed
  entrypoint: CreateStringFromZeroBasedCharArrayTlabCompressed
  bridge: none
  properties: [irtoc]
  signature:
    - ark::coretypes::String*  # resulting string
    - uint32_t                 # length
    - ark::ObjectHeader*       # u16 array
    - ark::Class*              # string class pointer

- name: CreateStringFromZeroBasedCharArraySlowPath
  entrypoint: CreateStringFromCharsZeroOffsetEntrypoint
  bridge: slow_path
  properties: []
  signature:
    - ark::coretypes::String*  # resulting string
    - uint32_t                 # length
    - ark::ObjectHeader*       # u16 array

- name: CreateStringFromZeroBasedCharArray3Arg
  entrypoint: CreateStringFromCharsZeroOffsetEntrypoint
  bridge: odd_saved3
  properties: []
  signature:
    - ark::coretypes::String*  # resulting string
    - uint32_t                 # length
    - ark::ObjectHeader*       # u16 array

- name: SubStringFromStringTlab
  entrypoint: SubStringFromStringTlab
  bridge: none
  properties: [irtoc]
  signature:
    - ark::coretypes::String*  # resulting string
    - ark::ObjectHeader*       # src string
    - int32_t                  # begin index
    - int32_t                  # end index

- name: SubStringFromStringTlabCompressed
  entrypoint: SubStringFromStringTlabCompressed
  bridge: none
  properties: [irtoc]
  signature:
    - ark::coretypes::String*  # resulting string
    - ark::ObjectHeader*       # src string
    - int32_t                  # begin index
    - int32_t                  # end index

- name: SubStringFromStringSlowPath
  entrypoint: SubStringFromStringEntrypoint
  bridge: slow_path
  properties: []
  signature:
    - ark::coretypes::String*  # resulting string
    - ark::ObjectHeader*       # src string
    - int32_t                  # begin index
    - int32_t                  # end index

- name: SubStringFromStringOddSaved
  entrypoint: SubStringFromStringEntrypoint
  bridge: odd_saved
  properties: []
  signature:
    - ark::coretypes::String*  # resulting string
    - ark::ObjectHeader*       # src string
    - int32_t                  # begin index
    - int32_t                  # end index

- name: StringGetCharsTlab
  entrypoint: StringGetCharsTlab
  bridge: none
  properties: [irtoc]
  signature:
    - ark::coretypes::Array*   # resulting array of utf16 chars
    - ark::ObjectHeader*       # src string
    - int32_t                  # begin index
    - int32_t                  # end index
    - ark::Class*              # Array u16 class pointer

- name: StringGetCharsTlabCompressed
  entrypoint: StringGetCharsTlabCompressed
  bridge: none
  properties: [irtoc]
  signature:
    - ark::coretypes::Array*   # resulting array of utf16 chars
    - ark::ObjectHeader*       # src string
    - int32_t                  # begin index
    - int32_t                  # end index
    - ark::Class*              # Array u16 class pointer

- name: StringGetCharsSlowPath
  entrypoint: StringGetCharsEntrypoint
  bridge: slow_path
  properties: []
  signature:
    - ark::coretypes::Array*   # resulting array of utf16 chars
    - ark::ObjectHeader*       # src string
    - int32_t                  # begin index
    - int32_t                  # end index

- name: StringGetChars4Arg
  entrypoint: StringGetCharsEntrypoint
  bridge: odd_saved4
  properties: []
  signature:
    - ark::coretypes::Array*   # resulting array of utf16 chars
    - ark::ObjectHeader*       # src string
    - int32_t                  # begin index
    - int32_t                  # end index

- name: MemmoveInterposer        # "bridge" to avoid generating the excessive prologue
  entrypoint: MemmoveInterposer
  bridge: none
  properties: [irtoc]
  signature:
    - void
    - void*
    - void*
    - uint32_t

- name: ArrayCopyTo_1b
  entrypoint: ArrayCopyTo1B
  bridge: none
  properties: [irtoc]
  signature:
    - void
    - ark::ObjectHeader*
    - ark::ObjectHeader*
    - int32_t
    - int32_t
    - int32_t

- name: ArrayCopyTo_2b
  entrypoint: ArrayCopyTo2B
  bridge: none
  properties: [irtoc]
  signature:
    - void
    - ark::ObjectHeader*
    - ark::ObjectHeader*
    - int32_t
    - int32_t
    - int32_t

- name: ArrayCopyTo_4b
  entrypoint: ArrayCopyTo4B
  bridge: none
  properties: [irtoc]
  signature:
    - void
    - ark::ObjectHeader*
    - ark::ObjectHeader*
    - int32_t
    - int32_t
    - int32_t

- name: ArrayCopyTo_8b
  entrypoint: ArrayCopyTo8B
  bridge: none
  properties: [irtoc]
  signature:
    - void
    - ark::ObjectHeader*
    - ark::ObjectHeader*
    - int32_t
    - int32_t
    - int32_t

- name: ArraycopyBigloop
  entrypoint: TryBigCopy
  bridge: none
  properties: [irtoc]
  signature:
    - void
    - void*
    - void*
    - int32_t

- name: StringConcat2Tlab
  entrypoint: StringConcat2Tlab
  bridge: none
  properties: [irtoc]
  signature:
    - ark::coretypes::String*
    - ark::coretypes::String*
    - ark::coretypes::String*

- name: StringConcat3Tlab
  entrypoint: StringConcat3Tlab
  bridge: none
  properties: [irtoc]
  signature:
    - ark::coretypes::String*
    - ark::coretypes::String*
    - ark::coretypes::String*
    - ark::coretypes::String*

- name: StringConcat4Tlab
  entrypoint: StringConcat4Tlab
  bridge: none
  properties: [irtoc]
  signature:
    - ark::coretypes::String*
    - ark::coretypes::String*
    - ark::coretypes::String*
    - ark::coretypes::String*
    - ark::coretypes::String*

- name: StringConcat2SlowPath
  entrypoint: CoreStringConcat2
  bridge: slow_path
  properties: []
  signature:
    - ark::coretypes::String*
    - ark::coretypes::String*
    - ark::coretypes::String*

- name: StringConcat3SlowPath
  entrypoint: CoreStringConcat3
  bridge: slow_path
  properties: []
  signature:
    - ark::coretypes::String*
    - ark::coretypes::String*
    - ark::coretypes::String*
    - ark::coretypes::String*

- name: StringConcat4SlowPath
  entrypoint: CoreStringConcat4
  bridge: slow_path
  properties: []
  signature:
    - ark::coretypes::String*
    - ark::coretypes::String*
    - ark::coretypes::String*
    - ark::coretypes::String*
    - ark::coretypes::String*

- name: StringConcat2Usual
  entrypoint: CoreStringConcat2
  bridge: entrypoint
  properties: []
  signature:
    - ark::coretypes::String*
    - ark::coretypes::String*
    - ark::coretypes::String*

- name: StringConcat3OddSaved
  entrypoint: CoreStringConcat3
  bridge: odd_saved
  properties: []
  signature:
    - ark::coretypes::String*
    - ark::coretypes::String*
    - ark::coretypes::String*
    - ark::coretypes::String*

- name: StringConcat4Usual
  entrypoint: CoreStringConcat4
  bridge: entrypoint
  properties: []
  signature:
    - ark::coretypes::String*
    - ark::coretypes::String*
    - ark::coretypes::String*
    - ark::coretypes::String*
    - ark::coretypes::String*

- name: StringCompareTo
  entrypoint: StringCompareTo
  bridge: none
  properties: [irtoc]
  signature:
    - int32_t                  # compare result
    - ark::coretypes::String*  # first string
    - ark::coretypes::String*  # second string
