Examples of elems()


Examples of org.perl6.nqp.sixmodel.SixModelObject.elems()

        Type[] argTypes = new Type[numArgs];
        for (int i = 0; i < numArgs; i++) {
            argTypes[i] = processType(atpos(argTypesSmo, i, tc).get_str(tc));
        }

        int numExtraArgs = (int) extraArgsSmo.elems(tc);
        MethodType bsmMT = MethodType.methodType(CallSite.class, MethodHandles.Lookup.class,
                java.lang.String.class, MethodType.class);

        Object[] extraArgs = new Object[numExtraArgs];
        for (int i = 0; i < numExtraArgs; i++) {
View Full Code Here

Examples of org.perl6.nqp.sixmodel.SixModelObject.elems()

    public void compose(ThreadContext tc, STable st, SixModelObject repr_info_hash) {
        SixModelObject repr_info = repr_info_hash.at_key_boxed(tc, "attribute");
        CStructREPRData repr_data = new CStructREPRData();

        long mroLength = repr_info.elems(tc);
        List<AttrInfo> attrInfos = new ArrayList<AttrInfo>();
        for (long i = mroLength - 1; i >= 0; i--) {
            SixModelObject entry = repr_info.at_pos_boxed(tc, i);
            SixModelObject attrs = entry.at_pos_boxed(tc, 1);
            long parents = entry.at_pos_boxed(tc, 2).elems(tc);
View Full Code Here

Examples of org.perl6.nqp.sixmodel.SixModelObject.elems()

            SixModelObject entry = repr_info.at_pos_boxed(tc, i);
            SixModelObject attrs = entry.at_pos_boxed(tc, 1);
            long parents = entry.at_pos_boxed(tc, 2).elems(tc);

            if (parents <= 1) {
                long numAttrs = attrs.elems(tc);
                for (long j = 0; j < numAttrs; j++) {
                    SixModelObject attrHash = attrs.at_pos_boxed(tc, j);
                    AttrInfo info = new AttrInfo();
                    info.name = attrHash.at_key_boxed(tc, "name").get_str(tc);
                    info.type = attrHash.at_key_boxed(tc, "type");
View Full Code Here

Examples of org.perl6.nqp.sixmodel.SixModelObject.elems()

        List<SixModelObject> classHandles = new ArrayList<SixModelObject>();
        List<HashMap<String, Integer>> attrIndexes = new ArrayList<HashMap<String, Integer>>();
        List<SixModelObject> autoVivs = new ArrayList<SixModelObject>();
        List<STable> flattenedSTables = new ArrayList<STable>();
        List<AttrInfo> attrInfoList = new ArrayList<AttrInfo>();
        long mroLength = repr_info.elems(tc);
        for (long i = mroLength - 1; i >= 0; i--) {
            SixModelObject entry = repr_info.at_pos_boxed(tc, i);
            SixModelObject type = entry.at_pos_boxed(tc, 0);
            SixModelObject attrs = entry.at_pos_boxed(tc, 1);
            SixModelObject parents = entry.at_pos_boxed(tc, 2);
View Full Code Here

Examples of org.perl6.nqp.sixmodel.SixModelObject.elems()

        KnowHOWREPRInstance body = (KnowHOWREPRInstance)obj;
        body.name = reader.readStr();
       
        body.attributes = new ArrayList<SixModelObject>();
        SixModelObject attrs = reader.readRef();
        long elems = attrs.elems(tc);
        for (long i = 0; i < elems; i++)
            body.attributes.add(attrs.at_pos_boxed(tc, i));
       
        body.methods = ((VMHashInstance)reader.readRef()).storage;
    }
View Full Code Here

Examples of org.perl6.nqp.sixmodel.SixModelObject.elems()

        ThreadContext tc = gc.getCurrentThreadContext();
        // unpack the list-of-lists
        SixModelObject[][] rows = new SixModelObject[(int)description.elems(tc)][];
        for (int i = 0; i < rows.length; i++) {
            SixModelObject rawRow = description.at_pos_boxed(tc, i);
            SixModelObject[] row = rows[i] = new SixModelObject[(int)rawRow.elems(tc)];
            for (int j = 0; j < row.length; j++)
                row[j] = rawRow.at_pos_boxed(tc, j);
        }

        int rptr = 0;
View Full Code Here

Examples of org.perl6.nqp.sixmodel.SixModelObject.elems()

        for (byte af : argFlags) {
            switch (af) {
            case ARG_OBJ | ARG_FLAT:
                SixModelObject flatArray = (SixModelObject)oldArgs[oldArgsIdx++];
                int prim = flatArray.st.REPR.get_value_storage_spec(cf.tc, flatArray.st).boxed_primitive;
                long elems = flatArray.elems(cf.tc);
                for (long i = 0; i < elems; i++) {
                    if (prim == StorageSpec.BP_NONE) {
                        newArgs.add(flatArray.at_pos_boxed(cf.tc, i));
                        newFlags.add(ARG_OBJ);
                    } else {
View Full Code Here

Examples of org.perl6.nqp.sixmodel.SixModelObject.elems()

        int numStates = (int)states.elems(tc) - 1;
        nfa.numStates = numStates;
        nfa.states = new NFAStateInfo[numStates][];
        for (int i = 0; i < numStates; i++) {
            SixModelObject edgeInfo = states.at_pos_boxed(tc, i + 1);
            int elems = (int)edgeInfo.elems(tc);
            int edges = elems / 3;
            int curEdge = 0;
            nfa.states[i] = new NFAStateInfo[edges];
            for (int j = 0; j < elems; j += 3) {
                int act = (int)smart_numify(edgeInfo.at_pos_boxed(tc, j), tc);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.