Package soot.util

Examples of soot.util.Chain.insertBefore()


                                typeLocal,
                                Jimple.v().newStaticFieldRef(
                                        objectTypeField.makeRef())),
                        insertPoint);
            } else if (type.equals(ptolemy.data.type.BaseType.SHORT)) {
                units
                        .insertBefore(Jimple.v().newAssignStmt(
                                typeLocal,
                                Jimple.v().newStaticFieldRef(
                                        shortTypeField.makeRef())), insertPoint);
            } else if (type.equals(ptolemy.data.type.BaseType.STRING)) {
View Full Code Here


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

                        insertPoint);
            } else {
                // Some base type that we didn't special case above.
                SootMethod typeConstructor = SootUtilities
                        .searchForMethodByName(baseTypeClass, "forName");
                units.insertBefore(Jimple.v().newAssignStmt(
                        typeLocal,
                        Jimple.v().newStaticInvokeExpr(
                                typeConstructor.makeRef(),
                                StringConstant.v(type.toString()))),
                        insertPoint);
View Full Code Here

                    ((ptolemy.data.type.ArrayType) type).getElementType());
            Local typeLocal = Jimple.v().newLocal(
                    "type_arrayOf" + elementTypeLocal.getName(),
                    RefType.v(arrayTypeClass));
            body.getLocals().add(typeLocal);
            units.insertBefore(Jimple.v().newAssignStmt(typeLocal,
                    Jimple.v().newNewExpr(RefType.v(arrayTypeClass))),
                    insertPoint);
            units.insertBefore(Jimple.v().newInvokeStmt(
                    Jimple.v().newSpecialInvokeExpr(typeLocal,
                            typeConstructor.makeRef(), elementTypeLocal)),
View Full Code Here

                    RefType.v(arrayTypeClass));
            body.getLocals().add(typeLocal);
            units.insertBefore(Jimple.v().newAssignStmt(typeLocal,
                    Jimple.v().newNewExpr(RefType.v(arrayTypeClass))),
                    insertPoint);
            units.insertBefore(Jimple.v().newInvokeStmt(
                    Jimple.v().newSpecialInvokeExpr(typeLocal,
                            typeConstructor.makeRef(), elementTypeLocal)),
                    insertPoint);
            return typeLocal;
        } else if (type instanceof ptolemy.data.type.RecordType) {
View Full Code Here

            // Create the new array of labels.
            Local labelArrayLocal = Jimple.v().newLocal("labelArray",
                    ArrayType.v(RefType.v("java.lang.String"), 1));
            body.getLocals().add(labelArrayLocal);
            units.insertBefore(Jimple.v().newAssignStmt(
                    labelArrayLocal,
                    Jimple.v().newNewArrayExpr(RefType.v("java.lang.String"),
                            IntConstant.v(recordType.labelSet().size()))),
                    insertPoint);
View Full Code Here

            // Create the new array of types.
            Local typeArrayLocal = Jimple.v().newLocal("typeArray",
                    ArrayType.v(RefType.v(typeClass), 1));
            body.getLocals().add(typeArrayLocal);
            units.insertBefore(Jimple.v().newAssignStmt(
                    typeArrayLocal,
                    Jimple.v().newNewArrayExpr(RefType.v(typeClass),
                            IntConstant.v(recordType.labelSet().size()))),
                    insertPoint);
View Full Code Here

                Local elementTypeLocal = buildConstantTypeLocal(body,
                        insertPoint, elementType);
                typeName.append("_" + label + "_" + elementTypeLocal.getName());

                // Store into the array of labels.
                units.insertBefore(
                        Jimple.v().newAssignStmt(
                                Jimple.v().newArrayRef(labelArrayLocal,
                                        IntConstant.v(count)),
                                StringConstant.v(label)), insertPoint);
View Full Code Here

                                Jimple.v().newArrayRef(labelArrayLocal,
                                        IntConstant.v(count)),
                                StringConstant.v(label)), insertPoint);

                // Store into the array of types.
                units.insertBefore(Jimple.v().newAssignStmt(
                        Jimple.v().newArrayRef(typeArrayLocal,
                                IntConstant.v(count)), elementTypeLocal),
                        insertPoint);
            }
View Full Code Here

            // Create the new local and assign to local variable.
            Local typeLocal = Jimple.v().newLocal(typeName.toString(),
                    RefType.v(recordTypeClass));
            body.getLocals().add(typeLocal);
            units.insertBefore(Jimple.v().newAssignStmt(typeLocal,
                    Jimple.v().newNewExpr(RefType.v(recordTypeClass))),
                    insertPoint);

            // invoke the initializer.
            SootMethod typeConstructor = SootUtilities.searchForMethodByName(
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.