|
|
@ -41,6 +41,7 @@ public class MethodProcessorRunnable implements Runnable { |
|
|
|
|
|
|
|
|
|
|
|
private volatile RootStatement root; |
|
|
|
private volatile RootStatement root; |
|
|
|
private volatile Throwable error; |
|
|
|
private volatile Throwable error; |
|
|
|
|
|
|
|
private volatile boolean finished = false; |
|
|
|
|
|
|
|
|
|
|
|
public MethodProcessorRunnable(StructMethod method, VarProcessor varProc, DecompilerContext parentContext) { |
|
|
|
public MethodProcessorRunnable(StructMethod method, VarProcessor varProc, DecompilerContext parentContext) { |
|
|
|
this.method = method; |
|
|
|
this.method = method; |
|
|
@ -57,10 +58,6 @@ public class MethodProcessorRunnable implements Runnable { |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
root = codeToJava(method, varProc); |
|
|
|
root = codeToJava(method, varProc); |
|
|
|
|
|
|
|
|
|
|
|
synchronized (lock) { |
|
|
|
|
|
|
|
lock.notifyAll(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
catch (ThreadDeath ex) { |
|
|
|
catch (ThreadDeath ex) { |
|
|
|
throw ex; |
|
|
|
throw ex; |
|
|
@ -68,6 +65,14 @@ public class MethodProcessorRunnable implements Runnable { |
|
|
|
catch (Throwable ex) { |
|
|
|
catch (Throwable ex) { |
|
|
|
error = ex; |
|
|
|
error = ex; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
finally { |
|
|
|
|
|
|
|
DecompilerContext.setCurrentContext(null); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
finished = true; |
|
|
|
|
|
|
|
synchronized (lock) { |
|
|
|
|
|
|
|
lock.notifyAll(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static RootStatement codeToJava(StructMethod mt, VarProcessor varProc) throws IOException { |
|
|
|
public static RootStatement codeToJava(StructMethod mt, VarProcessor varProc) throws IOException { |
|
|
@ -206,7 +211,7 @@ public class MethodProcessorRunnable implements Runnable { |
|
|
|
return root; |
|
|
|
return root; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public Throwable getError() { |
|
|
|
public boolean isFinished() { |
|
|
|
return error; |
|
|
|
return finished; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|