Package soot.util

Examples of soot.util.Chain.insertBefore()


            units.insertBefore(Jimple.v().newAssignStmt(
                    postfireReturnsLocal,
                    Jimple.v().newVirtualInvokeExpr(actorLocal,
                            actorPostfireMethod.makeRef())), insertPoint);

            units.insertBefore(Jimple.v().newReturnStmt(postfireReturnsLocal),
                    insertPoint);
            LocalSplitter.v().transform(body, phaseName + ".lns");
            LocalNameStandardizer.v().transform(body, phaseName + ".lns");
            TypeResolver.resolve(body, Scene.v());
        }
View Full Code Here


                SootClass theClass = Scene.v().loadClassAndSupport(className);
                SootMethod wrapupMethod = SootUtilities.searchForMethodByName(
                        theClass, "wrapup");

                // Set the field.
                units.insertBefore(Jimple.v().newAssignStmt(
                        actorLocal,
                        Jimple.v().newInstanceFieldRef(thisLocal,
                                field.makeRef())), insertPoint);
                units.insertBefore(Jimple.v().newInvokeStmt(
                        Jimple.v().newVirtualInvokeExpr(actorLocal,
View Full Code Here

                // Set the field.
                units.insertBefore(Jimple.v().newAssignStmt(
                        actorLocal,
                        Jimple.v().newInstanceFieldRef(thisLocal,
                                field.makeRef())), insertPoint);
                units.insertBefore(Jimple.v().newInvokeStmt(
                        Jimple.v().newVirtualInvokeExpr(actorLocal,
                                wrapupMethod.makeRef())), insertPoint);
            }

            //           units.insertBefore(Jimple.v().newReturnVoidStmt(),
View Full Code Here

            body.getLocals().add(tokenArrayLocal);
            Local elementTypeLocal = buildConstantTypeLocal(body, insertPoint,
                    arrayToken.getElementType());

            // Create the array of tokens.
            units.insertBefore(Jimple.v().newAssignStmt(
                    tokenArrayLocal,
                    Jimple.v().newNewArrayExpr(tokenType,
                            IntConstant.v(arrayToken.length()))), insertPoint);

            // recurse
View Full Code Here

            // recurse
            for (int i = 0; i < arrayToken.length(); i++) {
                Local argLocal = buildConstantTokenLocal(body, insertPoint,
                        arrayToken.getElement(i), localName + "_" + i);
                units.insertBefore(Jimple.v().newAssignStmt(
                        Jimple.v().newArrayRef(tokenArrayLocal,
                                IntConstant.v(i)), argLocal), insertPoint);
            }

            Local tokenLocal = Jimple.v().newLocal(localName,
View Full Code Here

            }

            Local tokenLocal = Jimple.v().newLocal(localName,
                    RefType.v(arrayTokenClass));
            body.getLocals().add(tokenLocal);
            units.insertBefore(Jimple.v().newAssignStmt(tokenLocal,
                    Jimple.v().newNewExpr(RefType.v(arrayTokenClass))),
                    insertPoint);
            units.insertBefore(Jimple.v().newInvokeStmt(
                    Jimple.v().newSpecialInvokeExpr(tokenLocal,
                            arrayTokenWithTypeConstructor.makeRef(),
View Full Code Here

                    RefType.v(arrayTokenClass));
            body.getLocals().add(tokenLocal);
            units.insertBefore(Jimple.v().newAssignStmt(tokenLocal,
                    Jimple.v().newNewExpr(RefType.v(arrayTokenClass))),
                    insertPoint);
            units.insertBefore(Jimple.v().newInvokeStmt(
                    Jimple.v().newSpecialInvokeExpr(tokenLocal,
                            arrayTokenWithTypeConstructor.makeRef(),
                            elementTypeLocal, tokenArrayLocal)), insertPoint);
            return tokenLocal;
        } else if (token instanceof ptolemy.data.RecordToken) {
View Full Code Here

            SootMethod tokenConstructor = tokenClass.getMethod("void <init>()");

            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())), insertPoint);
            return tokenLocal;
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())), insertPoint);
            return tokenLocal;
        } else if (token instanceof IntToken) {
            Local tokenLocal = _buildConstantTokenLocal(body, insertPoint,
View Full Code Here

                    .getMethod("void <init>(double,double)");

            Local complexLocal = Jimple.v().newLocal(localName + "Arg",
                    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(),
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.