Package soot.util

Examples of soot.util.Chain.insertBefore()


                    RefType.v(complexClass));
            body.getLocals().add(complexLocal);
            units.insertBefore(Jimple.v().newAssignStmt(complexLocal,
                    Jimple.v().newNewExpr(RefType.v(complexClass))),
                    insertPoint);
            units.insertBefore(Jimple.v().newInvokeStmt(
                    Jimple.v().newSpecialInvokeExpr(complexLocal,
                            complexConstructor.makeRef(),
                            DoubleConstant.v(complex.real),
                            DoubleConstant.v(complex.imag))), insertPoint);
View Full Code Here


            SootMethod tokenConstructor = tokenClass
                    .getMethod("void <init>(java.lang.String)");
            Local tokenLocal = Jimple.v().newLocal(localName,
                    RefType.v(tokenClass));
            body.getLocals().add(tokenLocal);
            units.insertBefore(Jimple.v().newAssignStmt(tokenLocal,
                    Jimple.v().newNewExpr(RefType.v(tokenClass))), insertPoint);
            units.insertBefore(Jimple.v().newInvokeStmt(
                    Jimple.v().newSpecialInvokeExpr(tokenLocal,
                            tokenConstructor.makeRef(),
                            StringConstant.v(token.toString()))), insertPoint);
View Full Code Here

            Local tokenLocal = Jimple.v().newLocal(localName,
                    RefType.v(tokenClass));
            body.getLocals().add(tokenLocal);
            units.insertBefore(Jimple.v().newAssignStmt(tokenLocal,
                    Jimple.v().newNewExpr(RefType.v(tokenClass))), insertPoint);
            units.insertBefore(Jimple.v().newInvokeStmt(
                    Jimple.v().newSpecialInvokeExpr(tokenLocal,
                            tokenConstructor.makeRef(),
                            StringConstant.v(token.toString()))), insertPoint);
            return tokenLocal;
        }
View Full Code Here

            // This may look ugly, but wherever we insert type casts
            // it is more efficient and also much easier to optimize
            // during the translation process if we want to inline code.
            if (type.equals(ptolemy.data.type.BaseType.UNKNOWN)) {
                units.insertBefore(
                        Jimple.v().newAssignStmt(
                                typeLocal,
                                Jimple.v().newStaticFieldRef(
                                        unknownTypeField.makeRef())),
                        insertPoint);
View Full Code Here

                                typeLocal,
                                Jimple.v().newStaticFieldRef(
                                        unknownTypeField.makeRef())),
                        insertPoint);
            } else if (type.equals(ptolemy.data.type.BaseType.GENERAL)) {
                units.insertBefore(
                        Jimple.v().newAssignStmt(
                                typeLocal,
                                Jimple.v().newStaticFieldRef(
                                        generalTypeField.makeRef())),
                        insertPoint);
View Full Code Here

                                typeLocal,
                                Jimple.v().newStaticFieldRef(
                                        generalTypeField.makeRef())),
                        insertPoint);
            } else if (type.equals(ptolemy.data.type.BaseType.BOOLEAN)) {
                units.insertBefore(
                        Jimple.v().newAssignStmt(
                                typeLocal,
                                Jimple.v().newStaticFieldRef(
                                        booleanTypeField.makeRef())),
                        insertPoint);
View Full Code Here

                                typeLocal,
                                Jimple.v().newStaticFieldRef(
                                        booleanTypeField.makeRef())),
                        insertPoint);
            } else if (type.equals(ptolemy.data.type.BaseType.BOOLEAN_MATRIX)) {
                units
                        .insertBefore(Jimple.v().newAssignStmt(
                                typeLocal,
                                Jimple.v().newStaticFieldRef(
                                        booleanMatrixTypeField.makeRef())),
                                insertPoint);
View Full Code Here

                                typeLocal,
                                Jimple.v().newStaticFieldRef(
                                        booleanMatrixTypeField.makeRef())),
                                insertPoint);
            } else if (type.equals(ptolemy.data.type.BaseType.COMPLEX)) {
                units.insertBefore(
                        Jimple.v().newAssignStmt(
                                typeLocal,
                                Jimple.v().newStaticFieldRef(
                                        complexTypeField.makeRef())),
                        insertPoint);
View Full Code Here

                                typeLocal,
                                Jimple.v().newStaticFieldRef(
                                        complexTypeField.makeRef())),
                        insertPoint);
            } else if (type.equals(ptolemy.data.type.BaseType.COMPLEX_MATRIX)) {
                units
                        .insertBefore(Jimple.v().newAssignStmt(
                                typeLocal,
                                Jimple.v().newStaticFieldRef(
                                        complexMatrixTypeField.makeRef())),
                                insertPoint);
View Full Code Here

                                typeLocal,
                                Jimple.v().newStaticFieldRef(
                                        complexMatrixTypeField.makeRef())),
                                insertPoint);
            } else if (type.equals(ptolemy.data.type.BaseType.DOUBLE)) {
                units.insertBefore(Jimple.v()
                        .newAssignStmt(
                                typeLocal,
                                Jimple.v().newStaticFieldRef(
                                        doubleTypeField.makeRef())),
                        insertPoint);
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.