joerg 2004/06/29 09:11:29
Modified: src/blocks/javaflow/java/org/apache/cocoon/components/flow/java
ContinuationClassLoader.java
Log:
readded debug method
Revision Changes Path
1.15 +32 -2
cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/ContinuationClassLoader.java
Index: ContinuationClassLoader.java
===================================================================
RCS file:
/home/cvs/cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java/ContinuationClassLoader.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- ContinuationClassLoader.java 29 Jun 2004 15:07:14 -0000 1.14
+++ ContinuationClassLoader.java 29 Jun 2004 16:11:29 -0000 1.15
@@ -374,7 +374,37 @@
}
}
}
-
+
+ private void printFrameInfo(MethodGen method, ControlFlowGraph cfg) {
+ InstructionHandle handle = method.getInstructionList().getStart();
+ do {
+ System.out.println(handle);
+ try {
+ InstructionContext context = cfg.contextOf(handle);
+
+ Frame f = context.getOutFrame(new ArrayList());
+
+ LocalVariables lvs = f.getLocals();
+ System.out.print("Locales: ");
+ for (int i = 0; i < lvs.maxLocals(); i++) {
+ System.out.print(lvs.get(i) + ",");
+ }
+ System.out.println();
+
+ OperandStack os = f.getStack();
+ System.out.print(" Stack: ");
+ for (int i = 0; i < os.size(); i++) {
+ System.out.print(os.peek(i) + ",");
+ }
+ System.out.println();
+ }
+ catch (AssertionViolatedException ave) {
+ System.out.println("no frame information");
+ }
+ }
+ while ((handle = handle.getNext()) != null);
+ }
+
private void rewrite(MethodGen method, ControlFlowGraph cfg)
throws ClassNotFoundException {
InstructionFactory insFactory = new
InstructionFactory(method.getConstantPool());