Package soot

Examples of soot.SootField.makeRef()


            theClass.addField(field);
        }

        // Set the field.
        units.insertAfter(Jimple.v().newAssignStmt(
                Jimple.v().newInstanceFieldRef(thisLocal, field.makeRef()),
                castLocal), insertPoint);
        return field;
    }

    /** Create statements that correspond to a for loop and return
View Full Code Here


                                InvokeExpr r = (InvokeExpr) value;

                                if (r.getMethod() == iteratorNextMethod) {
                                    box.setValue(Jimple.v()
                                            .newInstanceFieldRef(thisLocal,
                                                    insertField.makeRef()));
                                }
                            }
                        }

                        units.insertBefore(clone, insertPoint);
View Full Code Here

                    SootField portField = entityInstanceClass
                            .getFieldByName(StringUtilities.sanitizeName(name));
                    units.add(Jimple.v().newAssignStmt(
                            portLocal,
                            Jimple.v().newInstanceFieldRef(thisLocal,
                                    portField.makeRef())));
                    units.add(Jimple.v().newAssignStmt(
                            hasTokenLocal,
                            Jimple.v().newVirtualInvokeExpr(portLocal,
                                    PtolemyUtilities.hasTokenMethod.makeRef(),
                                    IntConstant.v(0))));
View Full Code Here

                    // store the isPresent
                    SootField tokenIsPresentField = (SootField) nameToField
                            .get(name + "_isPresent");
                    units.add(Jimple.v().newAssignStmt(
                            Jimple.v().newInstanceFieldRef(thisLocal,
                                    tokenIsPresentField.makeRef()),
                            hasTokenToken));

                    Stmt target = Jimple.v().newNopStmt();
                    units.add(Jimple.v().newIfStmt(
                            Jimple.v().newEqExpr(hasTokenLocal,
View Full Code Here

                                    IntConstant.v(0))));

                    SootField tokenField = (SootField) nameToField.get(name);
                    units.add(Jimple.v().newAssignStmt(
                            Jimple.v().newInstanceFieldRef(thisLocal,
                                    tokenField.makeRef()), tokenLocal));
                    units.add(target);
                }
            }

            Map stateToStartStmt = new HashMap();
View Full Code Here

                    body.getUnits().add(
                            Jimple.v().newAssignStmt(
                                    portLocal,
                                    Jimple.v().newInstanceFieldRef(
                                            body.getThisLocal(),
                                            portField.makeRef())));
                    body.getUnits().add(
                            Jimple.v()
                                    .newInvokeStmt(
                                            Jimple.v().newVirtualInvokeExpr(
                                                    portLocal,
View Full Code Here

                Local local = body.getParameterLocal(i);
                SootField field = (SootField) nameToLocal.get(freeVariable);
                body.getUnits().add(
                        Jimple.v().newAssignStmt(
                                Jimple.v().newInstanceFieldRef(
                                        body.getThisLocal(), field.makeRef()),
                                local));
                i++;
            }

            body.getUnits().add(Jimple.v().newReturnVoidStmt());
View Full Code Here

                // load the buffer array.
                body.getUnits().insertBefore(
                        Jimple.v().newAssignStmt(
                                bufferLocal,
                                Jimple.v().newStaticFieldRef(
                                        arrayField.makeRef())), stmt);

                // If we are calling with just a token, then send the token.
                if (expr.getArgCount() == 1) {
                    // Write to the buffer.
                    body.getUnits().insertBefore(
View Full Code Here

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

    // Create references in the given class to the appropriate Giotto
View Full Code Here

            if (attributeField != null) {
                System.out.println(unit.getClass().toString());
                System.out.println(box.getClass().toString());
                box.setValue(Jimple.v().newInstanceFieldRef(local,
                        attributeField.makeRef()));
            } else {
                throw new RuntimeException(
                        "Failed to find field for attribute "
                                + attribute.getFullName());
            }
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.