Package soot

Examples of soot.SootField.makeRef()


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

                // The threshold at which it is better to generate loops,
                // than to inline code.  A threshold of 2 means that loops will
                // always be used.
                // FIXME: This should be a command line option.
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

                // 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);
            }
View Full Code Here

                        .insertBefore(
                                Jimple.v().newAssignStmt(
                                        newLocal,
                                        Jimple.v().newInstanceFieldRef(
                                                entityContainerLocal,
                                                field.makeRef())), unit);
                return newLocal;
            } else {
                // Otherwise, the source class must be something up
                // the hierarchy.
                CompositeEntity container = (CompositeEntity) sourceEntity
View Full Code Here

                body.getLocals().add(containerLocal);
                body.getUnits().insertBefore(
                        Jimple.v().newAssignStmt(
                                containerLocal,
                                Jimple.v().newInstanceFieldRef(local,
                                        field.makeRef())), unit);
                return getLocalReferenceForEntity(entity, containerClass,
                        containerLocal, body, unit, options); // FIXME!
            }
        } else {
            // Then the source class must be a class for a settable attribute.
View Full Code Here

            body.getLocals().add(containerLocal);
            body.getUnits().insertBefore(
                    Jimple.v().newAssignStmt(
                            containerLocal,
                            Jimple.v().newInstanceFieldRef(local,
                                    field.makeRef())), unit);

            //   Local containerLocal = Jimple.v().newLocal("container",
            //                                 RefType.v(PtolemyUtilities.entityClass));
            //             body.getLocals().add(containerLocal);
            //             body.getUnits().insertBefore(
View Full Code Here

                        body.getUnits()
                                .insertBefore(
                                        Jimple.v().newAssignStmt(
                                                Jimple.v().newInstanceFieldRef(
                                                        body.getThisLocal(),
                                                        field.makeRef()),
                                                body.getParameterLocal(0)),
                                        insertPoint);
                    } else {
                        // Assign null to the container field.
                        JimpleBody body = (JimpleBody) method.getActiveBody();
View Full Code Here

                        Stmt insertPoint = (Stmt) body.getUnits().getLast();
                        body.getUnits().insertBefore(
                                Jimple.v().newAssignStmt(
                                        Jimple.v().newInstanceFieldRef(
                                                body.getThisLocal(),
                                                field.makeRef()),
                                        NullConstant.v()), insertPoint);
                    }
                }
            }
        }
View Full Code Here

            units.insertBefore(Jimple.v().newInvokeStmt(
                    Jimple.v().newSpecialInvokeExpr(modelLocal,
                            constructor.makeRef(), args)), insertPoint);

            FieldRef fieldRef = Jimple.v().newInstanceFieldRef(
                    body.getThisLocal(), modelField.makeRef());
            units.insertBefore(Jimple.v().newAssignStmt(fieldRef, modelLocal),
                    insertPoint);

            // Set the name.
            units.insertBefore(Jimple.v().newInvokeStmt(
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.