More execution work
This commit is contained in:
@@ -24,6 +24,16 @@ public class Frame
|
||||
stack = new Stack(code.getMaxStack());
|
||||
variables = new Variables(code.getMaxLocals());
|
||||
}
|
||||
|
||||
protected Frame(Path path, Frame other)
|
||||
{
|
||||
this.path = path;
|
||||
this.method = other.method;
|
||||
this.executing = other.executing;
|
||||
this.pc = other.pc;
|
||||
this.stack = new Stack(other.stack);
|
||||
this.variables = new Variables(other.variables);
|
||||
}
|
||||
|
||||
public Path getPath()
|
||||
{
|
||||
@@ -60,7 +70,20 @@ public class Frame
|
||||
catch (Throwable ex)
|
||||
{
|
||||
System.err.println("Error executing instruction in " + method.getName() + " " + method.getDescriptor() + " in class " + method.getMethods().getClassFile().getName() + " at pc " + pc);
|
||||
throw ex;
|
||||
System.err.println("Frame stack (grows downward):");
|
||||
while (stack.getSize() > 0)
|
||||
{
|
||||
Instruction stacki = stack.getIns();
|
||||
Object obj = stack.pop();
|
||||
if (obj != null)
|
||||
System.err.println(" " + obj + " (class " + obj.getClass().getName() + ") pushed by instruction " + stacki + " at pc " + stacki.getPc());
|
||||
else
|
||||
System.err.println(" " + obj + " pushed by instruction " + stacki + " at pc " + stacki.getPc());
|
||||
}
|
||||
System.err.println("end of stack");
|
||||
ex.printStackTrace();
|
||||
System.exit(-1);
|
||||
//throw ex;
|
||||
}
|
||||
|
||||
if (oldPc == pc)
|
||||
|
||||
Reference in New Issue
Block a user