Package serp.bytecode

Examples of serp.bytecode.TableSwitchInstruction.addTarget()


            tabins.setHigh(fmds.length - 1);

            // case i:
            //     return <_attrsToFields.get(fmds[i].getName())>
            for (int i = 0; i < fmds.length; i++) {
                tabins.addTarget(code.constant().setValue(
                    _attrsToFields.get(fmds[i].getName())));
                code.areturn();
            }           
            // default: throw new IllegalArgumentException ()
            tabins.setDefaultTarget(throwException
View Full Code Here


            tabins.setHigh(fmds.length - 1);

            // <field> = pcStateManager.provided<type>Field
            //     (this, fieldNumber);
            for (int i = 0; i < fmds.length; i++) {
                tabins.addTarget(loadManagedInstance(code, false));
                code.getfield().setField(SM, SMTYPE);
                loadManagedInstance(code, false);
                code.iload().setParam(0);
                loadManagedInstance(code, false);
                addGetManagedValueCode(code, fmds[i]);
View Full Code Here

            // <field> = pcStateManager.replace<type>Field
            //  (this, fieldNumber);
            for (int i = 0; i < fmds.length; i++) {
                // for the addSetManagedValueCode call below.
                tabins.addTarget(loadManagedInstance(code, false, fmds[i]));

                loadManagedInstance(code, false, fmds[i]);
                code.getfield().setField(SM, SMTYPE);
                loadManagedInstance(code, false, fmds[i]);
                code.iload().setParam(0);
View Full Code Here

            tabins.setHigh(fmds.length - 1);

            for (int i = 0; i < fmds.length; i++) {
                // <field> = other.<field>;
                // or set<field> (other.get<field>);
                tabins.addTarget(loadManagedInstance(code, false, fmds[i]));
                code.aload().setParam(0);
                addGetManagedValueCode(code, fmds[i], false);
                addSetManagedValueCode(code, fmds[i]);

                // break;
View Full Code Here

        tabins.setDefaultTarget(defaultIns);
        int objectCount = 0;
        for (int i = 0; i < types.length; i++) {
            // default: throw new IllegalArgumentException
            if (!isCompatible(types[i], typeCode)) {
                tabins.addTarget(tabins.getDefaultTarget());
                continue;
            }

            tabins.addTarget(code.aload().setThis());
            if (typeCode >= JavaTypes.OBJECT) {
View Full Code Here

            if (!isCompatible(types[i], typeCode)) {
                tabins.addTarget(tabins.getDefaultTarget());
                continue;
            }

            tabins.addTarget(code.aload().setThis());
            if (typeCode >= JavaTypes.OBJECT) {
                // if (objects == null)
                //     objects = new Object[totalObjects];
                code.aload().setThis();
                code.getfield().setField("objects", Object[].class);
View Full Code Here

        tabins.setDefaultTarget(defaultIns);
        int objectCount = 0;
        for (int i = 0; i < types.length; i++) {
            // default: throw new IllegalArgumentException
            if (!isCompatible(types[i], typeCode)) {
                tabins.addTarget(tabins.getDefaultTarget());
                continue;
            }

            tabins.addTarget(code.aload().setThis());
            if (typeCode >= JavaTypes.OBJECT) {
View Full Code Here

            if (!isCompatible(types[i], typeCode)) {
                tabins.addTarget(tabins.getDefaultTarget());
                continue;
            }

            tabins.addTarget(code.aload().setThis());
            if (typeCode >= JavaTypes.OBJECT) {
                // if (objects == null)
                //     return null;
                // return objects[objectCount];
                code.aload().setThis();
View Full Code Here

        tabins.setHigh(fmds.length - 1);

        // case i:
        //     return <_attrsToFields.get(fmds[i].getName())>
        for (int i = 0; i < fmds.length; i++) {
            tabins.addTarget(code.constant().setValue(
                _attrsToFields.get(fmds[i].getName())));
            code.areturn();
        }

        // default: throw new IllegalArgumentException ()
View Full Code Here

            tabins.setHigh(fmds.length - 1);

            // <field> = pcStateManager.provided<type>Field
            //     (this, fieldNumber);
            for (int i = 0; i < fmds.length; i++) {
                tabins.addTarget(loadManagedInstance(code, false));
                code.getfield().setField(SM, SMTYPE);
                loadManagedInstance(code, false);
                code.iload().setParam(0);
                loadManagedInstance(code, false);
                addGetManagedValueCode(code, fmds[i]);
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.