Commit ec554744 authored by Aibek Sarimbekov's avatar Aibek Sarimbekov
Browse files

removed unused arguments in fia

register the dumper by default
parent f5b5cd88
......@@ -52,19 +52,15 @@ public class DiSLClass {
/** FIELD ACCESSES **/
@Before(marker=BytecodeMarker.class, args = "putfield", guard = NoClInit.class, scope = "*.*", order = 0)
public static void onFieldWrite(MethodSC sc, MyAnalysis ma, DynamicContext dc) {
String accessSite = sc.thisMethodFullName() + " [" + ma.getInMethodIndex() + "]";
Object accessedObj = dc.stackValue(1, Object.class);
String accessedFieldName = ma.getAccessedFieldsName();
ImmutabilityAnalysis.onFieldWrite(accessedObj, accessedFieldName, accessSite, stackTL);
ImmutabilityAnalysis.onFieldWrite(accessedObj, accessedFieldName, stackTL);
}
@Before(marker=BytecodeMarker.class, args = "getfield", guard = NoClInit.class, scope = "*.*", order = 0)
public static void onFieldRead(MethodSC sc, MyAnalysis ma, DynamicContext dc) {
String accessSite = sc.thisMethodFullName() + " [" + ma.getInMethodIndex() + "]";
Object accessedObj = dc.stackValue(0, Object.class);
String accessedFieldName = ma.getAccessedFieldsName();
ImmutabilityAnalysis.onFieldRead(accessedObj, accessedFieldName, accessSite);
ImmutabilityAnalysis.onFieldRead(accessedObj, accessedFieldName);
}
}
......@@ -25,7 +25,7 @@ public class ImmutabilityAnalysis {
try{
PrintStream ps = new PrintStream(new BufferedOutputStream(new FileOutputStream(DUMP_FILE)));
myDumper = new MyDumper(ps);
bigMap = new MyWeakKeyIdentityHashMap();
bigMap = new MyWeakKeyIdentityHashMap(myDumper);
Thread shutdownHook = new Thread(){
public void run() {
......@@ -46,7 +46,7 @@ public class ImmutabilityAnalysis {
}
}
public static void onFieldRead(Object accessedObj, String accessedFieldName, String accessSite ) {
public static void onFieldRead(Object accessedObj, String accessedFieldName ) {
try{
String objectID = getObjectID(accessedObj, null);
......@@ -77,7 +77,7 @@ public class ImmutabilityAnalysis {
}
public static void onFieldWrite(Object accessedObj, String accessedFieldName, String accessSite, Stack<Object> stack) {
public static void onFieldWrite(Object accessedObj, String accessedFieldName, Stack<Object> stack) {
try{
boolean isInDynamicExtendOfConstructor = false;
if(stack != null) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment