• R/O
  • HTTP
  • SSH
  • HTTPS

jcfa: Commit

JavaClassFileAnalyzer (jcfa) のメインリポジトリです。


Commit MetaInfo

Revision08ea921a4773ea07822e51e7340bb8ded624c680 (tree)
Time2014-04-03 20:59:23
Authoriga <tosiki.iga@nift...>
Commiteriga

Log Message

save

Change Summary

Incremental Difference

--- a/jcfa/src/jp/igapyon/jcfa/util/JcfaWriteUtil.java
+++ b/jcfa/src/jp/igapyon/jcfa/util/JcfaWriteUtil.java
@@ -14,6 +14,7 @@ import jp.igapyon.jcfa.vo.JcfaUnit;
1414 import jp.igapyon.jcfa.vo.operandstack.JcfaOSLocalVariable;
1515 import jp.igapyon.jcfa.vo.operandstack.JcfaOSNode;
1616 import jp.igapyon.jcfa.vo.operandstack.JcfaOSRef;
17+import jp.igapyon.jcfa.vo.operandstack.JcfaOSString;
1718
1819 import org.apache.bcel.Constants;
1920 import org.apache.bcel.classfile.JavaClass;
@@ -164,8 +165,12 @@ public class JcfaWriteUtil {
164165 break;
165166 }
166167 case Constants.LDC: {
168+ final JcfaOSString osString = new JcfaOSString();
169+ jcfaMethod.getFrame().getOperandStack().push(osString);
170+ osString.setString(JcfaUtil.getConstantString(jc, codes[1]));
171+
167172 jcfaCode.getComment().getCommentList()
168- .add(JcfaUtil.getConstantString(jc, codes[1]));
173+ .add(osString.getString());
169174 }
170175 break;
171176 case Constants.INVOKEVIRTUAL:
@@ -181,11 +186,13 @@ public class JcfaWriteUtil {
181186 final JcfaOSNode osNodeArg0 = jcfaMethod.getFrame()
182187 .getOperandStack().pop();
183188
184- // final JcfaOSRef osRef = (JcfaOSRef) jcfaMethod.getFrame()
185- // .getOperandStack().pop();
189+ final JcfaOSRef osRef = (JcfaOSRef) jcfaMethod.getFrame()
190+ .getOperandStack().pop();
186191
187- jcfaCode.getComment().getCommentList()
188- .add("" + osNodeArg0.toString());
192+ jcfaCode.getComment()
193+ .getCommentList()
194+ .add("" + osRef.getClassName() + "#"
195+ + osNodeArg0.toString());
189196
190197 }
191198 break;
--- a/jcfa/testJavaClass/output/jp/igapyon/jcfa/vo/JcfaField.jcfa
+++ b/jcfa/testJavaClass/output/jp/igapyon/jcfa/vo/JcfaField.jcfa
@@ -20,7 +20,7 @@ public class JcfaField extends jp.igapyon.jcfa.vo.JcfaNode {
2020 /*
2121 * 1: invokespecial jp/igapyon/jcfa/vo/JcfaNode#<init>()V TODO get args
2222 * count from signature.
23- * jp.igapyon.jcfa.vo.operandstack.JcfaOSLocalVariable@a460f0
23+ * null#jp.igapyon.jcfa.vo.operandstack.JcfaOSLocalVariable@132a3e
2424 */
2525
2626 /* 4: return */
--- a/jcfa/testJavaClass/output/jp/igapyon/jcfa/vo/JcfaFrame.jcfa
+++ b/jcfa/testJavaClass/output/jp/igapyon/jcfa/vo/JcfaFrame.jcfa
@@ -15,7 +15,8 @@ public class JcfaFrame {
1515
1616 /*
1717 * 1: invokespecial java/lang/Object#<init>()V TODO get args count from
18- * signature. jp.igapyon.jcfa.vo.operandstack.JcfaOSLocalVariable@74c252
18+ * signature.
19+ * null#jp.igapyon.jcfa.vo.operandstack.JcfaOSLocalVariable@1e6c23c
1920 */
2021
2122 /*
@@ -33,7 +34,7 @@ public class JcfaFrame {
3334 /*
3435 * 9: invokespecial java/util/ArrayList#<init>()V TODO get args count
3536 * from signature.
36- * jp.igapyon.jcfa.vo.operandstack.JcfaOSLocalVariable@181ab44
37+ * null#jp.igapyon.jcfa.vo.operandstack.JcfaOSLocalVariable@da1a1f
3738 */
3839
3940 /*
@@ -55,7 +56,7 @@ public class JcfaFrame {
5556 /*
5657 * 20: invokespecial jp/igapyon/jcfa/vo/JcfaOperandStack#<init>()V TODO
5758 * get args count from signature.
58- * jp.igapyon.jcfa.vo.operandstack.JcfaOSLocalVariable@132a3e
59+ * null#jp.igapyon.jcfa.vo.operandstack.JcfaOSLocalVariable@e9055b
5960 */
6061
6162 /*
--- a/jcfa/testJavaClass/output/jp/igapyon/jcfa/vo/JcfaMethod.jcfa
+++ b/jcfa/testJavaClass/output/jp/igapyon/jcfa/vo/JcfaMethod.jcfa
@@ -24,7 +24,7 @@ public class JcfaMethod extends jp.igapyon.jcfa.vo.JcfaNode {
2424 /*
2525 * 1: invokespecial jp/igapyon/jcfa/vo/JcfaNode#<init>()V TODO get args
2626 * count from signature.
27- * jp.igapyon.jcfa.vo.operandstack.JcfaOSLocalVariable@1d8623b
27+ * null#jp.igapyon.jcfa.vo.operandstack.JcfaOSLocalVariable@3a4d82
2828 */
2929
3030 /*
@@ -42,7 +42,7 @@ public class JcfaMethod extends jp.igapyon.jcfa.vo.JcfaNode {
4242 /*
4343 * 9: invokespecial java/util/ArrayList#<init>()V TODO get args count
4444 * from signature.
45- * jp.igapyon.jcfa.vo.operandstack.JcfaOSLocalVariable@119510f
45+ * null#jp.igapyon.jcfa.vo.operandstack.JcfaOSLocalVariable@1b6aea4
4646 */
4747
4848 /*
@@ -64,7 +64,7 @@ public class JcfaMethod extends jp.igapyon.jcfa.vo.JcfaNode {
6464 /*
6565 * 20: invokespecial java/util/ArrayList#<init>()V TODO get args count
6666 * from signature.
67- * jp.igapyon.jcfa.vo.operandstack.JcfaOSLocalVariable@118dc75
67+ * null#jp.igapyon.jcfa.vo.operandstack.JcfaOSLocalVariable@83d070
6868 */
6969
7070 /*
@@ -86,7 +86,7 @@ public class JcfaMethod extends jp.igapyon.jcfa.vo.JcfaNode {
8686 /*
8787 * 31: invokespecial jp/igapyon/jcfa/vo/JcfaFrame#<init>()V TODO get
8888 * args count from signature.
89- * jp.igapyon.jcfa.vo.operandstack.JcfaOSLocalVariable@131a5af
89+ * null#jp.igapyon.jcfa.vo.operandstack.JcfaOSLocalVariable@1e9749c
9090 */
9191
9292 /*
--- a/jcfa/testJavaClass/output/jp/igapyon/jcfa/vo/JcfaNode.jcfa
+++ b/jcfa/testJavaClass/output/jp/igapyon/jcfa/vo/JcfaNode.jcfa
@@ -13,7 +13,8 @@ public class JcfaNode {
1313
1414 /*
1515 * 1: invokespecial java/lang/Object#<init>()V TODO get args count from
16- * signature. jp.igapyon.jcfa.vo.operandstack.JcfaOSLocalVariable@3a4d82
16+ * signature.
17+ * null#jp.igapyon.jcfa.vo.operandstack.JcfaOSLocalVariable@5eae58
1718 */
1819
1920 /*
@@ -31,7 +32,7 @@ public class JcfaNode {
3132 /*
3233 * 9: invokespecial jp/igapyon/jcfa/vo/JcfaComment#<init>()V TODO get
3334 * args count from signature.
34- * jp.igapyon.jcfa.vo.operandstack.JcfaOSLocalVariable@1b6aea4
35+ * null#jp.igapyon.jcfa.vo.operandstack.JcfaOSLocalVariable@841c1
3536 */
3637
3738 /*
--- a/jcfa/testJavaClass/output/test/TestJavaClass001.jcfa
+++ b/jcfa/testJavaClass/output/test/TestJavaClass001.jcfa
@@ -10,7 +10,8 @@ public class TestJavaClass001 {
1010
1111 /*
1212 * 1: invokespecial java/lang/Object#<init>()V TODO get args count from
13- * signature. jp.igapyon.jcfa.vo.operandstack.JcfaOSLocalVariable@c9560e
13+ * signature.
14+ * null#jp.igapyon.jcfa.vo.operandstack.JcfaOSLocalVariable@1670f2b
1415 */
1516
1617 /* 4: return */
@@ -30,8 +31,9 @@ public class TestJavaClass001 {
3031
3132 /*
3233 * 5: invokevirtual java/io/PrintStream#println(Ljava/lang/String;)V
33- * TODO get args count from signature.
34- * jp.igapyon.jcfa.vo.operandstack.JcfaOSRef@30d77d
34+ * TODO get args count from signature. java.lang.System#out
35+ * type:Ljava/io
36+ * /PrintStream;#jp.igapyon.jcfa.vo.operandstack.JcfaOSString@114f7c0
3537 */
3638
3739 /* 8: return */
--- a/jcfa/testJavaClass/output/test/TestJavaClass002.jcfa
+++ b/jcfa/testJavaClass/output/test/TestJavaClass002.jcfa
@@ -21,7 +21,7 @@ public class TestJavaClass002 {
2121 /*
2222 * 1: invokespecial java/lang/Object#<init>()V TODO get args count from
2323 * signature.
24- * jp.igapyon.jcfa.vo.operandstack.JcfaOSLocalVariable@1ba0e0e
24+ * null#jp.igapyon.jcfa.vo.operandstack.JcfaOSLocalVariable@164813b
2525 */
2626
2727 /*
--- a/jcfa/testJavaClass/output/test/TestJavaClass003.jcfa
+++ b/jcfa/testJavaClass/output/test/TestJavaClass003.jcfa
@@ -26,7 +26,7 @@ public class TestJavaClass003 {
2626 /*
2727 * 1: invokespecial java/lang/Object#<init>()V TODO get args count from
2828 * signature.
29- * jp.igapyon.jcfa.vo.operandstack.JcfaOSLocalVariable@11c8643
29+ * null#jp.igapyon.jcfa.vo.operandstack.JcfaOSLocalVariable@1bc378f
3030 */
3131
3232 /*
--- a/jcfa/testJavaClass/output/test/TestJavaClass011.jcfa
+++ b/jcfa/testJavaClass/output/test/TestJavaClass011.jcfa
@@ -10,7 +10,8 @@ public class TestJavaClass011 {
1010
1111 /*
1212 * 1: invokespecial java/lang/Object#<init>()V TODO get args count from
13- * signature. jp.igapyon.jcfa.vo.operandstack.JcfaOSLocalVariable@22b7f8
13+ * signature.
14+ * null#jp.igapyon.jcfa.vo.operandstack.JcfaOSLocalVariable@e1ccdf
1415 */
1516
1617 /* 4: return */
@@ -28,8 +29,9 @@ public class TestJavaClass011 {
2829
2930 /*
3031 * 5: invokevirtual java/io/PrintStream#println(Ljava/lang/String;)V
31- * TODO get args count from signature.
32- * jp.igapyon.jcfa.vo.operandstack.JcfaOSRef@15c0729
32+ * TODO get args count from signature. java.lang.System#out
33+ * type:Ljava/io
34+ * /PrintStream;#jp.igapyon.jcfa.vo.operandstack.JcfaOSString@51762a
3335 */
3436
3537 /* 8: return */
--- a/jcfa/testJavaClass/output/test/TestJavaClass021.jcfa
+++ b/jcfa/testJavaClass/output/test/TestJavaClass021.jcfa
@@ -10,7 +10,8 @@ public class TestJavaClass021 {
1010
1111 /*
1212 * 1: invokespecial java/lang/Object#<init>()V TODO get args count from
13- * signature. jp.igapyon.jcfa.vo.operandstack.JcfaOSLocalVariable@9d5bae
13+ * signature.
14+ * null#jp.igapyon.jcfa.vo.operandstack.JcfaOSLocalVariable@1d0bf38
1415 */
1516
1617 /* 4: return */
@@ -40,7 +41,8 @@ public class TestJavaClass021 {
4041
4142 /*
4243 * 9: invokevirtual java/io/PrintStream#println(I)V TODO get args count
43- * from signature. jp.igapyon.jcfa.vo.operandstack.JcfaOSRef@ee25db
44+ * from signature.
45+ * null#jp.igapyon.jcfa.vo.operandstack.JcfaOSRef@1ba0e0e
4446 */
4547
4648 /*
--- a/jcfa/testJavaClass/output/test/TestJavaClass031.jcfa
+++ b/jcfa/testJavaClass/output/test/TestJavaClass031.jcfa
@@ -10,7 +10,8 @@ public class TestJavaClass031 {
1010
1111 /*
1212 * 1: invokespecial java/lang/Object#<init>()V TODO get args count from
13- * signature. jp.igapyon.jcfa.vo.operandstack.JcfaOSLocalVariable@8df070
13+ * signature.
14+ * null#jp.igapyon.jcfa.vo.operandstack.JcfaOSLocalVariable@181ab44
1415 */
1516
1617 /* 4: return */
--- a/jcfa/testJavaClass/output/test/TestJavaClass032.jcfa
+++ b/jcfa/testJavaClass/output/test/TestJavaClass032.jcfa
@@ -11,7 +11,7 @@ public class TestJavaClass032 {
1111 /*
1212 * 1: invokespecial java/lang/Object#<init>()V TODO get args count from
1313 * signature.
14- * jp.igapyon.jcfa.vo.operandstack.JcfaOSLocalVariable@1ef1258
14+ * null#jp.igapyon.jcfa.vo.operandstack.JcfaOSLocalVariable@bc8928
1515 */
1616
1717 /* 4: return */
--- a/jcfa/testJavaClass/output/test/TestJavaClass041.jcfa
+++ b/jcfa/testJavaClass/output/test/TestJavaClass041.jcfa
@@ -11,7 +11,7 @@ public class TestJavaClass041 {
1111 /*
1212 * 1: invokespecial java/lang/Object#<init>()V TODO get args count from
1313 * signature.
14- * jp.igapyon.jcfa.vo.operandstack.JcfaOSLocalVariable@1b2d8e0
14+ * null#jp.igapyon.jcfa.vo.operandstack.JcfaOSLocalVariable@1e39a7c
1515 */
1616
1717 /* 4: return */
@@ -35,7 +35,7 @@ public class TestJavaClass041 {
3535 * 6: invokespecial
3636 * java/lang/IllegalArgumentException#<init>(Ljava/lang/String;)V TODO
3737 * get args count from signature.
38- * jp.igapyon.jcfa.vo.operandstack.JcfaOSRef@bc8928
38+ * null#jp.igapyon.jcfa.vo.operandstack.JcfaOSString@1b34d17
3939 */
4040
4141 /*
@@ -54,7 +54,7 @@ public class TestJavaClass041 {
5454 * 12: invokevirtual
5555 * java/lang/IllegalArgumentException#printStackTrace()V TODO get args
5656 * count from signature.
57- * jp.igapyon.jcfa.vo.operandstack.JcfaOSRef@1d0bf38
57+ * null#jp.igapyon.jcfa.vo.operandstack.JcfaOSRef@8a43ba
5858 */
5959
6060 /* 15: return */
Show on old repository browser