Commit b258b79e authored by Lukáš Marek's avatar Lukáš Marek

Added some comments and TODOs

Weaver odd fix removed
ShadowClass - classId hidden
parent f3ab4bb8
......@@ -1365,6 +1365,8 @@ void JNICALL jvmti_callback_class_file_load_hook(
// ******************* CLASS prepare callback *******************
// registers all native methods so they can be used during VM init phase
void JNICALL jvmti_callback_class_prepare_hook(jvmtiEnv *jvmti_env,
JNIEnv* jni_env, jthread thread, jclass klass) {
......
......@@ -16,9 +16,11 @@ public abstract class ShadowClass extends ShadowObject {
this.classLoader = classLoader;
}
//
//
public final int getClassId() {
// No need to expose the interface to user
// getId() should be sufficient
protected final int getClassId() {
return classId;
}
......
package ch.usi.dag.dislreserver.shadow;
// TODO ShadowString should better handle if String data are not send
// over network - throw a runtime exception ??
public class ShadowString extends ShadowObject {
private String value;
......
package ch.usi.dag.dislreserver.shadow;
// TODO ShadowTrhead should better handle if String data are not send
// over network - throw a runtime exception ??
public class ShadowThread extends ShadowObject {
private String name;
......
......@@ -80,13 +80,6 @@ public class CodeExecuted extends RemoteAnalysis {
throw new RuntimeException("This class should be transfered as class");
}
// class id should be non 0
if(((ShadowClass) c).getClassId() == 0) {
throw new RuntimeException("Class id should not be null");
}
System.out.println("Received class id: " + ((ShadowClass) c).getClassId());
if(! (t instanceof ShadowThread)) {
throw new RuntimeException("This thread should be transfered as thread");
}
......
......@@ -287,11 +287,6 @@ public class Weaver {
if (snippet.getAnnotationClass().equals(AfterThrowing.class)
|| snippet.getAnnotationClass().equals(After.class)) {
if (Type.getInternalName(Object.class).equals(classNode.name)
&& methodNode.name.endsWith("init>")) {
continue;
}
for (Shadow shadow : shadows) {
WeavingRegion region = shadow.getWeavingRegion();
......
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