Package soot

Examples of soot.SootField.makeRef()


            // Set the field to point to the new array.
            body.getUnits().insertBefore(
                    Jimple.v().newAssignStmt(
                            Jimple.v().newInstanceFieldRef(body.getThisLocal(),
                                    bufferField.makeRef()), channelLocal),
                    insertPoint);
        }
    }

    /** Insert code into the given body before the given unit that will
View Full Code Here


        // Load the array of port channels.
        body.getUnits().insertBefore(
                Jimple.v().newAssignStmt(
                        bufferLocal,
                        Jimple.v().newInstanceFieldRef(body.getThisLocal(),
                                arrayField.makeRef())), unit);
    }

    // Create instructions to store the given inputToken into the given
    // buffer at the given index.  If the given typeLocal is not null,
    // then convert the given input token to the given type using the given
View Full Code Here

            Port port = entity.getPort(name);
            SootField portField = (SootField) _portToFieldMap.get(port);

            if (portField != null) {
                return Jimple.v().newInstanceFieldRef(baseLocal,
                        portField.makeRef());
            } else {
                return NullConstant.v();
            }
        } else {
            // Walk back and get the definition of the field.
View Full Code Here

            System.out.println("baseField = " + baseField);

            SootField portField = baseField.getDeclaringClass().getFieldByName(
                    baseField.getName() + "_" + name);
            return Jimple.v().newInstanceFieldRef(baseLocal,
                    portField.makeRef());
        }
    }

    /** Attempt to determine the constant value of the given local,
     *  which is assumed to have a variable type.  Walk backwards
View Full Code Here

            // Initialize the postfire flag.
            units.insertBefore(Jimple.v().newAssignStmt(postfireReturnsLocal,
                    IntConstant.v(1)), insertPoint);
            units.insertBefore(Jimple.v().newAssignStmt(
                    Jimple.v().newInstanceFieldRef(thisLocal,
                            postfireReturnsField.makeRef()),
                    postfireReturnsLocal), insertPoint);

            // Add code to the beginning of the preinitialize method that
            // initializes the attributes.
            //             ModelTransformer.initializeAttributesBefore(body, insertPoint,
View Full Code Here

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

            Local thisLocal = body.getThisLocal();

            if (iterationLimit > 0) {
                units.insertBefore(Jimple.v().newAssignStmt(
                        Jimple.v().newInstanceFieldRef(thisLocal,
                                iterationField.makeRef()), IntConstant.v(0)),
                        insertPoint);
            }

            Local actorLocal = Jimple.v().newLocal("actor", actorType);
            body.getLocals().add(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,
                                initializeMethod.makeRef())), insertPoint);
            }
View Full Code Here

                // Get a reference to the port parameter.
                units.insertBefore(Jimple.v().newAssignStmt(
                        parameterLocal,
                        Jimple.v().newInstanceFieldRef(thisLocal,
                                field.makeRef())), insertPoint);

                // Invoke the update() method.
                units
                        .insertBefore(
                                Jimple
View Full Code Here

                        PtolemyUtilities.ioportType);
                body.getLocals().add(tempPortLocal);
                units.insertBefore(Jimple.v().newAssignStmt(
                        tempPortLocal,
                        Jimple.v().newInstanceFieldRef(thisLocal,
                                field.makeRef())), insertPoint);
                units.insertBefore(Jimple.v().newAssignStmt(
                        portLocal,
                        Jimple.v().newCastExpr(tempPortLocal,
                                PtolemyUtilities.ioportType)), 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.