(context, builder, sig, args, result)
Implementation of iternext() for the StringArrayIterator type
    :param context: context descriptor
    :param builder: llvmlite IR Builder
    :param sig: iterator signature
    :param args: tuple with iterator arguments, such as instruction, operands and types
    :param result: iternext result
Implementation of iternext() for the StringArrayIterator type
    :param context: context descriptor
    :param builder: llvmlite IR Builder
    :param sig: iterator signature
    :param args: tuple with iterator arguments, such as instruction, operands and types
    :param result: iternext result
Implementation of iternext () for the StringArrayIterator type : param context : context descriptor : param builder : llvmlite IR Builder : param sig : iterator signature : param args : tuple with iterator arguments such as instruction operands and types : param result : iternext result
def iternext_str_array(context, builder, sig, args, result):
    """
    Implementation of iternext() for the StringArrayIterator type
    :param context: context descriptor
    :param builder: llvmlite IR Builder
    :param sig: iterator signature
    :param args: tuple with iterator arguments, such as instruction, operands and types
    :param result: iternext result
    """

    [itertype] = sig.args
    [iter_arg] = args

    iterobj = context.make_helper(builder, itertype, value=iter_arg)
    len_sig = signature(types.intp, string_array_type)
    nitems = context.compile_internal(builder, lambda a: len(a), len_sig, [iterobj.array])

    index = builder.load(iterobj.index)
    is_valid = builder.icmp(lc.ICMP_SLT, index, nitems)
    result.set_valid(is_valid)

    with builder.if_then(is_valid):
        getitem_sig = signature(string_type, string_array_type, types.intp)
        value = context.compile_internal(builder, lambda a, i: a[i], getitem_sig, [iterobj.array, index])
        result.yield_(value)
        nindex = cgutils.increment_index(builder, index)
        builder.store(nindex, iterobj.index)
def iternext_str_array ( context , builder , sig , args , result ) : [ itertype ] = sig . args [ iter_arg ] = args iterobj = context . make_helper ( builder , itertype , value = iter_arg ) len_sig = signature ( types . intp , string_array_type ) nitems = context . compile_internal ( builder , lambda a : len ( a ) , len_sig , [ iterobj . array ] ) index = builder . load ( iterobj . index ) is_valid = builder . icmp ( lc . ICMP_SLT , index , nitems ) result . set_valid ( is_valid ) with builder . if_then ( is_valid ) : getitem_sig = signature ( string_type , string_array_type , types . intp ) value = context . compile_internal ( builder , lambda a , i : a [ i ] , getitem_sig , [ iterobj . array , index ] ) result . yield_ ( value ) nindex = cgutils . increment_index ( builder , index ) builder . store ( nindex , iterobj . index )