sometsome 1.0.2 → 3.10.42

Sign up to get free protection for your applications and to get access to all the features.
Files changed (732) hide show
  1. checksums.yaml +4 -4
  2. data/lib/proguard4.7/README +33 -0
  3. data/lib/proguard4.7/bin/proguard.bat +14 -0
  4. data/lib/proguard4.7/bin/proguard.sh +11 -0
  5. data/lib/proguard4.7/bin/proguardgui.bat +14 -0
  6. data/lib/proguard4.7/bin/proguardgui.sh +15 -0
  7. data/lib/proguard4.7/bin/retrace.bat +14 -0
  8. data/lib/proguard4.7/bin/retrace.sh +12 -0
  9. data/lib/proguard4.7/build/build.sh +94 -0
  10. data/lib/proguard4.7/build/build.xml +171 -0
  11. data/lib/proguard4.7/build/makefile +94 -0
  12. data/lib/proguard4.7/docs/FAQ.html +253 -0
  13. data/lib/proguard4.7/docs/GPL.html +406 -0
  14. data/lib/proguard4.7/docs/GPL_exception.html +56 -0
  15. data/lib/proguard4.7/docs/acknowledgements.html +76 -0
  16. data/lib/proguard4.7/docs/alternatives.html +699 -0
  17. data/lib/proguard4.7/docs/checkmark.gif +0 -0
  18. data/lib/proguard4.7/docs/downloads.html +623 -0
  19. data/lib/proguard4.7/docs/drop1.gif +0 -0
  20. data/lib/proguard4.7/docs/drop2.gif +0 -0
  21. data/lib/proguard4.7/docs/drop3.gif +0 -0
  22. data/lib/proguard4.7/docs/favicon.ico +0 -0
  23. data/lib/proguard4.7/docs/feedback.html +120 -0
  24. data/lib/proguard4.7/docs/index.html +92 -0
  25. data/lib/proguard4.7/docs/license.html +60 -0
  26. data/lib/proguard4.7/docs/main.html +102 -0
  27. data/lib/proguard4.7/docs/manual/ant.html +634 -0
  28. data/lib/proguard4.7/docs/manual/attention.gif +0 -0
  29. data/lib/proguard4.7/docs/manual/examples.html +1504 -0
  30. data/lib/proguard4.7/docs/manual/gui.html +479 -0
  31. data/lib/proguard4.7/docs/manual/index.html +51 -0
  32. data/lib/proguard4.7/docs/manual/introduction.html +173 -0
  33. data/lib/proguard4.7/docs/manual/limitations.html +69 -0
  34. data/lib/proguard4.7/docs/manual/optimizations.html +172 -0
  35. data/lib/proguard4.7/docs/manual/refcard.html +486 -0
  36. data/lib/proguard4.7/docs/manual/retrace/examples.html +345 -0
  37. data/lib/proguard4.7/docs/manual/retrace/index.html +37 -0
  38. data/lib/proguard4.7/docs/manual/retrace/introduction.html +79 -0
  39. data/lib/proguard4.7/docs/manual/retrace/usage.html +127 -0
  40. data/lib/proguard4.7/docs/manual/sections.html +60 -0
  41. data/lib/proguard4.7/docs/manual/style.css +105 -0
  42. data/lib/proguard4.7/docs/manual/troubleshooting.html +729 -0
  43. data/lib/proguard4.7/docs/manual/usage.html +1243 -0
  44. data/lib/proguard4.7/docs/manual/wtk.html +70 -0
  45. data/lib/proguard4.7/docs/quality.html +56 -0
  46. data/lib/proguard4.7/docs/results.html +170 -0
  47. data/lib/proguard4.7/docs/saikoalogo.png +0 -0
  48. data/lib/proguard4.7/docs/screenshot_console.gif +0 -0
  49. data/lib/proguard4.7/docs/screenshot_console_small.gif +0 -0
  50. data/lib/proguard4.7/docs/screenshot_gui1.gif +0 -0
  51. data/lib/proguard4.7/docs/screenshot_gui2.gif +0 -0
  52. data/lib/proguard4.7/docs/screenshot_gui3.gif +0 -0
  53. data/lib/proguard4.7/docs/screenshot_gui4.gif +0 -0
  54. data/lib/proguard4.7/docs/screenshot_gui5.gif +0 -0
  55. data/lib/proguard4.7/docs/screenshot_gui6.gif +0 -0
  56. data/lib/proguard4.7/docs/screenshot_gui7.gif +0 -0
  57. data/lib/proguard4.7/docs/screenshot_gui8.gif +0 -0
  58. data/lib/proguard4.7/docs/screenshots.html +67 -0
  59. data/lib/proguard4.7/docs/screenshots_gui_small.gif +0 -0
  60. data/lib/proguard4.7/docs/sections.html +64 -0
  61. data/lib/proguard4.7/docs/sflogo.png +0 -0
  62. data/lib/proguard4.7/docs/steel.gif +0 -0
  63. data/lib/proguard4.7/docs/style.css +223 -0
  64. data/lib/proguard4.7/docs/testimonials.html +133 -0
  65. data/lib/proguard4.7/docs/title.gif +0 -0
  66. data/lib/proguard4.7/docs/title.html +17 -0
  67. data/lib/proguard4.7/examples/android.pro +149 -0
  68. data/lib/proguard4.7/examples/annotations/examples.pro +60 -0
  69. data/lib/proguard4.7/examples/annotations/examples/Applet.java +22 -0
  70. data/lib/proguard4.7/examples/annotations/examples/Application.java +20 -0
  71. data/lib/proguard4.7/examples/annotations/examples/Bean.java +56 -0
  72. data/lib/proguard4.7/examples/annotations/examples/NativeCallBack.java +44 -0
  73. data/lib/proguard4.7/examples/annotations/lib/annotations.jar +0 -0
  74. data/lib/proguard4.7/examples/annotations/lib/annotations.pro +118 -0
  75. data/lib/proguard4.7/examples/annotations/src/proguard/annotation/Keep.java +18 -0
  76. data/lib/proguard4.7/examples/annotations/src/proguard/annotation/KeepApplication.java +18 -0
  77. data/lib/proguard4.7/examples/annotations/src/proguard/annotation/KeepClassMemberNames.java +18 -0
  78. data/lib/proguard4.7/examples/annotations/src/proguard/annotation/KeepClassMembers.java +18 -0
  79. data/lib/proguard4.7/examples/annotations/src/proguard/annotation/KeepGettersSetters.java +18 -0
  80. data/lib/proguard4.7/examples/annotations/src/proguard/annotation/KeepImplementations.java +18 -0
  81. data/lib/proguard4.7/examples/annotations/src/proguard/annotation/KeepName.java +18 -0
  82. data/lib/proguard4.7/examples/annotations/src/proguard/annotation/KeepPublicClassMemberNames.java +18 -0
  83. data/lib/proguard4.7/examples/annotations/src/proguard/annotation/KeepPublicClassMembers.java +18 -0
  84. data/lib/proguard4.7/examples/annotations/src/proguard/annotation/KeepPublicGettersSetters.java +18 -0
  85. data/lib/proguard4.7/examples/annotations/src/proguard/annotation/KeepPublicImplementations.java +18 -0
  86. data/lib/proguard4.7/examples/annotations/src/proguard/annotation/KeepPublicProtectedClassMemberNames.java +18 -0
  87. data/lib/proguard4.7/examples/annotations/src/proguard/annotation/KeepPublicProtectedClassMembers.java +19 -0
  88. data/lib/proguard4.7/examples/ant/android-8.xml +177 -0
  89. data/lib/proguard4.7/examples/ant/applets.xml +88 -0
  90. data/lib/proguard4.7/examples/ant/applications1.xml +15 -0
  91. data/lib/proguard4.7/examples/ant/applications2.xml +74 -0
  92. data/lib/proguard4.7/examples/ant/applications3.xml +98 -0
  93. data/lib/proguard4.7/examples/ant/library.xml +102 -0
  94. data/lib/proguard4.7/examples/ant/midlets.xml +52 -0
  95. data/lib/proguard4.7/examples/ant/proguard.xml +78 -0
  96. data/lib/proguard4.7/examples/ant/servlets.xml +88 -0
  97. data/lib/proguard4.7/examples/applets.pro +69 -0
  98. data/lib/proguard4.7/examples/applications.pro +75 -0
  99. data/lib/proguard4.7/examples/dictionaries/compact.txt +18 -0
  100. data/lib/proguard4.7/examples/dictionaries/keywords.txt +58 -0
  101. data/lib/proguard4.7/examples/dictionaries/shakespeare.txt +23 -0
  102. data/lib/proguard4.7/examples/dictionaries/windows.txt +209 -0
  103. data/lib/proguard4.7/examples/library.pro +79 -0
  104. data/lib/proguard4.7/examples/midlets.pro +67 -0
  105. data/lib/proguard4.7/examples/proguard.pro +57 -0
  106. data/lib/proguard4.7/examples/proguardall.pro +62 -0
  107. data/lib/proguard4.7/examples/proguardgui.pro +50 -0
  108. data/lib/proguard4.7/examples/retrace.pro +43 -0
  109. data/lib/proguard4.7/examples/scala.pro +132 -0
  110. data/lib/proguard4.7/examples/servlets.pro +70 -0
  111. data/lib/proguard4.7/lib/proguard.jar +0 -0
  112. data/lib/proguard4.7/lib/proguardgui.jar +0 -0
  113. data/lib/proguard4.7/lib/retrace.jar +0 -0
  114. data/lib/proguard4.7/src/proguard/ArgumentWordReader.java +111 -0
  115. data/lib/proguard4.7/src/proguard/ClassPath.java +94 -0
  116. data/lib/proguard4.7/src/proguard/ClassPathEntry.java +282 -0
  117. data/lib/proguard4.7/src/proguard/ClassSpecification.java +259 -0
  118. data/lib/proguard4.7/src/proguard/ClassSpecificationVisitorFactory.java +503 -0
  119. data/lib/proguard4.7/src/proguard/Configuration.java +328 -0
  120. data/lib/proguard4.7/src/proguard/ConfigurationConstants.java +123 -0
  121. data/lib/proguard4.7/src/proguard/ConfigurationParser.java +1285 -0
  122. data/lib/proguard4.7/src/proguard/ConfigurationWriter.java +651 -0
  123. data/lib/proguard4.7/src/proguard/DataEntryReaderFactory.java +141 -0
  124. data/lib/proguard4.7/src/proguard/DataEntryWriterFactory.java +150 -0
  125. data/lib/proguard4.7/src/proguard/DescriptorKeepChecker.java +169 -0
  126. data/lib/proguard4.7/src/proguard/DuplicateClassPrinter.java +63 -0
  127. data/lib/proguard4.7/src/proguard/FileWordReader.java +55 -0
  128. data/lib/proguard4.7/src/proguard/FullyQualifiedClassNameChecker.java +191 -0
  129. data/lib/proguard4.7/src/proguard/GPL.java +197 -0
  130. data/lib/proguard4.7/src/proguard/Initializer.java +424 -0
  131. data/lib/proguard4.7/src/proguard/InputReader.java +233 -0
  132. data/lib/proguard4.7/src/proguard/KeepClassMemberChecker.java +87 -0
  133. data/lib/proguard4.7/src/proguard/KeepClassSpecification.java +137 -0
  134. data/lib/proguard4.7/src/proguard/LineWordReader.java +74 -0
  135. data/lib/proguard4.7/src/proguard/MANIFEST.MF +2 -0
  136. data/lib/proguard4.7/src/proguard/MemberSpecification.java +114 -0
  137. data/lib/proguard4.7/src/proguard/OutputWriter.java +296 -0
  138. data/lib/proguard4.7/src/proguard/ParseException.java +51 -0
  139. data/lib/proguard4.7/src/proguard/ProGuard.java +512 -0
  140. data/lib/proguard4.7/src/proguard/SeedPrinter.java +97 -0
  141. data/lib/proguard4.7/src/proguard/SubclassedClassFilter.java +62 -0
  142. data/lib/proguard4.7/src/proguard/Targeter.java +88 -0
  143. data/lib/proguard4.7/src/proguard/UpToDateChecker.java +232 -0
  144. data/lib/proguard4.7/src/proguard/WordReader.java +387 -0
  145. data/lib/proguard4.7/src/proguard/ant/ClassPathElement.java +191 -0
  146. data/lib/proguard4.7/src/proguard/ant/ClassSpecificationElement.java +258 -0
  147. data/lib/proguard4.7/src/proguard/ant/ConfigurationElement.java +53 -0
  148. data/lib/proguard4.7/src/proguard/ant/ConfigurationTask.java +441 -0
  149. data/lib/proguard4.7/src/proguard/ant/FilterElement.java +85 -0
  150. data/lib/proguard4.7/src/proguard/ant/KeepSpecificationElement.java +87 -0
  151. data/lib/proguard4.7/src/proguard/ant/MemberSpecificationElement.java +218 -0
  152. data/lib/proguard4.7/src/proguard/ant/ProGuardTask.java +352 -0
  153. data/lib/proguard4.7/src/proguard/ant/package.html +3 -0
  154. data/lib/proguard4.7/src/proguard/ant/task.properties +2 -0
  155. data/lib/proguard4.7/src/proguard/classfile/ClassConstants.java +316 -0
  156. data/lib/proguard4.7/src/proguard/classfile/ClassPool.java +152 -0
  157. data/lib/proguard4.7/src/proguard/classfile/Clazz.java +261 -0
  158. data/lib/proguard4.7/src/proguard/classfile/Field.java +32 -0
  159. data/lib/proguard4.7/src/proguard/classfile/LibraryClass.java +548 -0
  160. data/lib/proguard4.7/src/proguard/classfile/LibraryField.java +77 -0
  161. data/lib/proguard4.7/src/proguard/classfile/LibraryMember.java +108 -0
  162. data/lib/proguard4.7/src/proguard/classfile/LibraryMethod.java +83 -0
  163. data/lib/proguard4.7/src/proguard/classfile/Member.java +57 -0
  164. data/lib/proguard4.7/src/proguard/classfile/Method.java +32 -0
  165. data/lib/proguard4.7/src/proguard/classfile/ProgramClass.java +572 -0
  166. data/lib/proguard4.7/src/proguard/classfile/ProgramField.java +93 -0
  167. data/lib/proguard4.7/src/proguard/classfile/ProgramMember.java +168 -0
  168. data/lib/proguard4.7/src/proguard/classfile/ProgramMethod.java +99 -0
  169. data/lib/proguard4.7/src/proguard/classfile/VisitorAccepter.java +47 -0
  170. data/lib/proguard4.7/src/proguard/classfile/attribute/Attribute.java +142 -0
  171. data/lib/proguard4.7/src/proguard/classfile/attribute/BootstrapMethodInfo.java +89 -0
  172. data/lib/proguard4.7/src/proguard/classfile/attribute/BootstrapMethodsAttribute.java +95 -0
  173. data/lib/proguard4.7/src/proguard/classfile/attribute/CodeAttribute.java +202 -0
  174. data/lib/proguard4.7/src/proguard/classfile/attribute/ConstantValueAttribute.java +62 -0
  175. data/lib/proguard4.7/src/proguard/classfile/attribute/DeprecatedAttribute.java +66 -0
  176. data/lib/proguard4.7/src/proguard/classfile/attribute/EnclosingMethodAttribute.java +132 -0
  177. data/lib/proguard4.7/src/proguard/classfile/attribute/ExceptionInfo.java +100 -0
  178. data/lib/proguard4.7/src/proguard/classfile/attribute/ExceptionsAttribute.java +80 -0
  179. data/lib/proguard4.7/src/proguard/classfile/attribute/InnerClassesAttribute.java +80 -0
  180. data/lib/proguard4.7/src/proguard/classfile/attribute/InnerClassesInfo.java +119 -0
  181. data/lib/proguard4.7/src/proguard/classfile/attribute/LineNumberInfo.java +50 -0
  182. data/lib/proguard4.7/src/proguard/classfile/attribute/LineNumberTableAttribute.java +100 -0
  183. data/lib/proguard4.7/src/proguard/classfile/attribute/LocalVariableInfo.java +99 -0
  184. data/lib/proguard4.7/src/proguard/classfile/attribute/LocalVariableTableAttribute.java +79 -0
  185. data/lib/proguard4.7/src/proguard/classfile/attribute/LocalVariableTypeInfo.java +107 -0
  186. data/lib/proguard4.7/src/proguard/classfile/attribute/LocalVariableTypeTableAttribute.java +79 -0
  187. data/lib/proguard4.7/src/proguard/classfile/attribute/SignatureAttribute.java +100 -0
  188. data/lib/proguard4.7/src/proguard/classfile/attribute/SourceDirAttribute.java +62 -0
  189. data/lib/proguard4.7/src/proguard/classfile/attribute/SourceFileAttribute.java +62 -0
  190. data/lib/proguard4.7/src/proguard/classfile/attribute/SyntheticAttribute.java +66 -0
  191. data/lib/proguard4.7/src/proguard/classfile/attribute/UnknownAttribute.java +82 -0
  192. data/lib/proguard4.7/src/proguard/classfile/attribute/annotation/Annotation.java +143 -0
  193. data/lib/proguard4.7/src/proguard/classfile/attribute/annotation/AnnotationDefaultAttribute.java +73 -0
  194. data/lib/proguard4.7/src/proguard/classfile/attribute/annotation/AnnotationElementValue.java +76 -0
  195. data/lib/proguard4.7/src/proguard/classfile/attribute/annotation/AnnotationsAttribute.java +100 -0
  196. data/lib/proguard4.7/src/proguard/classfile/attribute/annotation/ArrayElementValue.java +82 -0
  197. data/lib/proguard4.7/src/proguard/classfile/attribute/annotation/ClassElementValue.java +95 -0
  198. data/lib/proguard4.7/src/proguard/classfile/attribute/annotation/ConstantElementValue.java +71 -0
  199. data/lib/proguard4.7/src/proguard/classfile/attribute/annotation/ElementValue.java +126 -0
  200. data/lib/proguard4.7/src/proguard/classfile/attribute/annotation/EnumConstantElementValue.java +99 -0
  201. data/lib/proguard4.7/src/proguard/classfile/attribute/annotation/ParameterAnnotationsAttribute.java +83 -0
  202. data/lib/proguard4.7/src/proguard/classfile/attribute/annotation/RuntimeInvisibleAnnotationsAttribute.java +70 -0
  203. data/lib/proguard4.7/src/proguard/classfile/attribute/annotation/RuntimeInvisibleParameterAnnotationsAttribute.java +62 -0
  204. data/lib/proguard4.7/src/proguard/classfile/attribute/annotation/RuntimeVisibleAnnotationsAttribute.java +70 -0
  205. data/lib/proguard4.7/src/proguard/classfile/attribute/annotation/RuntimeVisibleParameterAnnotationsAttribute.java +62 -0
  206. data/lib/proguard4.7/src/proguard/classfile/attribute/annotation/package.html +4 -0
  207. data/lib/proguard4.7/src/proguard/classfile/attribute/annotation/visitor/AllAnnotationVisitor.java +100 -0
  208. data/lib/proguard4.7/src/proguard/classfile/attribute/annotation/visitor/AnnotatedClassVisitor.java +62 -0
  209. data/lib/proguard4.7/src/proguard/classfile/attribute/annotation/visitor/AnnotationToMemberVisitor.java +62 -0
  210. data/lib/proguard4.7/src/proguard/classfile/attribute/annotation/visitor/AnnotationTypeFilter.java +102 -0
  211. data/lib/proguard4.7/src/proguard/classfile/attribute/annotation/visitor/AnnotationVisitor.java +40 -0
  212. data/lib/proguard4.7/src/proguard/classfile/attribute/annotation/visitor/ElementValueVisitor.java +51 -0
  213. data/lib/proguard4.7/src/proguard/classfile/attribute/annotation/visitor/package.html +3 -0
  214. data/lib/proguard4.7/src/proguard/classfile/attribute/package.html +3 -0
  215. data/lib/proguard4.7/src/proguard/classfile/attribute/preverification/DoubleType.java +66 -0
  216. data/lib/proguard4.7/src/proguard/classfile/attribute/preverification/FloatType.java +66 -0
  217. data/lib/proguard4.7/src/proguard/classfile/attribute/preverification/FullFrame.java +202 -0
  218. data/lib/proguard4.7/src/proguard/classfile/attribute/preverification/IntegerType.java +66 -0
  219. data/lib/proguard4.7/src/proguard/classfile/attribute/preverification/LessZeroFrame.java +103 -0
  220. data/lib/proguard4.7/src/proguard/classfile/attribute/preverification/LongType.java +66 -0
  221. data/lib/proguard4.7/src/proguard/classfile/attribute/preverification/MoreZeroFrame.java +161 -0
  222. data/lib/proguard4.7/src/proguard/classfile/attribute/preverification/NullType.java +66 -0
  223. data/lib/proguard4.7/src/proguard/classfile/attribute/preverification/ObjectType.java +107 -0
  224. data/lib/proguard4.7/src/proguard/classfile/attribute/preverification/SameOneFrame.java +115 -0
  225. data/lib/proguard4.7/src/proguard/classfile/attribute/preverification/SameZeroFrame.java +74 -0
  226. data/lib/proguard4.7/src/proguard/classfile/attribute/preverification/StackMapAttribute.java +91 -0
  227. data/lib/proguard4.7/src/proguard/classfile/attribute/preverification/StackMapFrame.java +117 -0
  228. data/lib/proguard4.7/src/proguard/classfile/attribute/preverification/StackMapTableAttribute.java +93 -0
  229. data/lib/proguard4.7/src/proguard/classfile/attribute/preverification/TopType.java +66 -0
  230. data/lib/proguard4.7/src/proguard/classfile/attribute/preverification/UninitializedThisType.java +66 -0
  231. data/lib/proguard4.7/src/proguard/classfile/attribute/preverification/UninitializedType.java +106 -0
  232. data/lib/proguard4.7/src/proguard/classfile/attribute/preverification/VerificationType.java +103 -0
  233. data/lib/proguard4.7/src/proguard/classfile/attribute/preverification/VerificationTypeFactory.java +112 -0
  234. data/lib/proguard4.7/src/proguard/classfile/attribute/preverification/visitor/StackMapFrameVisitor.java +40 -0
  235. data/lib/proguard4.7/src/proguard/classfile/attribute/preverification/visitor/VerificationTypeVisitor.java +65 -0
  236. data/lib/proguard4.7/src/proguard/classfile/attribute/visitor/AllAttributeVisitor.java +117 -0
  237. data/lib/proguard4.7/src/proguard/classfile/attribute/visitor/AllBootstrapMethodInfoVisitor.java +55 -0
  238. data/lib/proguard4.7/src/proguard/classfile/attribute/visitor/AllExceptionInfoVisitor.java +55 -0
  239. data/lib/proguard4.7/src/proguard/classfile/attribute/visitor/AllInnerClassesInfoVisitor.java +55 -0
  240. data/lib/proguard4.7/src/proguard/classfile/attribute/visitor/AttributeNameFilter.java +368 -0
  241. data/lib/proguard4.7/src/proguard/classfile/attribute/visitor/AttributeVisitor.java +90 -0
  242. data/lib/proguard4.7/src/proguard/classfile/attribute/visitor/BootstrapMethodInfoVisitor.java +40 -0
  243. data/lib/proguard4.7/src/proguard/classfile/attribute/visitor/ExceptionInfoVisitor.java +37 -0
  244. data/lib/proguard4.7/src/proguard/classfile/attribute/visitor/InnerClassesInfoVisitor.java +38 -0
  245. data/lib/proguard4.7/src/proguard/classfile/attribute/visitor/LineNumberInfoVisitor.java +38 -0
  246. data/lib/proguard4.7/src/proguard/classfile/attribute/visitor/LocalVariableInfoVisitor.java +38 -0
  247. data/lib/proguard4.7/src/proguard/classfile/attribute/visitor/LocalVariableTypeInfoVisitor.java +38 -0
  248. data/lib/proguard4.7/src/proguard/classfile/attribute/visitor/MultiAttributeVisitor.java +365 -0
  249. data/lib/proguard4.7/src/proguard/classfile/attribute/visitor/NonEmptyAttributeFilter.java +293 -0
  250. data/lib/proguard4.7/src/proguard/classfile/attribute/visitor/RequiredAttributeFilter.java +360 -0
  251. data/lib/proguard4.7/src/proguard/classfile/attribute/visitor/StackSizeComputer.java +378 -0
  252. data/lib/proguard4.7/src/proguard/classfile/attribute/visitor/package.html +3 -0
  253. data/lib/proguard4.7/src/proguard/classfile/constant/ClassConstant.java +105 -0
  254. data/lib/proguard4.7/src/proguard/classfile/constant/Constant.java +68 -0
  255. data/lib/proguard4.7/src/proguard/classfile/constant/DoubleConstant.java +82 -0
  256. data/lib/proguard4.7/src/proguard/classfile/constant/FieldrefConstant.java +71 -0
  257. data/lib/proguard4.7/src/proguard/classfile/constant/FloatConstant.java +82 -0
  258. data/lib/proguard4.7/src/proguard/classfile/constant/IntegerConstant.java +82 -0
  259. data/lib/proguard4.7/src/proguard/classfile/constant/InterfaceMethodrefConstant.java +71 -0
  260. data/lib/proguard4.7/src/proguard/classfile/constant/InvokeDynamicConstant.java +148 -0
  261. data/lib/proguard4.7/src/proguard/classfile/constant/LongConstant.java +82 -0
  262. data/lib/proguard4.7/src/proguard/classfile/constant/MethodHandleConstant.java +124 -0
  263. data/lib/proguard4.7/src/proguard/classfile/constant/MethodTypeConstant.java +93 -0
  264. data/lib/proguard4.7/src/proguard/classfile/constant/MethodrefConstant.java +71 -0
  265. data/lib/proguard4.7/src/proguard/classfile/constant/NameAndTypeConstant.java +119 -0
  266. data/lib/proguard4.7/src/proguard/classfile/constant/RefConstant.java +130 -0
  267. data/lib/proguard4.7/src/proguard/classfile/constant/StringConstant.java +135 -0
  268. data/lib/proguard4.7/src/proguard/classfile/constant/Utf8Constant.java +285 -0
  269. data/lib/proguard4.7/src/proguard/classfile/constant/visitor/AllConstantVisitor.java +53 -0
  270. data/lib/proguard4.7/src/proguard/classfile/constant/visitor/BootstrapMethodHandleTraveler.java +100 -0
  271. data/lib/proguard4.7/src/proguard/classfile/constant/visitor/ConstantTagFilter.java +86 -0
  272. data/lib/proguard4.7/src/proguard/classfile/constant/visitor/ConstantVisitor.java +49 -0
  273. data/lib/proguard4.7/src/proguard/classfile/constant/visitor/ExceptClassConstantFilter.java +69 -0
  274. data/lib/proguard4.7/src/proguard/classfile/constant/visitor/MethodrefTraveler.java +60 -0
  275. data/lib/proguard4.7/src/proguard/classfile/constant/visitor/package.html +3 -0
  276. data/lib/proguard4.7/src/proguard/classfile/editor/AccessFixer.java +180 -0
  277. data/lib/proguard4.7/src/proguard/classfile/editor/AnnotationAdder.java +153 -0
  278. data/lib/proguard4.7/src/proguard/classfile/editor/AnnotationsAttributeEditor.java +67 -0
  279. data/lib/proguard4.7/src/proguard/classfile/editor/AttributeAdder.java +457 -0
  280. data/lib/proguard4.7/src/proguard/classfile/editor/AttributeSorter.java +89 -0
  281. data/lib/proguard4.7/src/proguard/classfile/editor/AttributesEditor.java +269 -0
  282. data/lib/proguard4.7/src/proguard/classfile/editor/BridgeMethodFixer.java +117 -0
  283. data/lib/proguard4.7/src/proguard/classfile/editor/ClassEditor.java +255 -0
  284. data/lib/proguard4.7/src/proguard/classfile/editor/ClassElementSorter.java +52 -0
  285. data/lib/proguard4.7/src/proguard/classfile/editor/ClassMemberSorter.java +69 -0
  286. data/lib/proguard4.7/src/proguard/classfile/editor/ClassReferenceFixer.java +546 -0
  287. data/lib/proguard4.7/src/proguard/classfile/editor/CodeAttributeComposer.java +843 -0
  288. data/lib/proguard4.7/src/proguard/classfile/editor/CodeAttributeEditor.java +1104 -0
  289. data/lib/proguard4.7/src/proguard/classfile/editor/CodeAttributeEditorResetter.java +60 -0
  290. data/lib/proguard4.7/src/proguard/classfile/editor/ComparableConstant.java +249 -0
  291. data/lib/proguard4.7/src/proguard/classfile/editor/ConstantAdder.java +239 -0
  292. data/lib/proguard4.7/src/proguard/classfile/editor/ConstantPoolEditor.java +782 -0
  293. data/lib/proguard4.7/src/proguard/classfile/editor/ConstantPoolRemapper.java +662 -0
  294. data/lib/proguard4.7/src/proguard/classfile/editor/ConstantPoolShrinker.java +578 -0
  295. data/lib/proguard4.7/src/proguard/classfile/editor/ConstantPoolSorter.java +123 -0
  296. data/lib/proguard4.7/src/proguard/classfile/editor/ElementValueAdder.java +217 -0
  297. data/lib/proguard4.7/src/proguard/classfile/editor/ElementValuesEditor.java +238 -0
  298. data/lib/proguard4.7/src/proguard/classfile/editor/ExceptionAdder.java +65 -0
  299. data/lib/proguard4.7/src/proguard/classfile/editor/ExceptionInfoAdder.java +67 -0
  300. data/lib/proguard4.7/src/proguard/classfile/editor/ExceptionsAttributeEditor.java +68 -0
  301. data/lib/proguard4.7/src/proguard/classfile/editor/InnerClassesAccessFixer.java +83 -0
  302. data/lib/proguard4.7/src/proguard/classfile/editor/InstructionAdder.java +76 -0
  303. data/lib/proguard4.7/src/proguard/classfile/editor/InstructionWriter.java +278 -0
  304. data/lib/proguard4.7/src/proguard/classfile/editor/InterfaceAdder.java +62 -0
  305. data/lib/proguard4.7/src/proguard/classfile/editor/InterfaceSorter.java +152 -0
  306. data/lib/proguard4.7/src/proguard/classfile/editor/InterfacesEditor.java +122 -0
  307. data/lib/proguard4.7/src/proguard/classfile/editor/LineNumberInfoAdder.java +59 -0
  308. data/lib/proguard4.7/src/proguard/classfile/editor/LineNumberTableAttributeEditor.java +67 -0
  309. data/lib/proguard4.7/src/proguard/classfile/editor/LocalVariableInfoAdder.java +67 -0
  310. data/lib/proguard4.7/src/proguard/classfile/editor/LocalVariableTableAttributeEditor.java +67 -0
  311. data/lib/proguard4.7/src/proguard/classfile/editor/LocalVariableTypeInfoAdder.java +68 -0
  312. data/lib/proguard4.7/src/proguard/classfile/editor/LocalVariableTypeTableAttributeEditor.java +68 -0
  313. data/lib/proguard4.7/src/proguard/classfile/editor/MemberAdder.java +288 -0
  314. data/lib/proguard4.7/src/proguard/classfile/editor/MemberReferenceFixer.java +447 -0
  315. data/lib/proguard4.7/src/proguard/classfile/editor/MethodInvocationFixer.java +243 -0
  316. data/lib/proguard4.7/src/proguard/classfile/editor/NameAndTypeShrinker.java +188 -0
  317. data/lib/proguard4.7/src/proguard/classfile/editor/NamedAttributeDeleter.java +54 -0
  318. data/lib/proguard4.7/src/proguard/classfile/editor/ParameterAnnotationsAttributeEditor.java +71 -0
  319. data/lib/proguard4.7/src/proguard/classfile/editor/StackSizeUpdater.java +54 -0
  320. data/lib/proguard4.7/src/proguard/classfile/editor/SubclassAdder.java +59 -0
  321. data/lib/proguard4.7/src/proguard/classfile/editor/SubclassToAdder.java +60 -0
  322. data/lib/proguard4.7/src/proguard/classfile/editor/Utf8Shrinker.java +455 -0
  323. data/lib/proguard4.7/src/proguard/classfile/editor/VariableCleaner.java +267 -0
  324. data/lib/proguard4.7/src/proguard/classfile/editor/VariableEditor.java +130 -0
  325. data/lib/proguard4.7/src/proguard/classfile/editor/VariableRemapper.java +156 -0
  326. data/lib/proguard4.7/src/proguard/classfile/editor/VariableSizeUpdater.java +105 -0
  327. data/lib/proguard4.7/src/proguard/classfile/editor/package.html +3 -0
  328. data/lib/proguard4.7/src/proguard/classfile/instruction/BranchInstruction.java +180 -0
  329. data/lib/proguard4.7/src/proguard/classfile/instruction/ConstantInstruction.java +309 -0
  330. data/lib/proguard4.7/src/proguard/classfile/instruction/Instruction.java +920 -0
  331. data/lib/proguard4.7/src/proguard/classfile/instruction/InstructionConstants.java +449 -0
  332. data/lib/proguard4.7/src/proguard/classfile/instruction/InstructionFactory.java +300 -0
  333. data/lib/proguard4.7/src/proguard/classfile/instruction/InstructionUtil.java +67 -0
  334. data/lib/proguard4.7/src/proguard/classfile/instruction/LookUpSwitchInstruction.java +135 -0
  335. data/lib/proguard4.7/src/proguard/classfile/instruction/SimpleInstruction.java +255 -0
  336. data/lib/proguard4.7/src/proguard/classfile/instruction/SwitchInstruction.java +83 -0
  337. data/lib/proguard4.7/src/proguard/classfile/instruction/TableSwitchInstruction.java +139 -0
  338. data/lib/proguard4.7/src/proguard/classfile/instruction/VariableInstruction.java +372 -0
  339. data/lib/proguard4.7/src/proguard/classfile/instruction/package.html +9 -0
  340. data/lib/proguard4.7/src/proguard/classfile/instruction/visitor/AllInstructionVisitor.java +56 -0
  341. data/lib/proguard4.7/src/proguard/classfile/instruction/visitor/InstructionCounter.java +59 -0
  342. data/lib/proguard4.7/src/proguard/classfile/instruction/visitor/InstructionVisitor.java +42 -0
  343. data/lib/proguard4.7/src/proguard/classfile/instruction/visitor/MultiInstructionVisitor.java +131 -0
  344. data/lib/proguard4.7/src/proguard/classfile/instruction/visitor/package.html +3 -0
  345. data/lib/proguard4.7/src/proguard/classfile/io/LibraryClassReader.java +383 -0
  346. data/lib/proguard4.7/src/proguard/classfile/io/ProgramClassReader.java +919 -0
  347. data/lib/proguard4.7/src/proguard/classfile/io/ProgramClassWriter.java +735 -0
  348. data/lib/proguard4.7/src/proguard/classfile/io/RuntimeDataInput.java +223 -0
  349. data/lib/proguard4.7/src/proguard/classfile/io/RuntimeDataOutput.java +224 -0
  350. data/lib/proguard4.7/src/proguard/classfile/io/package.html +3 -0
  351. data/lib/proguard4.7/src/proguard/classfile/package.html +15 -0
  352. data/lib/proguard4.7/src/proguard/classfile/util/AccessUtil.java +105 -0
  353. data/lib/proguard4.7/src/proguard/classfile/util/ClassReferenceInitializer.java +559 -0
  354. data/lib/proguard4.7/src/proguard/classfile/util/ClassSubHierarchyInitializer.java +77 -0
  355. data/lib/proguard4.7/src/proguard/classfile/util/ClassSuperHierarchyInitializer.java +163 -0
  356. data/lib/proguard4.7/src/proguard/classfile/util/ClassUtil.java +1227 -0
  357. data/lib/proguard4.7/src/proguard/classfile/util/DescriptorClassEnumeration.java +236 -0
  358. data/lib/proguard4.7/src/proguard/classfile/util/DynamicClassReferenceInitializer.java +485 -0
  359. data/lib/proguard4.7/src/proguard/classfile/util/DynamicMemberReferenceInitializer.java +944 -0
  360. data/lib/proguard4.7/src/proguard/classfile/util/ExternalTypeEnumeration.java +106 -0
  361. data/lib/proguard4.7/src/proguard/classfile/util/InstructionSequenceMatcher.java +754 -0
  362. data/lib/proguard4.7/src/proguard/classfile/util/InternalTypeEnumeration.java +204 -0
  363. data/lib/proguard4.7/src/proguard/classfile/util/MemberFinder.java +197 -0
  364. data/lib/proguard4.7/src/proguard/classfile/util/MethodLinker.java +160 -0
  365. data/lib/proguard4.7/src/proguard/classfile/util/SimplifiedVisitor.java +834 -0
  366. data/lib/proguard4.7/src/proguard/classfile/util/StringReferenceInitializer.java +90 -0
  367. data/lib/proguard4.7/src/proguard/classfile/util/StringSharer.java +172 -0
  368. data/lib/proguard4.7/src/proguard/classfile/util/WarningPrinter.java +136 -0
  369. data/lib/proguard4.7/src/proguard/classfile/util/package.html +3 -0
  370. data/lib/proguard4.7/src/proguard/classfile/visitor/AllClassVisitor.java +47 -0
  371. data/lib/proguard4.7/src/proguard/classfile/visitor/AllFieldVisitor.java +55 -0
  372. data/lib/proguard4.7/src/proguard/classfile/visitor/AllMemberVisitor.java +57 -0
  373. data/lib/proguard4.7/src/proguard/classfile/visitor/AllMethodVisitor.java +55 -0
  374. data/lib/proguard4.7/src/proguard/classfile/visitor/BottomClassFilter.java +69 -0
  375. data/lib/proguard4.7/src/proguard/classfile/visitor/ClassAccessFilter.java +88 -0
  376. data/lib/proguard4.7/src/proguard/classfile/visitor/ClassCleaner.java +275 -0
  377. data/lib/proguard4.7/src/proguard/classfile/visitor/ClassCollector.java +58 -0
  378. data/lib/proguard4.7/src/proguard/classfile/visitor/ClassCounter.java +56 -0
  379. data/lib/proguard4.7/src/proguard/classfile/visitor/ClassHierarchyTraveler.java +91 -0
  380. data/lib/proguard4.7/src/proguard/classfile/visitor/ClassNameFilter.java +112 -0
  381. data/lib/proguard4.7/src/proguard/classfile/visitor/ClassPoolFiller.java +55 -0
  382. data/lib/proguard4.7/src/proguard/classfile/visitor/ClassPoolVisitor.java +37 -0
  383. data/lib/proguard4.7/src/proguard/classfile/visitor/ClassPresenceFilter.java +93 -0
  384. data/lib/proguard4.7/src/proguard/classfile/visitor/ClassPrinter.java +1011 -0
  385. data/lib/proguard4.7/src/proguard/classfile/visitor/ClassVersionFilter.java +85 -0
  386. data/lib/proguard4.7/src/proguard/classfile/visitor/ClassVersionSetter.java +83 -0
  387. data/lib/proguard4.7/src/proguard/classfile/visitor/ClassVisitor.java +36 -0
  388. data/lib/proguard4.7/src/proguard/classfile/visitor/ConcreteClassDownTraveler.java +100 -0
  389. data/lib/proguard4.7/src/proguard/classfile/visitor/DotClassClassVisitor.java +89 -0
  390. data/lib/proguard4.7/src/proguard/classfile/visitor/ExceptClassFilter.java +69 -0
  391. data/lib/proguard4.7/src/proguard/classfile/visitor/ExceptClassesFilter.java +90 -0
  392. data/lib/proguard4.7/src/proguard/classfile/visitor/ExceptionCounter.java +52 -0
  393. data/lib/proguard4.7/src/proguard/classfile/visitor/ExceptionExcludedOffsetFilter.java +64 -0
  394. data/lib/proguard4.7/src/proguard/classfile/visitor/ExceptionHandlerConstantVisitor.java +62 -0
  395. data/lib/proguard4.7/src/proguard/classfile/visitor/ExceptionHandlerFilter.java +70 -0
  396. data/lib/proguard4.7/src/proguard/classfile/visitor/ExceptionOffsetFilter.java +64 -0
  397. data/lib/proguard4.7/src/proguard/classfile/visitor/ExceptionRangeFilter.java +68 -0
  398. data/lib/proguard4.7/src/proguard/classfile/visitor/ImplementedClassConstantFilter.java +69 -0
  399. data/lib/proguard4.7/src/proguard/classfile/visitor/ImplementedClassFilter.java +71 -0
  400. data/lib/proguard4.7/src/proguard/classfile/visitor/ImplementingClassConstantFilter.java +70 -0
  401. data/lib/proguard4.7/src/proguard/classfile/visitor/LibraryClassFilter.java +60 -0
  402. data/lib/proguard4.7/src/proguard/classfile/visitor/LibraryMemberFilter.java +73 -0
  403. data/lib/proguard4.7/src/proguard/classfile/visitor/MemberAccessFilter.java +122 -0
  404. data/lib/proguard4.7/src/proguard/classfile/visitor/MemberClassAccessFilter.java +106 -0
  405. data/lib/proguard4.7/src/proguard/classfile/visitor/MemberCollector.java +59 -0
  406. data/lib/proguard4.7/src/proguard/classfile/visitor/MemberCounter.java +72 -0
  407. data/lib/proguard4.7/src/proguard/classfile/visitor/MemberDescriptorFilter.java +113 -0
  408. data/lib/proguard4.7/src/proguard/classfile/visitor/MemberNameFilter.java +113 -0
  409. data/lib/proguard4.7/src/proguard/classfile/visitor/MemberToClassVisitor.java +90 -0
  410. data/lib/proguard4.7/src/proguard/classfile/visitor/MemberVisitor.java +40 -0
  411. data/lib/proguard4.7/src/proguard/classfile/visitor/MethodImplementationFilter.java +70 -0
  412. data/lib/proguard4.7/src/proguard/classfile/visitor/MethodImplementationTraveler.java +128 -0
  413. data/lib/proguard4.7/src/proguard/classfile/visitor/MultiClassPoolVisitor.java +88 -0
  414. data/lib/proguard4.7/src/proguard/classfile/visitor/MultiClassVisitor.java +97 -0
  415. data/lib/proguard4.7/src/proguard/classfile/visitor/MultiMemberVisitor.java +113 -0
  416. data/lib/proguard4.7/src/proguard/classfile/visitor/NamedClassVisitor.java +49 -0
  417. data/lib/proguard4.7/src/proguard/classfile/visitor/NamedFieldVisitor.java +61 -0
  418. data/lib/proguard4.7/src/proguard/classfile/visitor/NamedMethodVisitor.java +61 -0
  419. data/lib/proguard4.7/src/proguard/classfile/visitor/ProgramClassFilter.java +60 -0
  420. data/lib/proguard4.7/src/proguard/classfile/visitor/ProgramMemberFilter.java +73 -0
  421. data/lib/proguard4.7/src/proguard/classfile/visitor/ReferencedClassVisitor.java +255 -0
  422. data/lib/proguard4.7/src/proguard/classfile/visitor/ReferencedMemberVisitor.java +73 -0
  423. data/lib/proguard4.7/src/proguard/classfile/visitor/SimilarMemberVisitor.java +125 -0
  424. data/lib/proguard4.7/src/proguard/classfile/visitor/SimpleClassPrinter.java +167 -0
  425. data/lib/proguard4.7/src/proguard/classfile/visitor/SubclassFilter.java +91 -0
  426. data/lib/proguard4.7/src/proguard/classfile/visitor/SubclassTraveler.java +60 -0
  427. data/lib/proguard4.7/src/proguard/classfile/visitor/VariableClassVisitor.java +78 -0
  428. data/lib/proguard4.7/src/proguard/classfile/visitor/VariableMemberVisitor.java +96 -0
  429. data/lib/proguard4.7/src/proguard/classfile/visitor/package.html +40 -0
  430. data/lib/proguard4.7/src/proguard/evaluation/BasicBranchUnit.java +126 -0
  431. data/lib/proguard4.7/src/proguard/evaluation/BasicInvocationUnit.java +425 -0
  432. data/lib/proguard4.7/src/proguard/evaluation/BranchUnit.java +63 -0
  433. data/lib/proguard4.7/src/proguard/evaluation/ClassConstantValueFactory.java +53 -0
  434. data/lib/proguard4.7/src/proguard/evaluation/ConstantValueFactory.java +113 -0
  435. data/lib/proguard4.7/src/proguard/evaluation/InvocationUnit.java +62 -0
  436. data/lib/proguard4.7/src/proguard/evaluation/Processor.java +908 -0
  437. data/lib/proguard4.7/src/proguard/evaluation/Stack.java +560 -0
  438. data/lib/proguard4.7/src/proguard/evaluation/TracedStack.java +342 -0
  439. data/lib/proguard4.7/src/proguard/evaluation/TracedVariables.java +199 -0
  440. data/lib/proguard4.7/src/proguard/evaluation/Variables.java +347 -0
  441. data/lib/proguard4.7/src/proguard/evaluation/value/Category1Value.java +41 -0
  442. data/lib/proguard4.7/src/proguard/evaluation/value/Category2Value.java +41 -0
  443. data/lib/proguard4.7/src/proguard/evaluation/value/ComparisonValue.java +69 -0
  444. data/lib/proguard4.7/src/proguard/evaluation/value/CompositeDoubleValue.java +81 -0
  445. data/lib/proguard4.7/src/proguard/evaluation/value/CompositeFloatValue.java +81 -0
  446. data/lib/proguard4.7/src/proguard/evaluation/value/CompositeIntegerValue.java +87 -0
  447. data/lib/proguard4.7/src/proguard/evaluation/value/CompositeLongValue.java +87 -0
  448. data/lib/proguard4.7/src/proguard/evaluation/value/ConvertedByteValue.java +64 -0
  449. data/lib/proguard4.7/src/proguard/evaluation/value/ConvertedCharacterValue.java +64 -0
  450. data/lib/proguard4.7/src/proguard/evaluation/value/ConvertedDoubleValue.java +64 -0
  451. data/lib/proguard4.7/src/proguard/evaluation/value/ConvertedFloatValue.java +64 -0
  452. data/lib/proguard4.7/src/proguard/evaluation/value/ConvertedIntegerValue.java +64 -0
  453. data/lib/proguard4.7/src/proguard/evaluation/value/ConvertedLongValue.java +64 -0
  454. data/lib/proguard4.7/src/proguard/evaluation/value/ConvertedShortValue.java +64 -0
  455. data/lib/proguard4.7/src/proguard/evaluation/value/DoubleValue.java +359 -0
  456. data/lib/proguard4.7/src/proguard/evaluation/value/FloatValue.java +359 -0
  457. data/lib/proguard4.7/src/proguard/evaluation/value/IdentifiedDoubleValue.java +67 -0
  458. data/lib/proguard4.7/src/proguard/evaluation/value/IdentifiedFloatValue.java +67 -0
  459. data/lib/proguard4.7/src/proguard/evaluation/value/IdentifiedIntegerValue.java +67 -0
  460. data/lib/proguard4.7/src/proguard/evaluation/value/IdentifiedLongValue.java +67 -0
  461. data/lib/proguard4.7/src/proguard/evaluation/value/IdentifiedReferenceValue.java +102 -0
  462. data/lib/proguard4.7/src/proguard/evaluation/value/IdentifiedValueFactory.java +75 -0
  463. data/lib/proguard4.7/src/proguard/evaluation/value/InstructionOffsetValue.java +307 -0
  464. data/lib/proguard4.7/src/proguard/evaluation/value/IntegerValue.java +1002 -0
  465. data/lib/proguard4.7/src/proguard/evaluation/value/LongValue.java +554 -0
  466. data/lib/proguard4.7/src/proguard/evaluation/value/NegatedDoubleValue.java +71 -0
  467. data/lib/proguard4.7/src/proguard/evaluation/value/NegatedFloatValue.java +71 -0
  468. data/lib/proguard4.7/src/proguard/evaluation/value/NegatedIntegerValue.java +71 -0
  469. data/lib/proguard4.7/src/proguard/evaluation/value/NegatedLongValue.java +71 -0
  470. data/lib/proguard4.7/src/proguard/evaluation/value/ParticularDoubleValue.java +216 -0
  471. data/lib/proguard4.7/src/proguard/evaluation/value/ParticularFloatValue.java +216 -0
  472. data/lib/proguard4.7/src/proguard/evaluation/value/ParticularIntegerValue.java +383 -0
  473. data/lib/proguard4.7/src/proguard/evaluation/value/ParticularLongValue.java +271 -0
  474. data/lib/proguard4.7/src/proguard/evaluation/value/ReferenceValue.java +540 -0
  475. data/lib/proguard4.7/src/proguard/evaluation/value/SpecificDoubleValue.java +186 -0
  476. data/lib/proguard4.7/src/proguard/evaluation/value/SpecificFloatValue.java +186 -0
  477. data/lib/proguard4.7/src/proguard/evaluation/value/SpecificIntegerValue.java +354 -0
  478. data/lib/proguard4.7/src/proguard/evaluation/value/SpecificLongValue.java +259 -0
  479. data/lib/proguard4.7/src/proguard/evaluation/value/SpecificValueFactory.java +97 -0
  480. data/lib/proguard4.7/src/proguard/evaluation/value/TopValue.java +79 -0
  481. data/lib/proguard4.7/src/proguard/evaluation/value/UnknownDoubleValue.java +125 -0
  482. data/lib/proguard4.7/src/proguard/evaluation/value/UnknownFloatValue.java +125 -0
  483. data/lib/proguard4.7/src/proguard/evaluation/value/UnknownIntegerValue.java +216 -0
  484. data/lib/proguard4.7/src/proguard/evaluation/value/UnknownLongValue.java +160 -0
  485. data/lib/proguard4.7/src/proguard/evaluation/value/Value.java +169 -0
  486. data/lib/proguard4.7/src/proguard/evaluation/value/ValueFactory.java +193 -0
  487. data/lib/proguard4.7/src/proguard/evaluation/value/package.html +3 -0
  488. data/lib/proguard4.7/src/proguard/gui/ClassPathPanel.java +441 -0
  489. data/lib/proguard4.7/src/proguard/gui/ClassSpecificationDialog.java +546 -0
  490. data/lib/proguard4.7/src/proguard/gui/ClassSpecificationsPanel.java +231 -0
  491. data/lib/proguard4.7/src/proguard/gui/ExtensionFileFilter.java +78 -0
  492. data/lib/proguard4.7/src/proguard/gui/FilterBuilder.java +208 -0
  493. data/lib/proguard4.7/src/proguard/gui/FilterDialog.java +320 -0
  494. data/lib/proguard4.7/src/proguard/gui/GUIResources.java +56 -0
  495. data/lib/proguard4.7/src/proguard/gui/GUIResources.properties +643 -0
  496. data/lib/proguard4.7/src/proguard/gui/KeepSpecificationsPanel.java +81 -0
  497. data/lib/proguard4.7/src/proguard/gui/ListPanel.java +341 -0
  498. data/lib/proguard4.7/src/proguard/gui/MANIFEST.MF +3 -0
  499. data/lib/proguard4.7/src/proguard/gui/MemberSpecificationDialog.java +509 -0
  500. data/lib/proguard4.7/src/proguard/gui/MemberSpecificationsPanel.java +304 -0
  501. data/lib/proguard4.7/src/proguard/gui/MessageDialogRunnable.java +90 -0
  502. data/lib/proguard4.7/src/proguard/gui/OptimizationsDialog.java +251 -0
  503. data/lib/proguard4.7/src/proguard/gui/ProGuardGUI.java +1777 -0
  504. data/lib/proguard4.7/src/proguard/gui/ProGuardRunnable.java +154 -0
  505. data/lib/proguard4.7/src/proguard/gui/ReTraceRunnable.java +149 -0
  506. data/lib/proguard4.7/src/proguard/gui/SwingUtil.java +82 -0
  507. data/lib/proguard4.7/src/proguard/gui/TabbedPane.java +229 -0
  508. data/lib/proguard4.7/src/proguard/gui/TextAreaOutputStream.java +81 -0
  509. data/lib/proguard4.7/src/proguard/gui/arrow.gif +0 -0
  510. data/lib/proguard4.7/src/proguard/gui/boilerplate.pro +410 -0
  511. data/lib/proguard4.7/src/proguard/gui/default.pro +318 -0
  512. data/lib/proguard4.7/src/proguard/gui/package.html +3 -0
  513. data/lib/proguard4.7/src/proguard/gui/splash/BufferedSprite.java +145 -0
  514. data/lib/proguard4.7/src/proguard/gui/splash/CircleSprite.java +74 -0
  515. data/lib/proguard4.7/src/proguard/gui/splash/ClipSprite.java +85 -0
  516. data/lib/proguard4.7/src/proguard/gui/splash/ColorSprite.java +65 -0
  517. data/lib/proguard4.7/src/proguard/gui/splash/CompositeSprite.java +56 -0
  518. data/lib/proguard4.7/src/proguard/gui/splash/ConstantColor.java +51 -0
  519. data/lib/proguard4.7/src/proguard/gui/splash/ConstantDouble.java +49 -0
  520. data/lib/proguard4.7/src/proguard/gui/splash/ConstantFont.java +46 -0
  521. data/lib/proguard4.7/src/proguard/gui/splash/ConstantInt.java +49 -0
  522. data/lib/proguard4.7/src/proguard/gui/splash/ConstantString.java +49 -0
  523. data/lib/proguard4.7/src/proguard/gui/splash/ConstantTiming.java +57 -0
  524. data/lib/proguard4.7/src/proguard/gui/splash/FontSprite.java +65 -0
  525. data/lib/proguard4.7/src/proguard/gui/splash/ImageSprite.java +76 -0
  526. data/lib/proguard4.7/src/proguard/gui/splash/LinearColor.java +72 -0
  527. data/lib/proguard4.7/src/proguard/gui/splash/LinearDouble.java +55 -0
  528. data/lib/proguard4.7/src/proguard/gui/splash/LinearInt.java +55 -0
  529. data/lib/proguard4.7/src/proguard/gui/splash/LinearTiming.java +55 -0
  530. data/lib/proguard4.7/src/proguard/gui/splash/OverrideGraphics2D.java +598 -0
  531. data/lib/proguard4.7/src/proguard/gui/splash/RectangleSprite.java +114 -0
  532. data/lib/proguard4.7/src/proguard/gui/splash/SawToothTiming.java +53 -0
  533. data/lib/proguard4.7/src/proguard/gui/splash/ShadowedSprite.java +109 -0
  534. data/lib/proguard4.7/src/proguard/gui/splash/SineTiming.java +53 -0
  535. data/lib/proguard4.7/src/proguard/gui/splash/SmoothTiming.java +66 -0
  536. data/lib/proguard4.7/src/proguard/gui/splash/SplashPanel.java +235 -0
  537. data/lib/proguard4.7/src/proguard/gui/splash/Sprite.java +41 -0
  538. data/lib/proguard4.7/src/proguard/gui/splash/TextSprite.java +89 -0
  539. data/lib/proguard4.7/src/proguard/gui/splash/TimeSwitchSprite.java +75 -0
  540. data/lib/proguard4.7/src/proguard/gui/splash/Timing.java +34 -0
  541. data/lib/proguard4.7/src/proguard/gui/splash/TypeWriterString.java +71 -0
  542. data/lib/proguard4.7/src/proguard/gui/splash/VariableColor.java +36 -0
  543. data/lib/proguard4.7/src/proguard/gui/splash/VariableDouble.java +34 -0
  544. data/lib/proguard4.7/src/proguard/gui/splash/VariableFont.java +36 -0
  545. data/lib/proguard4.7/src/proguard/gui/splash/VariableInt.java +34 -0
  546. data/lib/proguard4.7/src/proguard/gui/splash/VariableSizeFont.java +65 -0
  547. data/lib/proguard4.7/src/proguard/gui/splash/VariableString.java +34 -0
  548. data/lib/proguard4.7/src/proguard/gui/splash/package.html +4 -0
  549. data/lib/proguard4.7/src/proguard/gui/vtitle.png +0 -0
  550. data/lib/proguard4.7/src/proguard/io/CascadingDataEntryWriter.java +94 -0
  551. data/lib/proguard4.7/src/proguard/io/ClassFilter.java +59 -0
  552. data/lib/proguard4.7/src/proguard/io/ClassReader.java +115 -0
  553. data/lib/proguard4.7/src/proguard/io/ClassRewriter.java +80 -0
  554. data/lib/proguard4.7/src/proguard/io/DataEntry.java +62 -0
  555. data/lib/proguard4.7/src/proguard/io/DataEntryClassWriter.java +85 -0
  556. data/lib/proguard4.7/src/proguard/io/DataEntryCopier.java +247 -0
  557. data/lib/proguard4.7/src/proguard/io/DataEntryDirectoryFilter.java +40 -0
  558. data/lib/proguard4.7/src/proguard/io/DataEntryFilter.java +38 -0
  559. data/lib/proguard4.7/src/proguard/io/DataEntryNameFilter.java +54 -0
  560. data/lib/proguard4.7/src/proguard/io/DataEntryObfuscator.java +150 -0
  561. data/lib/proguard4.7/src/proguard/io/DataEntryParentFilter.java +51 -0
  562. data/lib/proguard4.7/src/proguard/io/DataEntryPump.java +43 -0
  563. data/lib/proguard4.7/src/proguard/io/DataEntryReader.java +38 -0
  564. data/lib/proguard4.7/src/proguard/io/DataEntryRenamer.java +104 -0
  565. data/lib/proguard4.7/src/proguard/io/DataEntryRewriter.java +148 -0
  566. data/lib/proguard4.7/src/proguard/io/DataEntryWriter.java +73 -0
  567. data/lib/proguard4.7/src/proguard/io/DirectoryFilter.java +58 -0
  568. data/lib/proguard4.7/src/proguard/io/DirectoryPump.java +78 -0
  569. data/lib/proguard4.7/src/proguard/io/DirectoryWriter.java +165 -0
  570. data/lib/proguard4.7/src/proguard/io/FileDataEntry.java +96 -0
  571. data/lib/proguard4.7/src/proguard/io/FilteredDataEntryReader.java +90 -0
  572. data/lib/proguard4.7/src/proguard/io/FilteredDataEntryWriter.java +125 -0
  573. data/lib/proguard4.7/src/proguard/io/Finisher.java +37 -0
  574. data/lib/proguard4.7/src/proguard/io/JarReader.java +75 -0
  575. data/lib/proguard4.7/src/proguard/io/JarWriter.java +235 -0
  576. data/lib/proguard4.7/src/proguard/io/ManifestRewriter.java +216 -0
  577. data/lib/proguard4.7/src/proguard/io/NameFilter.java +83 -0
  578. data/lib/proguard4.7/src/proguard/io/ParentDataEntryWriter.java +75 -0
  579. data/lib/proguard4.7/src/proguard/io/RenamedDataEntry.java +83 -0
  580. data/lib/proguard4.7/src/proguard/io/ZipDataEntry.java +98 -0
  581. data/lib/proguard4.7/src/proguard/io/package.html +4 -0
  582. data/lib/proguard4.7/src/proguard/obfuscate/AttributeShrinker.java +120 -0
  583. data/lib/proguard4.7/src/proguard/obfuscate/AttributeUsageMarker.java +71 -0
  584. data/lib/proguard4.7/src/proguard/obfuscate/ClassObfuscator.java +533 -0
  585. data/lib/proguard4.7/src/proguard/obfuscate/ClassRenamer.java +109 -0
  586. data/lib/proguard4.7/src/proguard/obfuscate/DictionaryNameFactory.java +189 -0
  587. data/lib/proguard4.7/src/proguard/obfuscate/MapCleaner.java +57 -0
  588. data/lib/proguard4.7/src/proguard/obfuscate/MappingKeeper.java +177 -0
  589. data/lib/proguard4.7/src/proguard/obfuscate/MappingPrinter.java +147 -0
  590. data/lib/proguard4.7/src/proguard/obfuscate/MappingProcessor.java +79 -0
  591. data/lib/proguard4.7/src/proguard/obfuscate/MappingReader.java +199 -0
  592. data/lib/proguard4.7/src/proguard/obfuscate/MemberNameCleaner.java +60 -0
  593. data/lib/proguard4.7/src/proguard/obfuscate/MemberNameCollector.java +106 -0
  594. data/lib/proguard4.7/src/proguard/obfuscate/MemberNameConflictFixer.java +159 -0
  595. data/lib/proguard4.7/src/proguard/obfuscate/MemberNameFilter.java +120 -0
  596. data/lib/proguard4.7/src/proguard/obfuscate/MemberObfuscator.java +230 -0
  597. data/lib/proguard4.7/src/proguard/obfuscate/MemberSpecialNameFilter.java +101 -0
  598. data/lib/proguard4.7/src/proguard/obfuscate/MultiMappingProcessor.java +96 -0
  599. data/lib/proguard4.7/src/proguard/obfuscate/NameFactory.java +34 -0
  600. data/lib/proguard4.7/src/proguard/obfuscate/NameFactoryResetter.java +59 -0
  601. data/lib/proguard4.7/src/proguard/obfuscate/NameMarker.java +166 -0
  602. data/lib/proguard4.7/src/proguard/obfuscate/NumericNameFactory.java +49 -0
  603. data/lib/proguard4.7/src/proguard/obfuscate/Obfuscator.java +445 -0
  604. data/lib/proguard4.7/src/proguard/obfuscate/ParameterNameMarker.java +128 -0
  605. data/lib/proguard4.7/src/proguard/obfuscate/SimpleNameFactory.java +156 -0
  606. data/lib/proguard4.7/src/proguard/obfuscate/SourceFileRenamer.java +84 -0
  607. data/lib/proguard4.7/src/proguard/obfuscate/SpecialNameFactory.java +83 -0
  608. data/lib/proguard4.7/src/proguard/obfuscate/package.html +3 -0
  609. data/lib/proguard4.7/src/proguard/optimize/BootstrapMethodArgumentShrinker.java +103 -0
  610. data/lib/proguard4.7/src/proguard/optimize/ChangedCodePrinter.java +297 -0
  611. data/lib/proguard4.7/src/proguard/optimize/ConstantMemberFilter.java +77 -0
  612. data/lib/proguard4.7/src/proguard/optimize/ConstantParameterFilter.java +79 -0
  613. data/lib/proguard4.7/src/proguard/optimize/DuplicateInitializerFixer.java +215 -0
  614. data/lib/proguard4.7/src/proguard/optimize/DuplicateInitializerInvocationFixer.java +161 -0
  615. data/lib/proguard4.7/src/proguard/optimize/KeepMarker.java +95 -0
  616. data/lib/proguard4.7/src/proguard/optimize/KeptClassFilter.java +69 -0
  617. data/lib/proguard4.7/src/proguard/optimize/KeptMemberFilter.java +88 -0
  618. data/lib/proguard4.7/src/proguard/optimize/MemberDescriptorSpecializer.java +138 -0
  619. data/lib/proguard4.7/src/proguard/optimize/MethodDescriptorShrinker.java +317 -0
  620. data/lib/proguard4.7/src/proguard/optimize/MethodStaticizer.java +87 -0
  621. data/lib/proguard4.7/src/proguard/optimize/OptimizationInfoMemberFilter.java +94 -0
  622. data/lib/proguard4.7/src/proguard/optimize/Optimizer.java +963 -0
  623. data/lib/proguard4.7/src/proguard/optimize/ParameterShrinker.java +146 -0
  624. data/lib/proguard4.7/src/proguard/optimize/TailRecursionSimplifier.java +356 -0
  625. data/lib/proguard4.7/src/proguard/optimize/WriteOnlyFieldFilter.java +65 -0
  626. data/lib/proguard4.7/src/proguard/optimize/evaluation/EvaluationShrinker.java +2082 -0
  627. data/lib/proguard4.7/src/proguard/optimize/evaluation/EvaluationSimplifier.java +973 -0
  628. data/lib/proguard4.7/src/proguard/optimize/evaluation/LivenessAnalyzer.java +526 -0
  629. data/lib/proguard4.7/src/proguard/optimize/evaluation/LoadingInvocationUnit.java +195 -0
  630. data/lib/proguard4.7/src/proguard/optimize/evaluation/PartialEvaluator.java +1282 -0
  631. data/lib/proguard4.7/src/proguard/optimize/evaluation/StoringInvocationUnit.java +207 -0
  632. data/lib/proguard4.7/src/proguard/optimize/evaluation/TracedBranchUnit.java +59 -0
  633. data/lib/proguard4.7/src/proguard/optimize/evaluation/VariableOptimizer.java +345 -0
  634. data/lib/proguard4.7/src/proguard/optimize/evaluation/package.html +4 -0
  635. data/lib/proguard4.7/src/proguard/optimize/info/AccessMethodMarker.java +202 -0
  636. data/lib/proguard4.7/src/proguard/optimize/info/BackwardBranchMarker.java +90 -0
  637. data/lib/proguard4.7/src/proguard/optimize/info/CatchExceptionMarker.java +69 -0
  638. data/lib/proguard4.7/src/proguard/optimize/info/CaughtClassFilter.java +63 -0
  639. data/lib/proguard4.7/src/proguard/optimize/info/CaughtClassMarker.java +64 -0
  640. data/lib/proguard4.7/src/proguard/optimize/info/ClassOptimizationInfo.java +165 -0
  641. data/lib/proguard4.7/src/proguard/optimize/info/ClassOptimizationInfoSetter.java +47 -0
  642. data/lib/proguard4.7/src/proguard/optimize/info/DotClassFilter.java +63 -0
  643. data/lib/proguard4.7/src/proguard/optimize/info/DotClassMarker.java +96 -0
  644. data/lib/proguard4.7/src/proguard/optimize/info/ExceptionInstructionChecker.java +193 -0
  645. data/lib/proguard4.7/src/proguard/optimize/info/FieldOptimizationInfo.java +204 -0
  646. data/lib/proguard4.7/src/proguard/optimize/info/InstanceofClassFilter.java +63 -0
  647. data/lib/proguard4.7/src/proguard/optimize/info/InstanceofClassMarker.java +93 -0
  648. data/lib/proguard4.7/src/proguard/optimize/info/InstantiationClassFilter.java +62 -0
  649. data/lib/proguard4.7/src/proguard/optimize/info/InstantiationClassMarker.java +93 -0
  650. data/lib/proguard4.7/src/proguard/optimize/info/MemberOptimizationInfoSetter.java +59 -0
  651. data/lib/proguard4.7/src/proguard/optimize/info/MethodInvocationMarker.java +107 -0
  652. data/lib/proguard4.7/src/proguard/optimize/info/MethodOptimizationInfo.java +302 -0
  653. data/lib/proguard4.7/src/proguard/optimize/info/NoSideEffectMethodMarker.java +91 -0
  654. data/lib/proguard4.7/src/proguard/optimize/info/NonPrivateMemberMarker.java +171 -0
  655. data/lib/proguard4.7/src/proguard/optimize/info/PackageVisibleMemberContainingClassMarker.java +85 -0
  656. data/lib/proguard4.7/src/proguard/optimize/info/PackageVisibleMemberInvokingClassMarker.java +129 -0
  657. data/lib/proguard4.7/src/proguard/optimize/info/ParameterUsageMarker.java +285 -0
  658. data/lib/proguard4.7/src/proguard/optimize/info/ReadWriteFieldMarker.java +163 -0
  659. data/lib/proguard4.7/src/proguard/optimize/info/SideEffectInstructionChecker.java +245 -0
  660. data/lib/proguard4.7/src/proguard/optimize/info/SideEffectMethodMarker.java +175 -0
  661. data/lib/proguard4.7/src/proguard/optimize/info/StaticInitializerContainingClassFilter.java +62 -0
  662. data/lib/proguard4.7/src/proguard/optimize/info/StaticInitializerContainingClassMarker.java +65 -0
  663. data/lib/proguard4.7/src/proguard/optimize/info/SuperInvocationMarker.java +93 -0
  664. data/lib/proguard4.7/src/proguard/optimize/info/VariableUsageMarker.java +96 -0
  665. data/lib/proguard4.7/src/proguard/optimize/info/package.html +4 -0
  666. data/lib/proguard4.7/src/proguard/optimize/package.html +4 -0
  667. data/lib/proguard4.7/src/proguard/optimize/peephole/BranchTargetFinder.java +687 -0
  668. data/lib/proguard4.7/src/proguard/optimize/peephole/ClassFinalizer.java +84 -0
  669. data/lib/proguard4.7/src/proguard/optimize/peephole/ClassMerger.java +576 -0
  670. data/lib/proguard4.7/src/proguard/optimize/peephole/GotoCommonCodeReplacer.java +266 -0
  671. data/lib/proguard4.7/src/proguard/optimize/peephole/GotoGotoReplacer.java +115 -0
  672. data/lib/proguard4.7/src/proguard/optimize/peephole/GotoReturnReplacer.java +115 -0
  673. data/lib/proguard4.7/src/proguard/optimize/peephole/HorizontalClassMerger.java +90 -0
  674. data/lib/proguard4.7/src/proguard/optimize/peephole/InstructionSequenceConstants.java +4424 -0
  675. data/lib/proguard4.7/src/proguard/optimize/peephole/InstructionSequenceReplacer.java +420 -0
  676. data/lib/proguard4.7/src/proguard/optimize/peephole/InstructionSequencesReplacer.java +138 -0
  677. data/lib/proguard4.7/src/proguard/optimize/peephole/MemberPrivatizer.java +103 -0
  678. data/lib/proguard4.7/src/proguard/optimize/peephole/MethodFinalizer.java +93 -0
  679. data/lib/proguard4.7/src/proguard/optimize/peephole/MethodInliner.java +597 -0
  680. data/lib/proguard4.7/src/proguard/optimize/peephole/NopRemover.java +89 -0
  681. data/lib/proguard4.7/src/proguard/optimize/peephole/PeepholeOptimizer.java +103 -0
  682. data/lib/proguard4.7/src/proguard/optimize/peephole/ReachableCodeMarker.java +262 -0
  683. data/lib/proguard4.7/src/proguard/optimize/peephole/RetargetedInnerClassAttributeRemover.java +170 -0
  684. data/lib/proguard4.7/src/proguard/optimize/peephole/TargetClassChanger.java +455 -0
  685. data/lib/proguard4.7/src/proguard/optimize/peephole/UnreachableCodeRemover.java +143 -0
  686. data/lib/proguard4.7/src/proguard/optimize/peephole/UnreachableExceptionRemover.java +163 -0
  687. data/lib/proguard4.7/src/proguard/optimize/peephole/VariableShrinker.java +129 -0
  688. data/lib/proguard4.7/src/proguard/optimize/peephole/VerticalClassMerger.java +88 -0
  689. data/lib/proguard4.7/src/proguard/optimize/peephole/package.html +3 -0
  690. data/lib/proguard4.7/src/proguard/package.html +5 -0
  691. data/lib/proguard4.7/src/proguard/preverify/CodePreverifier.java +611 -0
  692. data/lib/proguard4.7/src/proguard/preverify/CodeSubroutineInliner.java +406 -0
  693. data/lib/proguard4.7/src/proguard/preverify/Preverifier.java +73 -0
  694. data/lib/proguard4.7/src/proguard/preverify/SubroutineInliner.java +73 -0
  695. data/lib/proguard4.7/src/proguard/retrace/MANIFEST.MF +3 -0
  696. data/lib/proguard4.7/src/proguard/retrace/ReTrace.java +749 -0
  697. data/lib/proguard4.7/src/proguard/retrace/package.html +4 -0
  698. data/lib/proguard4.7/src/proguard/shrink/AnnotationUsageMarker.java +333 -0
  699. data/lib/proguard4.7/src/proguard/shrink/ClassShrinker.java +458 -0
  700. data/lib/proguard4.7/src/proguard/shrink/InnerUsageMarker.java +174 -0
  701. data/lib/proguard4.7/src/proguard/shrink/InterfaceUsageMarker.java +152 -0
  702. data/lib/proguard4.7/src/proguard/shrink/ShortestUsageMark.java +183 -0
  703. data/lib/proguard4.7/src/proguard/shrink/ShortestUsageMarker.java +277 -0
  704. data/lib/proguard4.7/src/proguard/shrink/ShortestUsagePrinter.java +210 -0
  705. data/lib/proguard4.7/src/proguard/shrink/Shrinker.java +181 -0
  706. data/lib/proguard4.7/src/proguard/shrink/UsageMarker.java +1036 -0
  707. data/lib/proguard4.7/src/proguard/shrink/UsagePrinter.java +177 -0
  708. data/lib/proguard4.7/src/proguard/shrink/UsedClassFilter.java +74 -0
  709. data/lib/proguard4.7/src/proguard/shrink/UsedMemberFilter.java +93 -0
  710. data/lib/proguard4.7/src/proguard/shrink/package.html +3 -0
  711. data/lib/proguard4.7/src/proguard/util/AndMatcher.java +49 -0
  712. data/lib/proguard4.7/src/proguard/util/ClassNameParser.java +216 -0
  713. data/lib/proguard4.7/src/proguard/util/ConstantMatcher.java +48 -0
  714. data/lib/proguard4.7/src/proguard/util/EmptyStringMatcher.java +36 -0
  715. data/lib/proguard4.7/src/proguard/util/ExtensionMatcher.java +63 -0
  716. data/lib/proguard4.7/src/proguard/util/FileNameParser.java +121 -0
  717. data/lib/proguard4.7/src/proguard/util/FixedStringMatcher.java +56 -0
  718. data/lib/proguard4.7/src/proguard/util/ListMatcher.java +69 -0
  719. data/lib/proguard4.7/src/proguard/util/ListParser.java +137 -0
  720. data/lib/proguard4.7/src/proguard/util/ListUtil.java +180 -0
  721. data/lib/proguard4.7/src/proguard/util/NameParser.java +106 -0
  722. data/lib/proguard4.7/src/proguard/util/NotMatcher.java +46 -0
  723. data/lib/proguard4.7/src/proguard/util/OrMatcher.java +49 -0
  724. data/lib/proguard4.7/src/proguard/util/SettableMatcher.java +46 -0
  725. data/lib/proguard4.7/src/proguard/util/StringMatcher.java +38 -0
  726. data/lib/proguard4.7/src/proguard/util/StringParser.java +35 -0
  727. data/lib/proguard4.7/src/proguard/util/VariableStringMatcher.java +126 -0
  728. data/lib/proguard4.7/src/proguard/util/package.html +3 -0
  729. data/lib/proguard4.7/src/proguard/wtk/ProGuardObfuscator.java +141 -0
  730. data/lib/proguard4.7/src/proguard/wtk/default.pro +114 -0
  731. data/lib/proguard4.7/src/proguard/wtk/package.html +3 -0
  732. metadata +960 -10
@@ -0,0 +1,90 @@
1
+ /*
2
+ * ProGuard -- shrinking, optimization, obfuscation, and preverification
3
+ * of Java bytecode.
4
+ *
5
+ * Copyright (c) 2002-2011 Eric Lafortune (eric@graphics.cornell.edu)
6
+ *
7
+ * This program is free software; you can redistribute it and/or modify it
8
+ * under the terms of the GNU General Public License as published by the Free
9
+ * Software Foundation; either version 2 of the License, or (at your option)
10
+ * any later version.
11
+ *
12
+ * This program is distributed in the hope that it will be useful, but WITHOUT
13
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15
+ * more details.
16
+ *
17
+ * You should have received a copy of the GNU General Public License along
18
+ * with this program; if not, write to the Free Software Foundation, Inc.,
19
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20
+ */
21
+ package proguard.optimize.peephole;
22
+
23
+ import proguard.classfile.*;
24
+ import proguard.classfile.util.SimplifiedVisitor;
25
+ import proguard.classfile.visitor.*;
26
+
27
+ /**
28
+ * This ClassVisitor inlines siblings in the program classes that it visits,
29
+ * whenever possible.
30
+ *
31
+ * @see ClassMerger
32
+ * @author Eric Lafortune
33
+ */
34
+ public class HorizontalClassMerger
35
+ extends SimplifiedVisitor
36
+ implements ClassVisitor
37
+ {
38
+ private final boolean allowAccessModification;
39
+ private final boolean mergeInterfacesAggressively;
40
+ private final ClassVisitor extraClassVisitor;
41
+
42
+
43
+ /**
44
+ * Creates a new HorizontalClassMerger.
45
+ * @param allowAccessModification specifies whether the access modifiers
46
+ * of classes can be changed in order to
47
+ * merge them.
48
+ * @param mergeInterfacesAggressively specifies whether interfaces may
49
+ * be merged aggressively.
50
+ */
51
+ public HorizontalClassMerger(boolean allowAccessModification,
52
+ boolean mergeInterfacesAggressively)
53
+ {
54
+ this(allowAccessModification, mergeInterfacesAggressively, null);
55
+ }
56
+
57
+
58
+ /**
59
+ * Creates a new VerticalClassMerger.
60
+ * @param allowAccessModification specifies whether the access modifiers
61
+ * of classes can be changed in order to
62
+ * merge them.
63
+ * @param mergeInterfacesAggressively specifies whether interfaces may
64
+ * be merged aggressively.
65
+ * @param extraClassVisitor an optional extra visitor for all
66
+ * merged classes.
67
+ */
68
+ public HorizontalClassMerger(boolean allowAccessModification,
69
+ boolean mergeInterfacesAggressively,
70
+ ClassVisitor extraClassVisitor)
71
+ {
72
+ this.allowAccessModification = allowAccessModification;
73
+ this.mergeInterfacesAggressively = mergeInterfacesAggressively;
74
+ this.extraClassVisitor = extraClassVisitor;
75
+ }
76
+
77
+
78
+ // Implementations for ClassVisitor.
79
+
80
+ public void visitProgramClass(ProgramClass programClass)
81
+ {
82
+ programClass.superClassConstantAccept(new ReferencedClassVisitor(
83
+ new SubclassTraveler(
84
+ new ProgramClassFilter(
85
+ new ClassMerger(programClass,
86
+ allowAccessModification,
87
+ mergeInterfacesAggressively,
88
+ extraClassVisitor)))));
89
+ }
90
+ }
@@ -0,0 +1,4424 @@
1
+ /*
2
+ * ProGuard -- shrinking, optimization, obfuscation, and preverification
3
+ * of Java bytecode.
4
+ *
5
+ * Copyright (c) 2002-2011 Eric Lafortune (eric@graphics.cornell.edu)
6
+ *
7
+ * This program is free software; you can redistribute it and/or modify it
8
+ * under the terms of the GNU General Public License as published by the Free
9
+ * Software Foundation; either version 2 of the License, or (at your option)
10
+ * any later version.
11
+ *
12
+ * This program is distributed in the hope that it will be useful, but WITHOUT
13
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15
+ * more details.
16
+ *
17
+ * You should have received a copy of the GNU General Public License along
18
+ * with this program; if not, write to the Free Software Foundation, Inc.,
19
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20
+ */
21
+ package proguard.optimize.peephole;
22
+
23
+ import proguard.classfile.*;
24
+ import proguard.classfile.constant.*;
25
+ import proguard.classfile.instruction.*;
26
+ import proguard.classfile.visitor.ClassPrinter;
27
+
28
+ /**
29
+ * This class contains a set of instruction sequences and their suggested
30
+ * replacements.
31
+ *
32
+ * @see InstructionSequencesReplacer
33
+ * @see InstructionSequenceReplacer
34
+ * @author Eric Lafortune
35
+ */
36
+ public class InstructionSequenceConstants
37
+ {
38
+ private static final int X = InstructionSequenceReplacer.X;
39
+ private static final int Y = InstructionSequenceReplacer.Y;
40
+ private static final int Z = InstructionSequenceReplacer.Z;
41
+
42
+ private static final int A = InstructionSequenceReplacer.A;
43
+ private static final int B = InstructionSequenceReplacer.B;
44
+ private static final int C = InstructionSequenceReplacer.C;
45
+ private static final int D = InstructionSequenceReplacer.D;
46
+
47
+ private static final int STRING_A_LENGTH = InstructionSequenceReplacer.STRING_A_LENGTH;
48
+ private static final int BOOLEAN_A_STRING = InstructionSequenceReplacer.BOOLEAN_A_STRING;
49
+ private static final int CHAR_A_STRING = InstructionSequenceReplacer.CHAR_A_STRING;
50
+ private static final int INT_A_STRING = InstructionSequenceReplacer.INT_A_STRING;
51
+ private static final int LONG_A_STRING = InstructionSequenceReplacer.LONG_A_STRING;
52
+ private static final int FLOAT_A_STRING = InstructionSequenceReplacer.FLOAT_A_STRING;
53
+ private static final int DOUBLE_A_STRING = InstructionSequenceReplacer.DOUBLE_A_STRING;
54
+ private static final int STRING_A_STRING = InstructionSequenceReplacer.STRING_A_STRING;
55
+ private static final int BOOLEAN_B_STRING = InstructionSequenceReplacer.BOOLEAN_B_STRING;
56
+ private static final int CHAR_B_STRING = InstructionSequenceReplacer.CHAR_B_STRING;
57
+ private static final int INT_B_STRING = InstructionSequenceReplacer.INT_B_STRING;
58
+ private static final int LONG_B_STRING = InstructionSequenceReplacer.LONG_B_STRING;
59
+ private static final int FLOAT_B_STRING = InstructionSequenceReplacer.FLOAT_B_STRING;
60
+ private static final int DOUBLE_B_STRING = InstructionSequenceReplacer.DOUBLE_B_STRING;
61
+ private static final int STRING_B_STRING = InstructionSequenceReplacer.STRING_B_STRING;
62
+
63
+ private static final int I_32768 = 0;
64
+ private static final int I_65536 = 1;
65
+ private static final int I_16777216 = 2;
66
+
67
+ // private static final int I_0x000000ff
68
+ private static final int I_0x0000ff00 = 3;
69
+ private static final int I_0x00ff0000 = 4;
70
+ private static final int I_0xff000000 = 5;
71
+ private static final int I_0x0000ffff = 6;
72
+ private static final int I_0xffff0000 = 7;
73
+
74
+ private static final int L_M1 = 8;
75
+ private static final int L_2 = 9;
76
+ private static final int L_4 = 10;
77
+ private static final int L_8 = 11;
78
+ private static final int L_16 = 12;
79
+ private static final int L_32 = 13;
80
+ private static final int L_64 = 14;
81
+ private static final int L_128 = 15;
82
+ private static final int L_256 = 16;
83
+ private static final int L_512 = 17;
84
+ private static final int L_1024 = 18;
85
+ private static final int L_2048 = 19;
86
+ private static final int L_4096 = 20;
87
+ private static final int L_8192 = 21;
88
+ private static final int L_16384 = 22;
89
+ private static final int L_32768 = 23;
90
+ private static final int L_65536 = 24;
91
+ private static final int L_16777216 = 25;
92
+ private static final int L_4294967296 = 26;
93
+
94
+ private static final int L_0x00000000ffffffff = 27;
95
+ private static final int L_0xffffffff00000000 = 28;
96
+
97
+ private static final int F_M1 = 29;
98
+
99
+ private static final int D_M1 = 30;
100
+
101
+ private static final int STRING_EMPTY = 31;
102
+
103
+ private static final int FIELD_I = 32;
104
+ private static final int FIELD_L = 33;
105
+ private static final int FIELD_F = 34;
106
+ private static final int FIELD_D = 35;
107
+
108
+ private static final int METHOD_STRING_EQUALS = 36;
109
+ private static final int METHOD_STRING_LENGTH = 37;
110
+ private static final int METHOD_STRINGBUFFER_INIT = 38;
111
+ private static final int METHOD_STRINGBUFFER_INIT_STRING = 39;
112
+ private static final int METHOD_STRINGBUFFER_APPEND_BOOLEAN = 40;
113
+ private static final int METHOD_STRINGBUFFER_APPEND_CHAR = 41;
114
+ private static final int METHOD_STRINGBUFFER_APPEND_INTEGER = 42;
115
+ private static final int METHOD_STRINGBUFFER_APPEND_LONG = 43;
116
+ private static final int METHOD_STRINGBUFFER_APPEND_FLOAT = 44;
117
+ private static final int METHOD_STRINGBUFFER_APPEND_DOUBLE = 45;
118
+ private static final int METHOD_STRINGBUFFER_APPEND_STRING = 46;
119
+ private static final int METHOD_STRINGBUFFER_LENGTH = 47;
120
+ private static final int METHOD_STRINGBUFFER_TOSTRING = 48;
121
+ private static final int METHOD_STRINGBUILDER_INIT = 49;
122
+ private static final int METHOD_STRINGBUILDER_INIT_STRING = 50;
123
+ private static final int METHOD_STRINGBUILDER_APPEND_BOOLEAN = 51;
124
+ private static final int METHOD_STRINGBUILDER_APPEND_CHAR = 52;
125
+ private static final int METHOD_STRINGBUILDER_APPEND_INTEGER = 53;
126
+ private static final int METHOD_STRINGBUILDER_APPEND_LONG = 54;
127
+ private static final int METHOD_STRINGBUILDER_APPEND_FLOAT = 55;
128
+ private static final int METHOD_STRINGBUILDER_APPEND_DOUBLE = 56;
129
+ private static final int METHOD_STRINGBUILDER_APPEND_STRING = 57;
130
+ private static final int METHOD_STRINGBUILDER_LENGTH = 58;
131
+ private static final int METHOD_STRINGBUILDER_TOSTRING = 59;
132
+
133
+ private static final int CLASS_STRING = 60;
134
+ private static final int CLASS_STRINGBUFFER = 61;
135
+ private static final int CLASS_STRINGBUILDER = 62;
136
+
137
+ private static final int NAME_AND_TYPE_I = 63;
138
+ private static final int NAME_AND_TYPE_L = 64;
139
+ private static final int NAME_AND_TYPE_F = 65;
140
+ private static final int NAME_AND_TYPE_D = 66;
141
+
142
+ private static final int NAME_AND_TYPE_EQUALS = 67;
143
+ private static final int NAME_AND_TYPE_LENGTH = 68;
144
+ private static final int NAME_AND_TYPE_INIT = 69;
145
+ private static final int NAME_AND_TYPE_INIT_STRING = 70;
146
+ private static final int NAME_AND_TYPE_APPEND_Z_STRINGBUFFER = 71;
147
+ private static final int NAME_AND_TYPE_APPEND_C_STRINGBUFFER = 72;
148
+ private static final int NAME_AND_TYPE_APPEND_I_STRINGBUFFER = 73;
149
+ private static final int NAME_AND_TYPE_APPEND_J_STRINGBUFFER = 74;
150
+ private static final int NAME_AND_TYPE_APPEND_F_STRINGBUFFER = 75;
151
+ private static final int NAME_AND_TYPE_APPEND_D_STRINGBUFFER = 76;
152
+ private static final int NAME_AND_TYPE_APPEND_STRING_STRINGBUFFER = 77;
153
+ private static final int NAME_AND_TYPE_APPEND_Z_STRINGBUILDER = 78;
154
+ private static final int NAME_AND_TYPE_APPEND_C_STRINGBUILDER = 79;
155
+ private static final int NAME_AND_TYPE_APPEND_I_STRINGBUILDER = 80;
156
+ private static final int NAME_AND_TYPE_APPEND_J_STRINGBUILDER = 81;
157
+ private static final int NAME_AND_TYPE_APPEND_F_STRINGBUILDER = 82;
158
+ private static final int NAME_AND_TYPE_APPEND_D_STRINGBUILDER = 83;
159
+ private static final int NAME_AND_TYPE_APPEND_STRING_STRINGBUILDER = 84;
160
+ private static final int NAME_AND_TYPE_TOSTRING = 85;
161
+
162
+ private static final int UTF8_EMPTY = 86;
163
+ private static final int UTF8_I = 87;
164
+ private static final int UTF8_L = 88;
165
+ private static final int UTF8_F = 89;
166
+ private static final int UTF8_D = 90;
167
+ private static final int UTF8_STRING = 91;
168
+ private static final int UTF8_STRINGBUFFER = 92;
169
+ private static final int UTF8_STRINGBUILDER = 93;
170
+ private static final int UTF8_EQUALS = 94;
171
+ private static final int UTF8_OBJECT_Z = 95;
172
+ private static final int UTF8_LENGTH = 96;
173
+ private static final int UTF8__I = 97;
174
+ private static final int UTF8_INIT = 98;
175
+ private static final int UTF8__VOID = 99;
176
+ private static final int UTF8_STRING_VOID = 100;
177
+ private static final int UTF8_TOSTRING = 101;
178
+ private static final int UTF8__STRING = 102;
179
+ private static final int UTF8_APPEND = 103;
180
+ private static final int UTF8_Z_STRINGBUFFER = 104;
181
+ private static final int UTF8_C_STRINGBUFFER = 105;
182
+ private static final int UTF8_I_STRINGBUFFER = 106;
183
+ private static final int UTF8_J_STRINGBUFFER = 107;
184
+ private static final int UTF8_F_STRINGBUFFER = 108;
185
+ private static final int UTF8_D_STRINGBUFFER = 109;
186
+ private static final int UTF8_STRING_STRINGBUFFER = 110;
187
+ private static final int UTF8_Z_STRINGBUILDER = 111;
188
+ private static final int UTF8_C_STRINGBUILDER = 112;
189
+ private static final int UTF8_I_STRINGBUILDER = 113;
190
+ private static final int UTF8_J_STRINGBUILDER = 114;
191
+ private static final int UTF8_F_STRINGBUILDER = 115;
192
+ private static final int UTF8_D_STRINGBUILDER = 116;
193
+ private static final int UTF8_STRING_STRINGBUILDER = 117;
194
+
195
+ private static final int SENTINEL = 118;
196
+
197
+
198
+ public static final Constant[] CONSTANTS = new Constant[]
199
+ {
200
+ new IntegerConstant(32768),
201
+ new IntegerConstant(65536),
202
+ new IntegerConstant(16777216),
203
+
204
+ new IntegerConstant(0x0000ff00),
205
+ new IntegerConstant(0x00ff0000),
206
+ new IntegerConstant(0xff000000),
207
+ new IntegerConstant(0x0000ffff),
208
+ new IntegerConstant(0xffff0000),
209
+
210
+ new LongConstant(-1L),
211
+ new LongConstant(2L),
212
+ new LongConstant(4L),
213
+ new LongConstant(8L),
214
+ new LongConstant(16L),
215
+ new LongConstant(32L),
216
+ new LongConstant(64L),
217
+ new LongConstant(128L),
218
+ new LongConstant(256L),
219
+ new LongConstant(512L),
220
+ new LongConstant(1024L),
221
+ new LongConstant(2048L),
222
+ new LongConstant(4096L),
223
+ new LongConstant(8192L),
224
+ new LongConstant(16384L),
225
+ new LongConstant(32768L),
226
+ new LongConstant(65536L),
227
+ new LongConstant(16777216L),
228
+ new LongConstant(4294967296L),
229
+
230
+ new LongConstant(0x00000000ffffffffL),
231
+ new LongConstant(0xffffffff00000000L),
232
+
233
+ new FloatConstant(-1f),
234
+
235
+ new DoubleConstant(-1d),
236
+
237
+ new StringConstant(UTF8_EMPTY, null, null),
238
+
239
+ new FieldrefConstant(X, NAME_AND_TYPE_I, null, null),
240
+ new FieldrefConstant(X, NAME_AND_TYPE_L, null, null),
241
+ new FieldrefConstant(X, NAME_AND_TYPE_F, null, null),
242
+ new FieldrefConstant(X, NAME_AND_TYPE_D, null, null),
243
+
244
+ new MethodrefConstant(CLASS_STRING, NAME_AND_TYPE_EQUALS, null, null),
245
+ new MethodrefConstant(CLASS_STRING, NAME_AND_TYPE_LENGTH, null, null),
246
+ new MethodrefConstant(CLASS_STRINGBUFFER, NAME_AND_TYPE_INIT, null, null),
247
+ new MethodrefConstant(CLASS_STRINGBUFFER, NAME_AND_TYPE_INIT_STRING, null, null),
248
+ new MethodrefConstant(CLASS_STRINGBUFFER, NAME_AND_TYPE_APPEND_Z_STRINGBUFFER, null, null),
249
+ new MethodrefConstant(CLASS_STRINGBUFFER, NAME_AND_TYPE_APPEND_C_STRINGBUFFER, null, null),
250
+ new MethodrefConstant(CLASS_STRINGBUFFER, NAME_AND_TYPE_APPEND_I_STRINGBUFFER, null, null),
251
+ new MethodrefConstant(CLASS_STRINGBUFFER, NAME_AND_TYPE_APPEND_J_STRINGBUFFER, null, null),
252
+ new MethodrefConstant(CLASS_STRINGBUFFER, NAME_AND_TYPE_APPEND_F_STRINGBUFFER, null, null),
253
+ new MethodrefConstant(CLASS_STRINGBUFFER, NAME_AND_TYPE_APPEND_D_STRINGBUFFER, null, null),
254
+ new MethodrefConstant(CLASS_STRINGBUFFER, NAME_AND_TYPE_APPEND_STRING_STRINGBUFFER, null, null),
255
+ new MethodrefConstant(CLASS_STRINGBUFFER, NAME_AND_TYPE_LENGTH, null, null),
256
+ new MethodrefConstant(CLASS_STRINGBUFFER, NAME_AND_TYPE_TOSTRING, null, null),
257
+ new MethodrefConstant(CLASS_STRINGBUILDER, NAME_AND_TYPE_INIT, null, null),
258
+ new MethodrefConstant(CLASS_STRINGBUILDER, NAME_AND_TYPE_INIT_STRING, null, null),
259
+ new MethodrefConstant(CLASS_STRINGBUILDER, NAME_AND_TYPE_APPEND_Z_STRINGBUILDER, null, null),
260
+ new MethodrefConstant(CLASS_STRINGBUILDER, NAME_AND_TYPE_APPEND_C_STRINGBUILDER, null, null),
261
+ new MethodrefConstant(CLASS_STRINGBUILDER, NAME_AND_TYPE_APPEND_I_STRINGBUILDER, null, null),
262
+ new MethodrefConstant(CLASS_STRINGBUILDER, NAME_AND_TYPE_APPEND_J_STRINGBUILDER, null, null),
263
+ new MethodrefConstant(CLASS_STRINGBUILDER, NAME_AND_TYPE_APPEND_F_STRINGBUILDER, null, null),
264
+ new MethodrefConstant(CLASS_STRINGBUILDER, NAME_AND_TYPE_APPEND_D_STRINGBUILDER, null, null),
265
+ new MethodrefConstant(CLASS_STRINGBUILDER, NAME_AND_TYPE_APPEND_STRING_STRINGBUILDER, null, null),
266
+ new MethodrefConstant(CLASS_STRINGBUILDER, NAME_AND_TYPE_LENGTH, null, null),
267
+ new MethodrefConstant(CLASS_STRINGBUILDER, NAME_AND_TYPE_TOSTRING, null, null),
268
+
269
+ new ClassConstant(UTF8_STRING, null),
270
+ new ClassConstant(UTF8_STRINGBUFFER, null),
271
+ new ClassConstant(UTF8_STRINGBUILDER, null),
272
+
273
+ new NameAndTypeConstant(Y, UTF8_I),
274
+ new NameAndTypeConstant(Y, UTF8_L),
275
+ new NameAndTypeConstant(Y, UTF8_F),
276
+ new NameAndTypeConstant(Y, UTF8_D),
277
+ new NameAndTypeConstant(UTF8_EQUALS, UTF8_OBJECT_Z),
278
+ new NameAndTypeConstant(UTF8_LENGTH, UTF8__I),
279
+ new NameAndTypeConstant(UTF8_INIT, UTF8__VOID),
280
+ new NameAndTypeConstant(UTF8_INIT, UTF8_STRING_VOID),
281
+ new NameAndTypeConstant(UTF8_APPEND, UTF8_Z_STRINGBUFFER),
282
+ new NameAndTypeConstant(UTF8_APPEND, UTF8_C_STRINGBUFFER),
283
+ new NameAndTypeConstant(UTF8_APPEND, UTF8_I_STRINGBUFFER),
284
+ new NameAndTypeConstant(UTF8_APPEND, UTF8_J_STRINGBUFFER),
285
+ new NameAndTypeConstant(UTF8_APPEND, UTF8_F_STRINGBUFFER),
286
+ new NameAndTypeConstant(UTF8_APPEND, UTF8_D_STRINGBUFFER),
287
+ new NameAndTypeConstant(UTF8_APPEND, UTF8_STRING_STRINGBUFFER),
288
+ new NameAndTypeConstant(UTF8_APPEND, UTF8_Z_STRINGBUILDER),
289
+ new NameAndTypeConstant(UTF8_APPEND, UTF8_C_STRINGBUILDER),
290
+ new NameAndTypeConstant(UTF8_APPEND, UTF8_I_STRINGBUILDER),
291
+ new NameAndTypeConstant(UTF8_APPEND, UTF8_J_STRINGBUILDER),
292
+ new NameAndTypeConstant(UTF8_APPEND, UTF8_F_STRINGBUILDER),
293
+ new NameAndTypeConstant(UTF8_APPEND, UTF8_D_STRINGBUILDER),
294
+ new NameAndTypeConstant(UTF8_APPEND, UTF8_STRING_STRINGBUILDER),
295
+ new NameAndTypeConstant(UTF8_TOSTRING, UTF8__STRING),
296
+
297
+ new Utf8Constant(""),
298
+ new Utf8Constant("I"),
299
+ new Utf8Constant("J"),
300
+ new Utf8Constant("F"),
301
+ new Utf8Constant("D"),
302
+ new Utf8Constant(ClassConstants.INTERNAL_NAME_JAVA_LANG_STRING),
303
+ new Utf8Constant(ClassConstants.INTERNAL_NAME_JAVA_LANG_STRING_BUFFER),
304
+ new Utf8Constant(ClassConstants.INTERNAL_NAME_JAVA_LANG_STRING_BUILDER),
305
+ new Utf8Constant(ClassConstants.INTERNAL_METHOD_NAME_EQUALS),
306
+ new Utf8Constant(ClassConstants.INTERNAL_METHOD_TYPE_EQUALS),
307
+ new Utf8Constant(ClassConstants.INTERNAL_METHOD_NAME_LENGTH),
308
+ new Utf8Constant(ClassConstants.INTERNAL_METHOD_TYPE_LENGTH),
309
+ new Utf8Constant(ClassConstants.INTERNAL_METHOD_NAME_INIT),
310
+ new Utf8Constant(ClassConstants.INTERNAL_METHOD_TYPE_INIT),
311
+ new Utf8Constant(ClassConstants.INTERNAL_METHOD_TYPE_STRING_VOID),
312
+ new Utf8Constant(ClassConstants.INTERNAL_METHOD_NAME_TOSTRING),
313
+ new Utf8Constant(ClassConstants.INTERNAL_METHOD_TYPE_TOSTRING),
314
+ new Utf8Constant(ClassConstants.INTERNAL_METHOD_NAME_APPEND),
315
+ new Utf8Constant(ClassConstants.INTERNAL_METHOD_TYPE_BOOLEAN_STRING_BUFFER),
316
+ new Utf8Constant(ClassConstants.INTERNAL_METHOD_TYPE_CHAR_STRING_BUFFER),
317
+ new Utf8Constant(ClassConstants.INTERNAL_METHOD_TYPE_INT_STRING_BUFFER),
318
+ new Utf8Constant(ClassConstants.INTERNAL_METHOD_TYPE_LONG_STRING_BUFFER),
319
+ new Utf8Constant(ClassConstants.INTERNAL_METHOD_TYPE_FLOAT_STRING_BUFFER),
320
+ new Utf8Constant(ClassConstants.INTERNAL_METHOD_TYPE_DOUBLE_STRING_BUFFER),
321
+ new Utf8Constant(ClassConstants.INTERNAL_METHOD_TYPE_STRING_STRING_BUFFER),
322
+ new Utf8Constant(ClassConstants.INTERNAL_METHOD_TYPE_BOOLEAN_STRING_BUILDER),
323
+ new Utf8Constant(ClassConstants.INTERNAL_METHOD_TYPE_CHAR_STRING_BUILDER),
324
+ new Utf8Constant(ClassConstants.INTERNAL_METHOD_TYPE_INT_STRING_BUILDER),
325
+ new Utf8Constant(ClassConstants.INTERNAL_METHOD_TYPE_LONG_STRING_BUILDER),
326
+ new Utf8Constant(ClassConstants.INTERNAL_METHOD_TYPE_FLOAT_STRING_BUILDER),
327
+ new Utf8Constant(ClassConstants.INTERNAL_METHOD_TYPE_DOUBLE_STRING_BUILDER),
328
+ new Utf8Constant(ClassConstants.INTERNAL_METHOD_TYPE_STRING_STRING_BUILDER),
329
+ };
330
+
331
+ public static final Instruction[][][] VARIABLE = new Instruction[][][]
332
+ {
333
+ { // nop = nothing
334
+ {
335
+ new SimpleInstruction(InstructionConstants.OP_NOP),
336
+ },{
337
+ // Nothing.
338
+ },
339
+ },
340
+ { // iload/pop = nothing
341
+ {
342
+ new VariableInstruction(InstructionConstants.OP_ILOAD, X),
343
+ new SimpleInstruction(InstructionConstants.OP_POP),
344
+ },{
345
+ // Nothing.
346
+ },
347
+ },
348
+ { // lload/pop2 = nothing
349
+ {
350
+ new VariableInstruction(InstructionConstants.OP_LLOAD, X),
351
+ new SimpleInstruction(InstructionConstants.OP_POP2),
352
+ },{
353
+ // Nothing.
354
+ },
355
+ },
356
+ { // fload/pop = nothing
357
+ {
358
+ new VariableInstruction(InstructionConstants.OP_FLOAD, X),
359
+ new SimpleInstruction(InstructionConstants.OP_POP),
360
+ },{
361
+ // Nothing.
362
+ },
363
+ },
364
+ { // dload/pop2 = nothing
365
+ {
366
+ new VariableInstruction(InstructionConstants.OP_DLOAD, X),
367
+ new SimpleInstruction(InstructionConstants.OP_POP2),
368
+ },{
369
+ // Nothing.
370
+ },
371
+ },
372
+ { // aload/pop = nothing
373
+ {
374
+ new VariableInstruction(InstructionConstants.OP_ALOAD, X),
375
+ new SimpleInstruction(InstructionConstants.OP_POP),
376
+ },{
377
+ // Nothing.
378
+ },
379
+ },
380
+ { // i = i = nothing
381
+ {
382
+ new VariableInstruction(InstructionConstants.OP_ILOAD, X),
383
+ new VariableInstruction(InstructionConstants.OP_ISTORE, X),
384
+ },{
385
+ // Nothing.
386
+ },
387
+ },
388
+ { // l = l = nothing
389
+ {
390
+ new VariableInstruction(InstructionConstants.OP_LLOAD, X),
391
+ new VariableInstruction(InstructionConstants.OP_LSTORE, X),
392
+ },{
393
+ // Nothing.
394
+ },
395
+ },
396
+ { // f = f = nothing
397
+ {
398
+ new VariableInstruction(InstructionConstants.OP_FLOAD, X),
399
+ new VariableInstruction(InstructionConstants.OP_FSTORE, X),
400
+ },{
401
+ // Nothing.
402
+ },
403
+ },
404
+ { // d = d = nothing
405
+ {
406
+ new VariableInstruction(InstructionConstants.OP_DLOAD, X),
407
+ new VariableInstruction(InstructionConstants.OP_DSTORE, X),
408
+ },{
409
+ // Nothing.
410
+ },
411
+ },
412
+ { // a = a = nothing
413
+ {
414
+ new VariableInstruction(InstructionConstants.OP_ALOAD, X),
415
+ new VariableInstruction(InstructionConstants.OP_ASTORE, X),
416
+ },{
417
+ // Nothing.
418
+ },
419
+ },
420
+ { // istore/istore = pop/istore
421
+ {
422
+ new VariableInstruction(InstructionConstants.OP_ISTORE, X),
423
+ new VariableInstruction(InstructionConstants.OP_ISTORE, X),
424
+ },{
425
+ new SimpleInstruction(InstructionConstants.OP_POP),
426
+ new VariableInstruction(InstructionConstants.OP_ISTORE, X),
427
+ },
428
+ },
429
+ { // lstore/lstore = pop2/lstore
430
+ {
431
+ new VariableInstruction(InstructionConstants.OP_LSTORE, X),
432
+ new VariableInstruction(InstructionConstants.OP_LSTORE, X),
433
+ },{
434
+ new SimpleInstruction(InstructionConstants.OP_POP2),
435
+ new VariableInstruction(InstructionConstants.OP_LSTORE, X),
436
+ },
437
+ },
438
+ { // fstore/fstore = pop/fstore
439
+ {
440
+ new VariableInstruction(InstructionConstants.OP_FSTORE, X),
441
+ new VariableInstruction(InstructionConstants.OP_FSTORE, X),
442
+ },{
443
+ new SimpleInstruction(InstructionConstants.OP_POP),
444
+ new VariableInstruction(InstructionConstants.OP_FSTORE, X),
445
+ },
446
+ },
447
+ { // dstore/dstore = pop2/dstore
448
+ {
449
+ new VariableInstruction(InstructionConstants.OP_DSTORE, X),
450
+ new VariableInstruction(InstructionConstants.OP_DSTORE, X),
451
+ },{
452
+ new SimpleInstruction(InstructionConstants.OP_POP2),
453
+ new VariableInstruction(InstructionConstants.OP_DSTORE, X),
454
+ },
455
+ },
456
+ { // astore/astore = pop/astore
457
+ {
458
+ new VariableInstruction(InstructionConstants.OP_ASTORE, X),
459
+ new VariableInstruction(InstructionConstants.OP_ASTORE, X),
460
+ },{
461
+ new SimpleInstruction(InstructionConstants.OP_POP),
462
+ new VariableInstruction(InstructionConstants.OP_ASTORE, X),
463
+ },
464
+ },
465
+ { // istore/iload = dup/istore
466
+ {
467
+ new VariableInstruction(InstructionConstants.OP_ISTORE, X),
468
+ new VariableInstruction(InstructionConstants.OP_ILOAD, X),
469
+ },{
470
+ new SimpleInstruction(InstructionConstants.OP_DUP),
471
+ new VariableInstruction(InstructionConstants.OP_ISTORE, X),
472
+ },
473
+ },
474
+ { // lstore/lload = dup2/lstore
475
+ {
476
+ new VariableInstruction(InstructionConstants.OP_LSTORE, X),
477
+ new VariableInstruction(InstructionConstants.OP_LLOAD, X),
478
+ },{
479
+ new SimpleInstruction(InstructionConstants.OP_DUP2),
480
+ new VariableInstruction(InstructionConstants.OP_LSTORE, X),
481
+ },
482
+ },
483
+ { // fstore/fload = dup/fstore
484
+ {
485
+ new VariableInstruction(InstructionConstants.OP_FSTORE, X),
486
+ new VariableInstruction(InstructionConstants.OP_FLOAD, X),
487
+ },{
488
+ new SimpleInstruction(InstructionConstants.OP_DUP),
489
+ new VariableInstruction(InstructionConstants.OP_FSTORE, X),
490
+ },
491
+ },
492
+ { // dstore/dload = dup2/dstore
493
+ {
494
+ new VariableInstruction(InstructionConstants.OP_DSTORE, X),
495
+ new VariableInstruction(InstructionConstants.OP_DLOAD, X),
496
+ },{
497
+ new SimpleInstruction(InstructionConstants.OP_DUP2),
498
+ new VariableInstruction(InstructionConstants.OP_DSTORE, X),
499
+ },
500
+ },
501
+ { // astore/aload = dup/astore
502
+ {
503
+ new VariableInstruction(InstructionConstants.OP_ASTORE, X),
504
+ new VariableInstruction(InstructionConstants.OP_ALOAD, X),
505
+ },{
506
+ new SimpleInstruction(InstructionConstants.OP_DUP),
507
+ new VariableInstruction(InstructionConstants.OP_ASTORE, X),
508
+ },
509
+ },
510
+ };
511
+
512
+ public static final Instruction[][][] ARITHMETIC = new Instruction[][][]
513
+ {
514
+ { // c + i = i + c
515
+ {
516
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0, A),
517
+ new VariableInstruction(InstructionConstants.OP_ILOAD, X),
518
+ new SimpleInstruction(InstructionConstants.OP_IADD),
519
+ },{
520
+ new VariableInstruction(InstructionConstants.OP_ILOAD, X),
521
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0, A),
522
+ new SimpleInstruction(InstructionConstants.OP_IADD),
523
+ },
524
+ },
525
+ { // b + i = i + b
526
+ {
527
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, A),
528
+ new VariableInstruction(InstructionConstants.OP_ILOAD, X),
529
+ new SimpleInstruction(InstructionConstants.OP_IADD),
530
+ },{
531
+ new VariableInstruction(InstructionConstants.OP_ILOAD, X),
532
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, A),
533
+ new SimpleInstruction(InstructionConstants.OP_IADD),
534
+ },
535
+ },
536
+ { // s + i = i + s
537
+ {
538
+ new SimpleInstruction(InstructionConstants.OP_SIPUSH, A),
539
+ new VariableInstruction(InstructionConstants.OP_ILOAD, X),
540
+ new SimpleInstruction(InstructionConstants.OP_IADD),
541
+ },{
542
+ new VariableInstruction(InstructionConstants.OP_ILOAD, X),
543
+ new SimpleInstruction(InstructionConstants.OP_SIPUSH, A),
544
+ new SimpleInstruction(InstructionConstants.OP_IADD),
545
+ },
546
+ },
547
+ { // c + i = i + c
548
+ {
549
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
550
+ new VariableInstruction(InstructionConstants.OP_ILOAD, X),
551
+ new SimpleInstruction(InstructionConstants.OP_IADD),
552
+ },{
553
+ new VariableInstruction(InstructionConstants.OP_ILOAD, X),
554
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
555
+ new SimpleInstruction(InstructionConstants.OP_IADD),
556
+ },
557
+ },
558
+ { // c * i = i * c
559
+ {
560
+ new SimpleInstruction(InstructionConstants.OP_SIPUSH, A),
561
+ new VariableInstruction(InstructionConstants.OP_ILOAD, X),
562
+ new SimpleInstruction(InstructionConstants.OP_IMUL),
563
+ },{
564
+ new VariableInstruction(InstructionConstants.OP_ILOAD, X),
565
+ new SimpleInstruction(InstructionConstants.OP_SIPUSH, A),
566
+ new SimpleInstruction(InstructionConstants.OP_IMUL),
567
+ },
568
+ },
569
+ { // b * i = i * b
570
+ {
571
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, A),
572
+ new VariableInstruction(InstructionConstants.OP_ILOAD, X),
573
+ new SimpleInstruction(InstructionConstants.OP_IMUL),
574
+ },{
575
+ new VariableInstruction(InstructionConstants.OP_ILOAD, X),
576
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, A),
577
+ new SimpleInstruction(InstructionConstants.OP_IMUL),
578
+ },
579
+ },
580
+ { // s * i = i * s
581
+ {
582
+ new SimpleInstruction(InstructionConstants.OP_SIPUSH, A),
583
+ new VariableInstruction(InstructionConstants.OP_ILOAD, X),
584
+ new SimpleInstruction(InstructionConstants.OP_IMUL),
585
+ },{
586
+ new VariableInstruction(InstructionConstants.OP_ILOAD, X),
587
+ new SimpleInstruction(InstructionConstants.OP_SIPUSH, A),
588
+ new SimpleInstruction(InstructionConstants.OP_IMUL),
589
+ },
590
+ },
591
+ { // c * i = i * c
592
+ {
593
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
594
+ new VariableInstruction(InstructionConstants.OP_ILOAD, X),
595
+ new SimpleInstruction(InstructionConstants.OP_IMUL),
596
+ },{
597
+ new VariableInstruction(InstructionConstants.OP_ILOAD, X),
598
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
599
+ new SimpleInstruction(InstructionConstants.OP_IMUL),
600
+ },
601
+ },
602
+ { // c + l = l + c
603
+ {
604
+ new SimpleInstruction(InstructionConstants.OP_LCONST_0, A),
605
+ new VariableInstruction(InstructionConstants.OP_LLOAD, X),
606
+ new SimpleInstruction(InstructionConstants.OP_LADD),
607
+ },{
608
+ new VariableInstruction(InstructionConstants.OP_LLOAD, X),
609
+ new SimpleInstruction(InstructionConstants.OP_LCONST_0, A),
610
+ new SimpleInstruction(InstructionConstants.OP_LADD),
611
+ },
612
+ },
613
+ { // c + l = l + c
614
+ {
615
+ new ConstantInstruction(InstructionConstants.OP_LDC2_W, A),
616
+ new VariableInstruction(InstructionConstants.OP_LLOAD, X),
617
+ new SimpleInstruction(InstructionConstants.OP_LADD),
618
+ },{
619
+ new VariableInstruction(InstructionConstants.OP_LLOAD, X),
620
+ new ConstantInstruction(InstructionConstants.OP_LDC2_W, A),
621
+ new SimpleInstruction(InstructionConstants.OP_LADD),
622
+ },
623
+ },
624
+ { // c * l = l * c
625
+ {
626
+ new SimpleInstruction(InstructionConstants.OP_LCONST_0, A),
627
+ new VariableInstruction(InstructionConstants.OP_LLOAD, X),
628
+ new SimpleInstruction(InstructionConstants.OP_LMUL),
629
+ },{
630
+ new VariableInstruction(InstructionConstants.OP_LLOAD, X),
631
+ new SimpleInstruction(InstructionConstants.OP_LCONST_0, A),
632
+ new SimpleInstruction(InstructionConstants.OP_LMUL),
633
+ },
634
+ },
635
+ { // c + f = f + c
636
+ {
637
+ new SimpleInstruction(InstructionConstants.OP_FCONST_0, A),
638
+ new VariableInstruction(InstructionConstants.OP_FLOAD, X),
639
+ new SimpleInstruction(InstructionConstants.OP_FADD),
640
+ },{
641
+ new VariableInstruction(InstructionConstants.OP_FLOAD, X),
642
+ new SimpleInstruction(InstructionConstants.OP_FCONST_0, A),
643
+ new SimpleInstruction(InstructionConstants.OP_FADD),
644
+ },
645
+ },
646
+ { // c + f = f + c
647
+ {
648
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
649
+ new VariableInstruction(InstructionConstants.OP_FLOAD, X),
650
+ new SimpleInstruction(InstructionConstants.OP_FADD),
651
+ },{
652
+ new VariableInstruction(InstructionConstants.OP_FLOAD, X),
653
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
654
+ new SimpleInstruction(InstructionConstants.OP_FADD),
655
+ },
656
+ },
657
+ { // c * f = f * c
658
+ {
659
+ new SimpleInstruction(InstructionConstants.OP_FCONST_0, A),
660
+ new VariableInstruction(InstructionConstants.OP_FLOAD, X),
661
+ new SimpleInstruction(InstructionConstants.OP_FMUL),
662
+ },{
663
+ new VariableInstruction(InstructionConstants.OP_FLOAD, X),
664
+ new SimpleInstruction(InstructionConstants.OP_FCONST_0, A),
665
+ new SimpleInstruction(InstructionConstants.OP_FMUL),
666
+ },
667
+ },
668
+ { // c * f = f * c
669
+ {
670
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
671
+ new VariableInstruction(InstructionConstants.OP_FLOAD, X),
672
+ new SimpleInstruction(InstructionConstants.OP_LMUL),
673
+ },{
674
+ new VariableInstruction(InstructionConstants.OP_FLOAD, X),
675
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
676
+ new SimpleInstruction(InstructionConstants.OP_LMUL),
677
+ },
678
+ },
679
+ { // c + d = d + c
680
+ {
681
+ new SimpleInstruction(InstructionConstants.OP_DCONST_0, A),
682
+ new VariableInstruction(InstructionConstants.OP_DLOAD, X),
683
+ new SimpleInstruction(InstructionConstants.OP_DADD),
684
+ },{
685
+ new VariableInstruction(InstructionConstants.OP_DLOAD, X),
686
+ new SimpleInstruction(InstructionConstants.OP_DCONST_0, A),
687
+ new SimpleInstruction(InstructionConstants.OP_DADD),
688
+ },
689
+ },
690
+ { // c + d = d + c
691
+ {
692
+ new ConstantInstruction(InstructionConstants.OP_LDC2_W, A),
693
+ new VariableInstruction(InstructionConstants.OP_DLOAD, X),
694
+ new SimpleInstruction(InstructionConstants.OP_DADD),
695
+ },{
696
+ new VariableInstruction(InstructionConstants.OP_DLOAD, X),
697
+ new ConstantInstruction(InstructionConstants.OP_LDC2_W, A),
698
+ new SimpleInstruction(InstructionConstants.OP_DADD),
699
+ },
700
+ },
701
+ { // c * d = d * c
702
+ {
703
+ new SimpleInstruction(InstructionConstants.OP_DCONST_0, A),
704
+ new VariableInstruction(InstructionConstants.OP_DLOAD, X),
705
+ new SimpleInstruction(InstructionConstants.OP_DMUL),
706
+ },{
707
+ new VariableInstruction(InstructionConstants.OP_DLOAD, X),
708
+ new SimpleInstruction(InstructionConstants.OP_DCONST_0, A),
709
+ new SimpleInstruction(InstructionConstants.OP_DMUL),
710
+ },
711
+ },
712
+ { // c * d = d * c
713
+ {
714
+ new ConstantInstruction(InstructionConstants.OP_LDC2_W, A),
715
+ new VariableInstruction(InstructionConstants.OP_DLOAD, X),
716
+ new SimpleInstruction(InstructionConstants.OP_DMUL),
717
+ },{
718
+ new VariableInstruction(InstructionConstants.OP_DLOAD, X),
719
+ new ConstantInstruction(InstructionConstants.OP_LDC2_W, A),
720
+ new SimpleInstruction(InstructionConstants.OP_DMUL),
721
+ },
722
+ },
723
+ { // i = i + c = i += c
724
+ {
725
+ new VariableInstruction(InstructionConstants.OP_ILOAD, X),
726
+ new SimpleInstruction(InstructionConstants.OP_SIPUSH, A),
727
+ new SimpleInstruction(InstructionConstants.OP_IADD),
728
+ new VariableInstruction(InstructionConstants.OP_ISTORE, X),
729
+ },{
730
+ new VariableInstruction(InstructionConstants.OP_IINC, X, A),
731
+ },
732
+ },
733
+ { // i = i + b = i += b
734
+ {
735
+ new VariableInstruction(InstructionConstants.OP_ILOAD, X),
736
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, A),
737
+ new SimpleInstruction(InstructionConstants.OP_IADD),
738
+ new VariableInstruction(InstructionConstants.OP_ISTORE, X),
739
+ },{
740
+ new VariableInstruction(InstructionConstants.OP_IINC, X, A),
741
+ },
742
+ },
743
+ { // i = i + s = i += s
744
+ {
745
+ new VariableInstruction(InstructionConstants.OP_ILOAD, X),
746
+ new SimpleInstruction(InstructionConstants.OP_SIPUSH, A),
747
+ new SimpleInstruction(InstructionConstants.OP_IADD),
748
+ new VariableInstruction(InstructionConstants.OP_ISTORE, X),
749
+ },{
750
+ new VariableInstruction(InstructionConstants.OP_IINC, X, A),
751
+ },
752
+ },
753
+ { // i = i - -1 = i++
754
+ {
755
+ new VariableInstruction(InstructionConstants.OP_ILOAD, X),
756
+ new SimpleInstruction(InstructionConstants.OP_ICONST_M1),
757
+ new SimpleInstruction(InstructionConstants.OP_ISUB),
758
+ new VariableInstruction(InstructionConstants.OP_ISTORE, X),
759
+ },{
760
+ new VariableInstruction(InstructionConstants.OP_IINC, X, 1),
761
+ },
762
+ },
763
+ { // i = i - 1 = i--
764
+ {
765
+ new VariableInstruction(InstructionConstants.OP_ILOAD, X),
766
+ new SimpleInstruction(InstructionConstants.OP_ICONST_1),
767
+ new SimpleInstruction(InstructionConstants.OP_ISUB),
768
+ new VariableInstruction(InstructionConstants.OP_ISTORE, X),
769
+ },{
770
+ new VariableInstruction(InstructionConstants.OP_IINC, X, -1),
771
+ },
772
+ },
773
+ { // i = i - 2 = i -= 2
774
+ {
775
+ new VariableInstruction(InstructionConstants.OP_ILOAD, X),
776
+ new SimpleInstruction(InstructionConstants.OP_ICONST_2),
777
+ new SimpleInstruction(InstructionConstants.OP_ISUB),
778
+ new VariableInstruction(InstructionConstants.OP_ISTORE, X),
779
+ },{
780
+ new VariableInstruction(InstructionConstants.OP_IINC, X, -2),
781
+ },
782
+ },
783
+ { // i = i - 3 = i -= 3
784
+ {
785
+ new VariableInstruction(InstructionConstants.OP_ILOAD, X),
786
+ new SimpleInstruction(InstructionConstants.OP_ICONST_3),
787
+ new SimpleInstruction(InstructionConstants.OP_ISUB),
788
+ new VariableInstruction(InstructionConstants.OP_ISTORE, X),
789
+ },{
790
+ new VariableInstruction(InstructionConstants.OP_IINC, X, -3),
791
+ },
792
+ },
793
+ { // i = i - 4 = i -= 4
794
+ {
795
+ new VariableInstruction(InstructionConstants.OP_ILOAD, X),
796
+ new SimpleInstruction(InstructionConstants.OP_ICONST_4),
797
+ new SimpleInstruction(InstructionConstants.OP_ISUB),
798
+ new VariableInstruction(InstructionConstants.OP_ISTORE, X),
799
+ },{
800
+ new VariableInstruction(InstructionConstants.OP_IINC, X, -4),
801
+ },
802
+ },
803
+ { // i = i - 5 = i -= 5
804
+ {
805
+ new VariableInstruction(InstructionConstants.OP_ILOAD, X),
806
+ new SimpleInstruction(InstructionConstants.OP_ICONST_5),
807
+ new SimpleInstruction(InstructionConstants.OP_ISUB),
808
+ new VariableInstruction(InstructionConstants.OP_ISTORE, X),
809
+ },{
810
+ new VariableInstruction(InstructionConstants.OP_IINC, X, -5),
811
+ },
812
+ },
813
+ { // ... + 0 = ...
814
+ {
815
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0),
816
+ new SimpleInstruction(InstructionConstants.OP_IADD),
817
+ },{
818
+ // Nothing.
819
+ },
820
+ },
821
+ { // ... + 0L = ...
822
+ {
823
+ new SimpleInstruction(InstructionConstants.OP_LCONST_0),
824
+ new SimpleInstruction(InstructionConstants.OP_LADD),
825
+ },{
826
+ // Nothing.
827
+ },
828
+ },
829
+ // Not valid for -0.0.
830
+ // { // ... + 0f = ...
831
+ // {
832
+ // new SimpleInstruction(InstructionConstants.OP_FCONST_0),
833
+ // new SimpleInstruction(InstructionConstants.OP_FADD),
834
+ // },{
835
+ // // Nothing.
836
+ // },
837
+ // },
838
+ // { // ... + 0d = ...
839
+ // {
840
+ // new SimpleInstruction(InstructionConstants.OP_DCONST_0),
841
+ // new SimpleInstruction(InstructionConstants.OP_DADD),
842
+ // },{
843
+ // // Nothing.
844
+ // },
845
+ // },
846
+ { // ... - 0 = ...
847
+ {
848
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0),
849
+ new SimpleInstruction(InstructionConstants.OP_ISUB),
850
+ },{
851
+ // Nothing.
852
+ },
853
+ },
854
+ { // ... - 0L = ...
855
+ {
856
+ new SimpleInstruction(InstructionConstants.OP_LCONST_0),
857
+ new SimpleInstruction(InstructionConstants.OP_LSUB),
858
+ },{
859
+ // Nothing.
860
+ },
861
+ },
862
+ { // ... - 0f = ...
863
+ {
864
+ new SimpleInstruction(InstructionConstants.OP_FCONST_0),
865
+ new SimpleInstruction(InstructionConstants.OP_FSUB),
866
+ },{
867
+ // Nothing.
868
+ },
869
+ },
870
+ { // ... - 0d = ...
871
+ {
872
+ new SimpleInstruction(InstructionConstants.OP_DCONST_0),
873
+ new SimpleInstruction(InstructionConstants.OP_DSUB),
874
+ },{
875
+ // Nothing.
876
+ },
877
+ },
878
+ { // ... * -1 = -...
879
+ {
880
+ new SimpleInstruction(InstructionConstants.OP_ICONST_M1),
881
+ new SimpleInstruction(InstructionConstants.OP_IMUL),
882
+ },{
883
+ new SimpleInstruction(InstructionConstants.OP_INEG),
884
+ },
885
+ },
886
+ { // ... * 0 = 0
887
+ {
888
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0),
889
+ new SimpleInstruction(InstructionConstants.OP_IMUL),
890
+ },{
891
+ new SimpleInstruction(InstructionConstants.OP_POP),
892
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0),
893
+ },
894
+ },
895
+ { // ... * 1 = ...
896
+ {
897
+ new SimpleInstruction(InstructionConstants.OP_ICONST_1),
898
+ new SimpleInstruction(InstructionConstants.OP_IMUL),
899
+ },{
900
+ // Nothing.
901
+ },
902
+ },
903
+ { // ... * 2 = ... << 1
904
+ {
905
+ new SimpleInstruction(InstructionConstants.OP_ICONST_2),
906
+ new SimpleInstruction(InstructionConstants.OP_IMUL),
907
+ },{
908
+ new SimpleInstruction(InstructionConstants.OP_ICONST_1),
909
+ new SimpleInstruction(InstructionConstants.OP_ISHL),
910
+ },
911
+ },
912
+ { // ... * 4 = ... << 2
913
+ {
914
+ new SimpleInstruction(InstructionConstants.OP_ICONST_4),
915
+ new SimpleInstruction(InstructionConstants.OP_IMUL),
916
+ },{
917
+ new SimpleInstruction(InstructionConstants.OP_ICONST_2),
918
+ new SimpleInstruction(InstructionConstants.OP_ISHL),
919
+ },
920
+ },
921
+ { // ... * 8 = ... << 3
922
+ {
923
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 8),
924
+ new SimpleInstruction(InstructionConstants.OP_IMUL),
925
+ },{
926
+ new SimpleInstruction(InstructionConstants.OP_ICONST_3),
927
+ new SimpleInstruction(InstructionConstants.OP_ISHL),
928
+ },
929
+ },
930
+ { // ... * 16 = ... << 4
931
+ {
932
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 16),
933
+ new SimpleInstruction(InstructionConstants.OP_IMUL),
934
+ },{
935
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 4),
936
+ new SimpleInstruction(InstructionConstants.OP_ISHL),
937
+ },
938
+ },
939
+ { // ... * 32 = ... << 5
940
+ {
941
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 32),
942
+ new SimpleInstruction(InstructionConstants.OP_IMUL),
943
+ },{
944
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 5),
945
+ new SimpleInstruction(InstructionConstants.OP_ISHL),
946
+ },
947
+ },
948
+ { // ... * 64 = ... << 6
949
+ {
950
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 64),
951
+ new SimpleInstruction(InstructionConstants.OP_IMUL),
952
+ },{
953
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 6),
954
+ new SimpleInstruction(InstructionConstants.OP_ISHL),
955
+ },
956
+ },
957
+ { // ... * 128 = ... << 7
958
+ {
959
+ new SimpleInstruction(InstructionConstants.OP_SIPUSH, 128),
960
+ new SimpleInstruction(InstructionConstants.OP_IMUL),
961
+ },{
962
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 7),
963
+ new SimpleInstruction(InstructionConstants.OP_ISHL),
964
+ },
965
+ },
966
+ { // ... * 256 = ... << 8
967
+ {
968
+ new SimpleInstruction(InstructionConstants.OP_SIPUSH, 256),
969
+ new SimpleInstruction(InstructionConstants.OP_IMUL),
970
+ },{
971
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 8),
972
+ new SimpleInstruction(InstructionConstants.OP_ISHL),
973
+ },
974
+ },
975
+ { // ... * 512 = ... << 9
976
+ {
977
+ new SimpleInstruction(InstructionConstants.OP_SIPUSH, 512),
978
+ new SimpleInstruction(InstructionConstants.OP_IMUL),
979
+ },{
980
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 9),
981
+ new SimpleInstruction(InstructionConstants.OP_ISHL),
982
+ },
983
+ },
984
+ { // ... * 1024 = ... << 10
985
+ {
986
+ new SimpleInstruction(InstructionConstants.OP_SIPUSH, 1024),
987
+ new SimpleInstruction(InstructionConstants.OP_IMUL),
988
+ },{
989
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 10),
990
+ new SimpleInstruction(InstructionConstants.OP_ISHL),
991
+ },
992
+ },
993
+ { // ... * 2048 = ... << 11
994
+ {
995
+ new SimpleInstruction(InstructionConstants.OP_SIPUSH, 2048),
996
+ new SimpleInstruction(InstructionConstants.OP_IMUL),
997
+ },{
998
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 11),
999
+ new SimpleInstruction(InstructionConstants.OP_ISHL),
1000
+ },
1001
+ },
1002
+ { // ... * 4096 = ... << 12
1003
+ {
1004
+ new SimpleInstruction(InstructionConstants.OP_SIPUSH, 4096),
1005
+ new SimpleInstruction(InstructionConstants.OP_IMUL),
1006
+ },{
1007
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 12),
1008
+ new SimpleInstruction(InstructionConstants.OP_ISHL),
1009
+ },
1010
+ },
1011
+ { // ... * 8192 = ... << 13
1012
+ {
1013
+ new SimpleInstruction(InstructionConstants.OP_SIPUSH, 8192),
1014
+ new SimpleInstruction(InstructionConstants.OP_IMUL),
1015
+ },{
1016
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 13),
1017
+ new SimpleInstruction(InstructionConstants.OP_ISHL),
1018
+ },
1019
+ },
1020
+ { // ... * 16384 = ... << 14
1021
+ {
1022
+ new SimpleInstruction(InstructionConstants.OP_SIPUSH, 16384),
1023
+ new SimpleInstruction(InstructionConstants.OP_IMUL),
1024
+ },{
1025
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 14),
1026
+ new SimpleInstruction(InstructionConstants.OP_ISHL),
1027
+ },
1028
+ },
1029
+ { // ... * 32768 = ... << 15
1030
+ {
1031
+ new ConstantInstruction(InstructionConstants.OP_LDC, I_32768),
1032
+ new SimpleInstruction(InstructionConstants.OP_IMUL),
1033
+ },{
1034
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 15),
1035
+ new SimpleInstruction(InstructionConstants.OP_ISHL),
1036
+ },
1037
+ },
1038
+ { // ... * 65536 = ... << 16
1039
+ {
1040
+ new ConstantInstruction(InstructionConstants.OP_LDC, I_65536),
1041
+ new SimpleInstruction(InstructionConstants.OP_IMUL),
1042
+ },{
1043
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 16),
1044
+ new SimpleInstruction(InstructionConstants.OP_ISHL),
1045
+ },
1046
+ },
1047
+ { // ... * 16777216 = ... << 24
1048
+ {
1049
+ new ConstantInstruction(InstructionConstants.OP_LDC, I_16777216),
1050
+ new SimpleInstruction(InstructionConstants.OP_IMUL),
1051
+ },{
1052
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 24),
1053
+ new SimpleInstruction(InstructionConstants.OP_ISHL),
1054
+ },
1055
+ },
1056
+ { // ... * -1L = -...
1057
+ {
1058
+ new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_M1),
1059
+ new SimpleInstruction(InstructionConstants.OP_LMUL),
1060
+ },{
1061
+ new SimpleInstruction(InstructionConstants.OP_LNEG),
1062
+ },
1063
+ },
1064
+ { // ... * 0L = 0L
1065
+ {
1066
+ new SimpleInstruction(InstructionConstants.OP_LCONST_0),
1067
+ new SimpleInstruction(InstructionConstants.OP_LMUL),
1068
+ },{
1069
+ new SimpleInstruction(InstructionConstants.OP_POP2),
1070
+ new SimpleInstruction(InstructionConstants.OP_LCONST_0),
1071
+ },
1072
+ },
1073
+ { // ... * 1L = ...
1074
+ {
1075
+ new SimpleInstruction(InstructionConstants.OP_LCONST_1),
1076
+ new SimpleInstruction(InstructionConstants.OP_LMUL),
1077
+ },{
1078
+ // Nothing.
1079
+ },
1080
+ },
1081
+ { // ... * 2L = ... << 1
1082
+ {
1083
+ new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_2),
1084
+ new SimpleInstruction(InstructionConstants.OP_LMUL),
1085
+ },{
1086
+ new SimpleInstruction(InstructionConstants.OP_ICONST_1),
1087
+ new SimpleInstruction(InstructionConstants.OP_LSHL),
1088
+ },
1089
+ },
1090
+ { // ... * 4L = ... << 2
1091
+ {
1092
+ new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_4),
1093
+ new SimpleInstruction(InstructionConstants.OP_LMUL),
1094
+ },{
1095
+ new SimpleInstruction(InstructionConstants.OP_ICONST_2),
1096
+ new SimpleInstruction(InstructionConstants.OP_LSHL),
1097
+ },
1098
+ },
1099
+ { // ... * 8L = ... << 3
1100
+ {
1101
+ new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_8),
1102
+ new SimpleInstruction(InstructionConstants.OP_LMUL),
1103
+ },{
1104
+ new SimpleInstruction(InstructionConstants.OP_ICONST_3),
1105
+ new SimpleInstruction(InstructionConstants.OP_LSHL),
1106
+ },
1107
+ },
1108
+ { // ... * 16L = ... << 4
1109
+ {
1110
+ new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_16),
1111
+ new SimpleInstruction(InstructionConstants.OP_LMUL),
1112
+ },{
1113
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 4),
1114
+ new SimpleInstruction(InstructionConstants.OP_LSHL),
1115
+ },
1116
+ },
1117
+ { // ... * 32L = ... << 5
1118
+ {
1119
+ new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_32),
1120
+ new SimpleInstruction(InstructionConstants.OP_LMUL),
1121
+ },{
1122
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 5),
1123
+ new SimpleInstruction(InstructionConstants.OP_LSHL),
1124
+ },
1125
+ },
1126
+ { // ... * 64L = ... << 6
1127
+ {
1128
+ new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_64),
1129
+ new SimpleInstruction(InstructionConstants.OP_LMUL),
1130
+ },{
1131
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 6),
1132
+ new SimpleInstruction(InstructionConstants.OP_LSHL),
1133
+ },
1134
+ },
1135
+ { // ... * 128L = ... << 7
1136
+ {
1137
+ new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_128),
1138
+ new SimpleInstruction(InstructionConstants.OP_LMUL),
1139
+ },{
1140
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 7),
1141
+ new SimpleInstruction(InstructionConstants.OP_LSHL),
1142
+ },
1143
+ },
1144
+ { // ... * 256L = ... << 8
1145
+ {
1146
+ new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_256),
1147
+ new SimpleInstruction(InstructionConstants.OP_LMUL),
1148
+ },{
1149
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 8),
1150
+ new SimpleInstruction(InstructionConstants.OP_LSHL),
1151
+ },
1152
+ },
1153
+ { // ... * 512L = ... << 9
1154
+ {
1155
+ new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_512),
1156
+ new SimpleInstruction(InstructionConstants.OP_LMUL),
1157
+ },{
1158
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 9),
1159
+ new SimpleInstruction(InstructionConstants.OP_LSHL),
1160
+ },
1161
+ },
1162
+ { // ... * 1024L = ... << 10
1163
+ {
1164
+ new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_1024),
1165
+ new SimpleInstruction(InstructionConstants.OP_LMUL),
1166
+ },{
1167
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 10),
1168
+ new SimpleInstruction(InstructionConstants.OP_LSHL),
1169
+ },
1170
+ },
1171
+ { // ... * 2048L = ... << 11
1172
+ {
1173
+ new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_2048),
1174
+ new SimpleInstruction(InstructionConstants.OP_LMUL),
1175
+ },{
1176
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 11),
1177
+ new SimpleInstruction(InstructionConstants.OP_LSHL),
1178
+ },
1179
+ },
1180
+ { // ... * 4096L = ... << 12
1181
+ {
1182
+ new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_4096),
1183
+ new SimpleInstruction(InstructionConstants.OP_LMUL),
1184
+ },{
1185
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 12),
1186
+ new SimpleInstruction(InstructionConstants.OP_LSHL),
1187
+ },
1188
+ },
1189
+ { // ... * 8192L = ... << 13
1190
+ {
1191
+ new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_8192),
1192
+ new SimpleInstruction(InstructionConstants.OP_LMUL),
1193
+ },{
1194
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 13),
1195
+ new SimpleInstruction(InstructionConstants.OP_LSHL),
1196
+ },
1197
+ },
1198
+ { // ... * 16384L = ... << 14
1199
+ {
1200
+ new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_16384),
1201
+ new SimpleInstruction(InstructionConstants.OP_LMUL),
1202
+ },{
1203
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 14),
1204
+ new SimpleInstruction(InstructionConstants.OP_LSHL),
1205
+ },
1206
+ },
1207
+ { // ... * 32768L = ... << 15
1208
+ {
1209
+ new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_32768),
1210
+ new SimpleInstruction(InstructionConstants.OP_LMUL),
1211
+ },{
1212
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 15),
1213
+ new SimpleInstruction(InstructionConstants.OP_LSHL),
1214
+ },
1215
+ },
1216
+ { // ... * 65536LL = ... << 16
1217
+ {
1218
+ new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_65536),
1219
+ new SimpleInstruction(InstructionConstants.OP_LMUL),
1220
+ },{
1221
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 16),
1222
+ new SimpleInstruction(InstructionConstants.OP_LSHL),
1223
+ },
1224
+ },
1225
+ { // ... * 16777216L = ... << 24
1226
+ {
1227
+ new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_16777216),
1228
+ new SimpleInstruction(InstructionConstants.OP_LMUL),
1229
+ },{
1230
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 24),
1231
+ new SimpleInstruction(InstructionConstants.OP_LSHL),
1232
+ },
1233
+ },
1234
+ { // ... * 4294967296L = ... << 32
1235
+ {
1236
+ new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_4294967296),
1237
+ new SimpleInstruction(InstructionConstants.OP_LMUL),
1238
+ },{
1239
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 32),
1240
+ new SimpleInstruction(InstructionConstants.OP_LSHL),
1241
+ },
1242
+ },
1243
+ { // ... * -1f = -...
1244
+ {
1245
+ new ConstantInstruction(InstructionConstants.OP_LDC, F_M1),
1246
+ new SimpleInstruction(InstructionConstants.OP_FMUL),
1247
+ },{
1248
+ new SimpleInstruction(InstructionConstants.OP_FNEG),
1249
+ },
1250
+ },
1251
+ // Not valid for -0.0 and for NaN.
1252
+ // { // ... * 0f = 0f
1253
+ // {
1254
+ // new SimpleInstruction(InstructionConstants.OP_FCONST_0),
1255
+ // new SimpleInstruction(InstructionConstants.OP_FMUL),
1256
+ // },{
1257
+ // new SimpleInstruction(InstructionConstants.OP_POP),
1258
+ // new SimpleInstruction(InstructionConstants.OP_FCONST_0),
1259
+ // },
1260
+ // },
1261
+ { // ... * 1f = ...
1262
+ {
1263
+ new SimpleInstruction(InstructionConstants.OP_FCONST_1),
1264
+ new SimpleInstruction(InstructionConstants.OP_FMUL),
1265
+ },{
1266
+ // Nothing.
1267
+ },
1268
+ },
1269
+ { // ... * -1d = -...
1270
+ {
1271
+ new ConstantInstruction(InstructionConstants.OP_LDC2_W, D_M1),
1272
+ new SimpleInstruction(InstructionConstants.OP_DMUL),
1273
+ },{
1274
+ new SimpleInstruction(InstructionConstants.OP_DNEG),
1275
+ },
1276
+ },
1277
+ // Not valid for -0.0 and for NaN.
1278
+ // { // ... * 0d = 0d
1279
+ // {
1280
+ // new SimpleInstruction(InstructionConstants.OP_DCONST_0),
1281
+ // new SimpleInstruction(InstructionConstants.OP_DMUL),
1282
+ // },{
1283
+ // new SimpleInstruction(InstructionConstants.OP_POP2),
1284
+ // new SimpleInstruction(InstructionConstants.OP_DCONST_0),
1285
+ // },
1286
+ // },
1287
+ { // ... * 1d = ...
1288
+ {
1289
+ new SimpleInstruction(InstructionConstants.OP_DCONST_1),
1290
+ new SimpleInstruction(InstructionConstants.OP_DMUL),
1291
+ },{
1292
+ // Nothing.
1293
+ },
1294
+ },
1295
+ { // ... / -1 = -...
1296
+ {
1297
+ new SimpleInstruction(InstructionConstants.OP_ICONST_M1),
1298
+ new SimpleInstruction(InstructionConstants.OP_IDIV),
1299
+ },{
1300
+ new SimpleInstruction(InstructionConstants.OP_INEG),
1301
+ },
1302
+ },
1303
+ { // ... / 1 = ...
1304
+ {
1305
+ new SimpleInstruction(InstructionConstants.OP_ICONST_1),
1306
+ new SimpleInstruction(InstructionConstants.OP_IDIV),
1307
+ },{
1308
+ // Nothing.
1309
+ },
1310
+ },
1311
+ // Not valid for negative values.
1312
+ // { // ... / 2 = ... >> 1
1313
+ // {
1314
+ // new SimpleInstruction(InstructionConstants.OP_ICONST_2),
1315
+ // new SimpleInstruction(InstructionConstants.OP_IDIV),
1316
+ // },{
1317
+ // new SimpleInstruction(InstructionConstants.OP_ICONST_1),
1318
+ // new SimpleInstruction(InstructionConstants.OP_ISHR),
1319
+ // },
1320
+ // },
1321
+ // { // ... / 4 = ... >> 2
1322
+ // {
1323
+ // new SimpleInstruction(InstructionConstants.OP_ICONST_4),
1324
+ // new SimpleInstruction(InstructionConstants.OP_IDIV),
1325
+ // },{
1326
+ // new SimpleInstruction(InstructionConstants.OP_ICONST_2),
1327
+ // new SimpleInstruction(InstructionConstants.OP_ISHR),
1328
+ // },
1329
+ // },
1330
+ // { // ... / 8 = ... >> 3
1331
+ // {
1332
+ // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 8),
1333
+ // new SimpleInstruction(InstructionConstants.OP_IDIV),
1334
+ // },{
1335
+ // new SimpleInstruction(InstructionConstants.OP_ICONST_3),
1336
+ // new SimpleInstruction(InstructionConstants.OP_ISHR),
1337
+ // },
1338
+ // },
1339
+ // { // ... / 16 = ... >> 4
1340
+ // {
1341
+ // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 16),
1342
+ // new SimpleInstruction(InstructionConstants.OP_IDIV),
1343
+ // },{
1344
+ // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 4),
1345
+ // new SimpleInstruction(InstructionConstants.OP_ISHR),
1346
+ // },
1347
+ // },
1348
+ // { // ... / 32 = ... >> 5
1349
+ // {
1350
+ // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 32),
1351
+ // new SimpleInstruction(InstructionConstants.OP_IDIV),
1352
+ // },{
1353
+ // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 5),
1354
+ // new SimpleInstruction(InstructionConstants.OP_ISHR),
1355
+ // },
1356
+ // },
1357
+ // { // ... / 64 = ... >> 6
1358
+ // {
1359
+ // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 64),
1360
+ // new SimpleInstruction(InstructionConstants.OP_IDIV),
1361
+ // },{
1362
+ // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 6),
1363
+ // new SimpleInstruction(InstructionConstants.OP_ISHR),
1364
+ // },
1365
+ // },
1366
+ // { // ... / 128 = ... >> 7
1367
+ // {
1368
+ // new SimpleInstruction(InstructionConstants.OP_SIPUSH, 128),
1369
+ // new SimpleInstruction(InstructionConstants.OP_IDIV),
1370
+ // },{
1371
+ // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 7),
1372
+ // new SimpleInstruction(InstructionConstants.OP_ISHR),
1373
+ // },
1374
+ // },
1375
+ // { // ... / 256 = ... >> 8
1376
+ // {
1377
+ // new SimpleInstruction(InstructionConstants.OP_SIPUSH, 256),
1378
+ // new SimpleInstruction(InstructionConstants.OP_IDIV),
1379
+ // },{
1380
+ // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 8),
1381
+ // new SimpleInstruction(InstructionConstants.OP_ISHR),
1382
+ // },
1383
+ // },
1384
+ // { // ... / 512 = ... >> 9
1385
+ // {
1386
+ // new SimpleInstruction(InstructionConstants.OP_SIPUSH, 512),
1387
+ // new SimpleInstruction(InstructionConstants.OP_IDIV),
1388
+ // },{
1389
+ // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 9),
1390
+ // new SimpleInstruction(InstructionConstants.OP_ISHR),
1391
+ // },
1392
+ // },
1393
+ // { // ... / 1024 = ... >> 10
1394
+ // {
1395
+ // new SimpleInstruction(InstructionConstants.OP_SIPUSH, 1024),
1396
+ // new SimpleInstruction(InstructionConstants.OP_IDIV),
1397
+ // },{
1398
+ // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 10),
1399
+ // new SimpleInstruction(InstructionConstants.OP_ISHR),
1400
+ // },
1401
+ // },
1402
+ // { // ... / 2048 = ... >> 11
1403
+ // {
1404
+ // new SimpleInstruction(InstructionConstants.OP_SIPUSH, 2048),
1405
+ // new SimpleInstruction(InstructionConstants.OP_IDIV),
1406
+ // },{
1407
+ // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 11),
1408
+ // new SimpleInstruction(InstructionConstants.OP_ISHR),
1409
+ // },
1410
+ // },
1411
+ // { // ... / 4096 = ... >> 12
1412
+ // {
1413
+ // new SimpleInstruction(InstructionConstants.OP_SIPUSH, 4096),
1414
+ // new SimpleInstruction(InstructionConstants.OP_IDIV),
1415
+ // },{
1416
+ // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 12),
1417
+ // new SimpleInstruction(InstructionConstants.OP_ISHR),
1418
+ // },
1419
+ // },
1420
+ // { // ... / 8192 = ... >> 13
1421
+ // {
1422
+ // new SimpleInstruction(InstructionConstants.OP_SIPUSH, 8192),
1423
+ // new SimpleInstruction(InstructionConstants.OP_IDIV),
1424
+ // },{
1425
+ // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 13),
1426
+ // new SimpleInstruction(InstructionConstants.OP_ISHR),
1427
+ // },
1428
+ // },
1429
+ // { // ... / 16384 = ... >> 14
1430
+ // {
1431
+ // new SimpleInstruction(InstructionConstants.OP_SIPUSH, 16384),
1432
+ // new SimpleInstruction(InstructionConstants.OP_IDIV),
1433
+ // },{
1434
+ // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 14),
1435
+ // new SimpleInstruction(InstructionConstants.OP_ISHR),
1436
+ // },
1437
+ // },
1438
+ // { // ... / 32768 = ... >> 15
1439
+ // {
1440
+ // new ConstantInstruction(InstructionConstants.OP_LDC, I_32768),
1441
+ // new SimpleInstruction(InstructionConstants.OP_IDIV),
1442
+ // },{
1443
+ // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 15),
1444
+ // new SimpleInstruction(InstructionConstants.OP_ISHR),
1445
+ // },
1446
+ // },
1447
+ // { // ... / 65536 = ... >> 16
1448
+ // {
1449
+ // new ConstantInstruction(InstructionConstants.OP_LDC, I_65536),
1450
+ // new SimpleInstruction(InstructionConstants.OP_IDIV),
1451
+ // },{
1452
+ // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 16),
1453
+ // new SimpleInstruction(InstructionConstants.OP_ISHR),
1454
+ // },
1455
+ // },
1456
+ // { // ... / 16777216 = ... >> 24
1457
+ // {
1458
+ // new ConstantInstruction(InstructionConstants.OP_LDC, I_16777216),
1459
+ // new SimpleInstruction(InstructionConstants.OP_IDIV),
1460
+ // },{
1461
+ // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 24),
1462
+ // new SimpleInstruction(InstructionConstants.OP_ISHR),
1463
+ // },
1464
+ // },
1465
+ { // ... / -1L = -...
1466
+ {
1467
+ new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_M1),
1468
+ new SimpleInstruction(InstructionConstants.OP_LDIV),
1469
+ },{
1470
+ new SimpleInstruction(InstructionConstants.OP_LNEG),
1471
+ },
1472
+ },
1473
+ { // ... / 1L = ...
1474
+ {
1475
+ new SimpleInstruction(InstructionConstants.OP_LCONST_1),
1476
+ new SimpleInstruction(InstructionConstants.OP_LDIV),
1477
+ },{
1478
+ // Nothing.
1479
+ },
1480
+ },
1481
+ // Not valid for negative values.
1482
+ // { // ... / 2L = ... >> 1
1483
+ // {
1484
+ // new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_2),
1485
+ // new SimpleInstruction(InstructionConstants.OP_LDIV),
1486
+ // },{
1487
+ // new SimpleInstruction(InstructionConstants.OP_ICONST_1),
1488
+ // new SimpleInstruction(InstructionConstants.OP_LSHR),
1489
+ // },
1490
+ // },
1491
+ // { // ... / 4L = ... >> 2
1492
+ // {
1493
+ // new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_4),
1494
+ // new SimpleInstruction(InstructionConstants.OP_LDIV),
1495
+ // },{
1496
+ // new SimpleInstruction(InstructionConstants.OP_ICONST_2),
1497
+ // new SimpleInstruction(InstructionConstants.OP_LSHR),
1498
+ // },
1499
+ // },
1500
+ // { // ... / 8L = ... >> 3
1501
+ // {
1502
+ // new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_8),
1503
+ // new SimpleInstruction(InstructionConstants.OP_LDIV),
1504
+ // },{
1505
+ // new SimpleInstruction(InstructionConstants.OP_ICONST_3),
1506
+ // new SimpleInstruction(InstructionConstants.OP_LSHR),
1507
+ // },
1508
+ // },
1509
+ // { // ... / 16L = ... >> 4
1510
+ // {
1511
+ // new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_16),
1512
+ // new SimpleInstruction(InstructionConstants.OP_LDIV),
1513
+ // },{
1514
+ // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 4),
1515
+ // new SimpleInstruction(InstructionConstants.OP_LSHR),
1516
+ // },
1517
+ // },
1518
+ // { // ... / 32L = ... >> 5
1519
+ // {
1520
+ // new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_32),
1521
+ // new SimpleInstruction(InstructionConstants.OP_LDIV),
1522
+ // },{
1523
+ // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 5),
1524
+ // new SimpleInstruction(InstructionConstants.OP_LSHR),
1525
+ // },
1526
+ // },
1527
+ // { // ... / 64L = ... >> 6
1528
+ // {
1529
+ // new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_64),
1530
+ // new SimpleInstruction(InstructionConstants.OP_LDIV),
1531
+ // },{
1532
+ // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 6),
1533
+ // new SimpleInstruction(InstructionConstants.OP_LSHR),
1534
+ // },
1535
+ // },
1536
+ // { // ... / 128L = ... >> 7
1537
+ // {
1538
+ // new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_128),
1539
+ // new SimpleInstruction(InstructionConstants.OP_LDIV),
1540
+ // },{
1541
+ // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 7),
1542
+ // new SimpleInstruction(InstructionConstants.OP_LSHR),
1543
+ // },
1544
+ // },
1545
+ // { // ... / 256L = ... >> 8
1546
+ // {
1547
+ // new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_256),
1548
+ // new SimpleInstruction(InstructionConstants.OP_LDIV),
1549
+ // },{
1550
+ // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 8),
1551
+ // new SimpleInstruction(InstructionConstants.OP_LSHR),
1552
+ // },
1553
+ // },
1554
+ // { // ... / 512L = ... >> 9
1555
+ // {
1556
+ // new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_512),
1557
+ // new SimpleInstruction(InstructionConstants.OP_LDIV),
1558
+ // },{
1559
+ // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 9),
1560
+ // new SimpleInstruction(InstructionConstants.OP_LSHR),
1561
+ // },
1562
+ // },
1563
+ // { // ... / 1024L = ... >> 10
1564
+ // {
1565
+ // new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_1024),
1566
+ // new SimpleInstruction(InstructionConstants.OP_LDIV),
1567
+ // },{
1568
+ // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 10),
1569
+ // new SimpleInstruction(InstructionConstants.OP_LSHR),
1570
+ // },
1571
+ // },
1572
+ // { // ... / 2048L = ... >> 11
1573
+ // {
1574
+ // new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_2048),
1575
+ // new SimpleInstruction(InstructionConstants.OP_LDIV),
1576
+ // },{
1577
+ // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 11),
1578
+ // new SimpleInstruction(InstructionConstants.OP_LSHR),
1579
+ // },
1580
+ // },
1581
+ // { // ... / 4096L = ... >> 12
1582
+ // {
1583
+ // new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_4096),
1584
+ // new SimpleInstruction(InstructionConstants.OP_LDIV),
1585
+ // },{
1586
+ // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 12),
1587
+ // new SimpleInstruction(InstructionConstants.OP_LSHR),
1588
+ // },
1589
+ // },
1590
+ // { // ... / 8192L = ... >> 13
1591
+ // {
1592
+ // new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_8192),
1593
+ // new SimpleInstruction(InstructionConstants.OP_LDIV),
1594
+ // },{
1595
+ // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 13),
1596
+ // new SimpleInstruction(InstructionConstants.OP_LSHR),
1597
+ // },
1598
+ // },
1599
+ // { // ... / 16384L = ... >> 14
1600
+ // {
1601
+ // new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_16384),
1602
+ // new SimpleInstruction(InstructionConstants.OP_LDIV),
1603
+ // },{
1604
+ // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 14),
1605
+ // new SimpleInstruction(InstructionConstants.OP_LSHR),
1606
+ // },
1607
+ // },
1608
+ // { // ... / 32768L = ... >> 15
1609
+ // {
1610
+ // new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_32768),
1611
+ // new SimpleInstruction(InstructionConstants.OP_LDIV),
1612
+ // },{
1613
+ // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 15),
1614
+ // new SimpleInstruction(InstructionConstants.OP_LSHR),
1615
+ // },
1616
+ // },
1617
+ // { // ... / 65536LL = ... >> 16
1618
+ // {
1619
+ // new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_65536),
1620
+ // new SimpleInstruction(InstructionConstants.OP_LDIV),
1621
+ // },{
1622
+ // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 16),
1623
+ // new SimpleInstruction(InstructionConstants.OP_LSHR),
1624
+ // },
1625
+ // },
1626
+ // { // ... / 16777216L = ... >> 24
1627
+ // {
1628
+ // new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_16777216),
1629
+ // new SimpleInstruction(InstructionConstants.OP_LDIV),
1630
+ // },{
1631
+ // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 24),
1632
+ // new SimpleInstruction(InstructionConstants.OP_LSHR),
1633
+ // },
1634
+ // },
1635
+ // { // ... / 4294967296L = ... >> 32
1636
+ // {
1637
+ // new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_4294967296),
1638
+ // new SimpleInstruction(InstructionConstants.OP_LDIV),
1639
+ // },{
1640
+ // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 32),
1641
+ // new SimpleInstruction(InstructionConstants.OP_LSHR),
1642
+ // },
1643
+ // },
1644
+ { // ... / -1f = -...
1645
+ {
1646
+ new ConstantInstruction(InstructionConstants.OP_LDC, F_M1),
1647
+ new SimpleInstruction(InstructionConstants.OP_FDIV),
1648
+ },{
1649
+ new SimpleInstruction(InstructionConstants.OP_FNEG),
1650
+ },
1651
+ },
1652
+ { // ... / 1f = ...
1653
+ {
1654
+ new SimpleInstruction(InstructionConstants.OP_FCONST_1),
1655
+ new SimpleInstruction(InstructionConstants.OP_FDIV),
1656
+ },{
1657
+ // Nothing.
1658
+ },
1659
+ },
1660
+ { // ... / -1d = -...
1661
+ {
1662
+ new ConstantInstruction(InstructionConstants.OP_LDC2_W, D_M1),
1663
+ new SimpleInstruction(InstructionConstants.OP_DDIV),
1664
+ },{
1665
+ new SimpleInstruction(InstructionConstants.OP_DNEG),
1666
+ },
1667
+ },
1668
+ { // ... / 1d = ...
1669
+ {
1670
+ new SimpleInstruction(InstructionConstants.OP_DCONST_1),
1671
+ new SimpleInstruction(InstructionConstants.OP_DDIV),
1672
+ },{
1673
+ // Nothing.
1674
+ },
1675
+ },
1676
+ { // ... % 1 = 0
1677
+ {
1678
+ new SimpleInstruction(InstructionConstants.OP_ICONST_1),
1679
+ new SimpleInstruction(InstructionConstants.OP_IREM),
1680
+ },{
1681
+ new SimpleInstruction(InstructionConstants.OP_POP),
1682
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0),
1683
+ },
1684
+ },
1685
+ // Not valid for negative values.
1686
+ // { // ... % 2 = ... & 0x1
1687
+ // {
1688
+ // new SimpleInstruction(InstructionConstants.OP_ICONST_2),
1689
+ // new SimpleInstruction(InstructionConstants.OP_IREM),
1690
+ // },{
1691
+ // new SimpleInstruction(InstructionConstants.OP_ICONST_1),
1692
+ // new SimpleInstruction(InstructionConstants.OP_IAND),
1693
+ // },
1694
+ // },
1695
+ // { // ... % 4 = ... & 0x3
1696
+ // {
1697
+ // new SimpleInstruction(InstructionConstants.OP_ICONST_4),
1698
+ // new SimpleInstruction(InstructionConstants.OP_IREM),
1699
+ // },{
1700
+ // new SimpleInstruction(InstructionConstants.OP_ICONST_3),
1701
+ // new SimpleInstruction(InstructionConstants.OP_IAND),
1702
+ // },
1703
+ // },
1704
+ // { // ... % 8 = ... & 0x07
1705
+ // {
1706
+ // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 8),
1707
+ // new SimpleInstruction(InstructionConstants.OP_IREM),
1708
+ // },{
1709
+ // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 0x07),
1710
+ // new SimpleInstruction(InstructionConstants.OP_IAND),
1711
+ // },
1712
+ // },
1713
+ // { // ... % 16 = ... & 0x0f
1714
+ // {
1715
+ // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 16),
1716
+ // new SimpleInstruction(InstructionConstants.OP_IREM),
1717
+ // },{
1718
+ // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 0x0f),
1719
+ // new SimpleInstruction(InstructionConstants.OP_IAND),
1720
+ // },
1721
+ // },
1722
+ // { // ... % 32 = ... & 0x1f
1723
+ // {
1724
+ // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 32),
1725
+ // new SimpleInstruction(InstructionConstants.OP_IREM),
1726
+ // },{
1727
+ // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 0x1f),
1728
+ // new SimpleInstruction(InstructionConstants.OP_IAND),
1729
+ // },
1730
+ // },
1731
+ // { // ... % 64 = ... & 0x3f
1732
+ // {
1733
+ // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 64),
1734
+ // new SimpleInstruction(InstructionConstants.OP_IREM),
1735
+ // },{
1736
+ // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 0x3f),
1737
+ // new SimpleInstruction(InstructionConstants.OP_IAND),
1738
+ // },
1739
+ // },
1740
+ // { // ... % 128 = ... & 0x7f
1741
+ // {
1742
+ // new SimpleInstruction(InstructionConstants.OP_SIPUSH, 128),
1743
+ // new SimpleInstruction(InstructionConstants.OP_IREM),
1744
+ // },{
1745
+ // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 0x7f),
1746
+ // new SimpleInstruction(InstructionConstants.OP_IAND),
1747
+ // },
1748
+ // },
1749
+ // { // ... % 256 = ... & 0x00ff
1750
+ // {
1751
+ // new SimpleInstruction(InstructionConstants.OP_SIPUSH, 256),
1752
+ // new SimpleInstruction(InstructionConstants.OP_IREM),
1753
+ // },{
1754
+ // new SimpleInstruction(InstructionConstants.OP_SIPUSH, 0x00ff),
1755
+ // new SimpleInstruction(InstructionConstants.OP_IAND),
1756
+ // },
1757
+ // },
1758
+ // { // ... % 512 = ... & 0x01ff
1759
+ // {
1760
+ // new SimpleInstruction(InstructionConstants.OP_SIPUSH, 512),
1761
+ // new SimpleInstruction(InstructionConstants.OP_IREM),
1762
+ // },{
1763
+ // new SimpleInstruction(InstructionConstants.OP_SIPUSH, 0x01ff),
1764
+ // new SimpleInstruction(InstructionConstants.OP_IAND),
1765
+ // },
1766
+ // },
1767
+ // { // ... % 1024 = ... & 0x03ff
1768
+ // {
1769
+ // new SimpleInstruction(InstructionConstants.OP_SIPUSH, 1024),
1770
+ // new SimpleInstruction(InstructionConstants.OP_IREM),
1771
+ // },{
1772
+ // new SimpleInstruction(InstructionConstants.OP_SIPUSH, 0x03ff),
1773
+ // new SimpleInstruction(InstructionConstants.OP_IAND),
1774
+ // },
1775
+ // },
1776
+ // { // ... % 2048 = ... & 0x07ff
1777
+ // {
1778
+ // new SimpleInstruction(InstructionConstants.OP_SIPUSH, 2048),
1779
+ // new SimpleInstruction(InstructionConstants.OP_IREM),
1780
+ // },{
1781
+ // new SimpleInstruction(InstructionConstants.OP_SIPUSH, 0x07ff),
1782
+ // new SimpleInstruction(InstructionConstants.OP_IAND),
1783
+ // },
1784
+ // },
1785
+ // { // ... % 4096 = ... & 0x0fff
1786
+ // {
1787
+ // new SimpleInstruction(InstructionConstants.OP_SIPUSH, 4096),
1788
+ // new SimpleInstruction(InstructionConstants.OP_IREM),
1789
+ // },{
1790
+ // new SimpleInstruction(InstructionConstants.OP_SIPUSH, 0x0fff),
1791
+ // new SimpleInstruction(InstructionConstants.OP_IAND),
1792
+ // },
1793
+ // },
1794
+ // { // ... % 8192 = ... & 0x1fff
1795
+ // {
1796
+ // new SimpleInstruction(InstructionConstants.OP_SIPUSH, 8192),
1797
+ // new SimpleInstruction(InstructionConstants.OP_IREM),
1798
+ // },{
1799
+ // new SimpleInstruction(InstructionConstants.OP_SIPUSH, 0x1fff),
1800
+ // new SimpleInstruction(InstructionConstants.OP_IAND),
1801
+ // },
1802
+ // },
1803
+ // { // ... % 16384 = ... & 0x3fff
1804
+ // {
1805
+ // new SimpleInstruction(InstructionConstants.OP_SIPUSH, 16384),
1806
+ // new SimpleInstruction(InstructionConstants.OP_IREM),
1807
+ // },{
1808
+ // new SimpleInstruction(InstructionConstants.OP_SIPUSH, 0x3fff),
1809
+ // new SimpleInstruction(InstructionConstants.OP_IAND),
1810
+ // },
1811
+ // },
1812
+ { // ... % 1L = 0L
1813
+ {
1814
+ new SimpleInstruction(InstructionConstants.OP_LCONST_1),
1815
+ new SimpleInstruction(InstructionConstants.OP_LREM),
1816
+ },{
1817
+ new SimpleInstruction(InstructionConstants.OP_POP2),
1818
+ new SimpleInstruction(InstructionConstants.OP_LCONST_0),
1819
+ },
1820
+ },
1821
+ // { // ... % 1f = 0f
1822
+ // {
1823
+ // new SimpleInstruction(InstructionConstants.OP_FCONST_1),
1824
+ // new SimpleInstruction(InstructionConstants.OP_FREM),
1825
+ // },{
1826
+ // new SimpleInstruction(InstructionConstants.OP_POP),
1827
+ // new SimpleInstruction(InstructionConstants.OP_FCONST_0),
1828
+ // },
1829
+ // },
1830
+ // { // ... % 1d = 0d
1831
+ // {
1832
+ // new SimpleInstruction(InstructionConstants.OP_DCONST_1),
1833
+ // new SimpleInstruction(InstructionConstants.OP_DREM),
1834
+ // },{
1835
+ // new SimpleInstruction(InstructionConstants.OP_POP2),
1836
+ // new SimpleInstruction(InstructionConstants.OP_DCONST_0),
1837
+ // },
1838
+ // },
1839
+ { // -(-...) = ...
1840
+ {
1841
+ new SimpleInstruction(InstructionConstants.OP_INEG),
1842
+ new SimpleInstruction(InstructionConstants.OP_INEG),
1843
+ },{
1844
+ // Nothing.
1845
+ },
1846
+ },
1847
+ { // -(-...) = ...
1848
+ {
1849
+ new SimpleInstruction(InstructionConstants.OP_LNEG),
1850
+ new SimpleInstruction(InstructionConstants.OP_LNEG),
1851
+ },{
1852
+ // Nothing.
1853
+ },
1854
+ },
1855
+ { // -(-...) = ...
1856
+ {
1857
+ new SimpleInstruction(InstructionConstants.OP_FNEG),
1858
+ new SimpleInstruction(InstructionConstants.OP_FNEG),
1859
+ },{
1860
+ // Nothing.
1861
+ },
1862
+ },
1863
+ { // -(-...) = ...
1864
+ {
1865
+ new SimpleInstruction(InstructionConstants.OP_DNEG),
1866
+ new SimpleInstruction(InstructionConstants.OP_DNEG),
1867
+ },{
1868
+ // Nothing.
1869
+ },
1870
+ },
1871
+ { // +(-...) = -...
1872
+ {
1873
+ new SimpleInstruction(InstructionConstants.OP_INEG),
1874
+ new SimpleInstruction(InstructionConstants.OP_IADD),
1875
+ },{
1876
+ new SimpleInstruction(InstructionConstants.OP_ISUB),
1877
+ },
1878
+ },
1879
+ { // +(-...) = -...
1880
+ {
1881
+ new SimpleInstruction(InstructionConstants.OP_LNEG),
1882
+ new SimpleInstruction(InstructionConstants.OP_LADD),
1883
+ },{
1884
+ new SimpleInstruction(InstructionConstants.OP_LSUB),
1885
+ },
1886
+ },
1887
+ { // +(-...) = -...
1888
+ {
1889
+ new SimpleInstruction(InstructionConstants.OP_FNEG),
1890
+ new SimpleInstruction(InstructionConstants.OP_FADD),
1891
+ },{
1892
+ new SimpleInstruction(InstructionConstants.OP_FSUB),
1893
+ },
1894
+ },
1895
+ { // +(-...) = -...
1896
+ {
1897
+ new SimpleInstruction(InstructionConstants.OP_DNEG),
1898
+ new SimpleInstruction(InstructionConstants.OP_DADD),
1899
+ },{
1900
+ new SimpleInstruction(InstructionConstants.OP_DSUB),
1901
+ },
1902
+ },
1903
+ { // ... << 0 = ...
1904
+ {
1905
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0),
1906
+ new SimpleInstruction(InstructionConstants.OP_ISHL),
1907
+ },{
1908
+ // Nothing.
1909
+ },
1910
+ },
1911
+ { // ... << 0 = ...
1912
+ {
1913
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0),
1914
+ new SimpleInstruction(InstructionConstants.OP_LSHL),
1915
+ },{
1916
+ // Nothing.
1917
+ },
1918
+ },
1919
+ { // ... >> 0 = ...
1920
+ {
1921
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0),
1922
+ new SimpleInstruction(InstructionConstants.OP_ISHR),
1923
+ },{
1924
+ // Nothing.
1925
+ },
1926
+ },
1927
+ { // ... >> 0 = ...
1928
+ {
1929
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0),
1930
+ new SimpleInstruction(InstructionConstants.OP_LSHR),
1931
+ },{
1932
+ // Nothing.
1933
+ },
1934
+ },
1935
+ { // ... >>> 0 = ...
1936
+ {
1937
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0),
1938
+ new SimpleInstruction(InstructionConstants.OP_IUSHR),
1939
+ },{
1940
+ // Nothing.
1941
+ },
1942
+ },
1943
+ { // ... >>> 0 = ...
1944
+ {
1945
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0),
1946
+ new SimpleInstruction(InstructionConstants.OP_LUSHR),
1947
+ },{
1948
+ // Nothing.
1949
+ },
1950
+ },
1951
+ { // ... & -1 = ...
1952
+ {
1953
+ new SimpleInstruction(InstructionConstants.OP_ICONST_M1),
1954
+ new SimpleInstruction(InstructionConstants.OP_IAND),
1955
+ },{
1956
+ // Nothing.
1957
+ },
1958
+ },
1959
+ { // ... & 0 = 0
1960
+ {
1961
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0),
1962
+ new SimpleInstruction(InstructionConstants.OP_IAND),
1963
+ },{
1964
+ new SimpleInstruction(InstructionConstants.OP_POP),
1965
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0),
1966
+ },
1967
+ },
1968
+ { // ... & -1L = ...
1969
+ {
1970
+ new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_M1),
1971
+ new SimpleInstruction(InstructionConstants.OP_LAND),
1972
+ },{
1973
+ // Nothing.
1974
+ },
1975
+ },
1976
+ { // ... & 0L = 0L
1977
+ {
1978
+ new SimpleInstruction(InstructionConstants.OP_LCONST_0),
1979
+ new SimpleInstruction(InstructionConstants.OP_LAND),
1980
+ },{
1981
+ new SimpleInstruction(InstructionConstants.OP_POP2),
1982
+ new SimpleInstruction(InstructionConstants.OP_LCONST_0),
1983
+ },
1984
+ },
1985
+ { // ... | -1 = -1
1986
+ {
1987
+ new SimpleInstruction(InstructionConstants.OP_ICONST_M1),
1988
+ new SimpleInstruction(InstructionConstants.OP_IOR),
1989
+ },{
1990
+ new SimpleInstruction(InstructionConstants.OP_POP),
1991
+ new SimpleInstruction(InstructionConstants.OP_ICONST_M1),
1992
+ },
1993
+ },
1994
+ { // ... | 0 = ...
1995
+ {
1996
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0),
1997
+ new SimpleInstruction(InstructionConstants.OP_IOR),
1998
+ },{
1999
+ // Nothing.
2000
+ },
2001
+ },
2002
+ { // ... | -1L = -1L
2003
+ {
2004
+ new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_M1),
2005
+ new SimpleInstruction(InstructionConstants.OP_LAND),
2006
+ },{
2007
+ new SimpleInstruction(InstructionConstants.OP_POP2),
2008
+ new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_M1),
2009
+ },
2010
+ },
2011
+ { // ... | 0L = ...
2012
+ {
2013
+ new SimpleInstruction(InstructionConstants.OP_LCONST_0),
2014
+ new SimpleInstruction(InstructionConstants.OP_LOR),
2015
+ },{
2016
+ // Nothing.
2017
+ },
2018
+ },
2019
+ { // ... ^ 0 = ...
2020
+ {
2021
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0),
2022
+ new SimpleInstruction(InstructionConstants.OP_IXOR),
2023
+ },{
2024
+ // Nothing.
2025
+ },
2026
+ },
2027
+ { // ... ^ 0L = ...
2028
+ {
2029
+ new SimpleInstruction(InstructionConstants.OP_LCONST_0),
2030
+ new SimpleInstruction(InstructionConstants.OP_LXOR),
2031
+ },{
2032
+ // Nothing.
2033
+ },
2034
+ },
2035
+ { // (... & 0x0000ff00) >> 8 = (... >> 8) & 0xff
2036
+ {
2037
+ new ConstantInstruction(InstructionConstants.OP_LDC, I_0x0000ff00),
2038
+ new SimpleInstruction(InstructionConstants.OP_IAND),
2039
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 8),
2040
+ new SimpleInstruction(InstructionConstants.OP_ISHR),
2041
+ },{
2042
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 8),
2043
+ new SimpleInstruction(InstructionConstants.OP_ISHR),
2044
+ new SimpleInstruction(InstructionConstants.OP_SIPUSH, 0xff),
2045
+ new SimpleInstruction(InstructionConstants.OP_IAND),
2046
+ },
2047
+ },
2048
+ { // (... & 0x0000ff00) >>> 8 = (... >>> 8) & 0xff
2049
+ {
2050
+ new ConstantInstruction(InstructionConstants.OP_LDC, I_0x0000ff00),
2051
+ new SimpleInstruction(InstructionConstants.OP_IAND),
2052
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 8),
2053
+ new SimpleInstruction(InstructionConstants.OP_IUSHR),
2054
+ },{
2055
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 8),
2056
+ new SimpleInstruction(InstructionConstants.OP_IUSHR),
2057
+ new SimpleInstruction(InstructionConstants.OP_SIPUSH, 0xff),
2058
+ new SimpleInstruction(InstructionConstants.OP_IAND),
2059
+ },
2060
+ },
2061
+ { // (... & 0x00ff0000) >> 16 = (... >> 16) & 0xff
2062
+ {
2063
+ new ConstantInstruction(InstructionConstants.OP_LDC, I_0x00ff0000),
2064
+ new SimpleInstruction(InstructionConstants.OP_IAND),
2065
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 16),
2066
+ new SimpleInstruction(InstructionConstants.OP_ISHR),
2067
+ },{
2068
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 16),
2069
+ new SimpleInstruction(InstructionConstants.OP_ISHR),
2070
+ new SimpleInstruction(InstructionConstants.OP_SIPUSH, 0xff),
2071
+ new SimpleInstruction(InstructionConstants.OP_IAND),
2072
+ },
2073
+ },
2074
+ { // (... & 0x00ff0000) >>> 16 = (... >>> 16) & 0xff
2075
+ {
2076
+ new ConstantInstruction(InstructionConstants.OP_LDC, I_0x00ff0000),
2077
+ new SimpleInstruction(InstructionConstants.OP_IAND),
2078
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 16),
2079
+ new SimpleInstruction(InstructionConstants.OP_IUSHR),
2080
+ },{
2081
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 16),
2082
+ new SimpleInstruction(InstructionConstants.OP_IUSHR),
2083
+ new SimpleInstruction(InstructionConstants.OP_SIPUSH, 0xff),
2084
+ new SimpleInstruction(InstructionConstants.OP_IAND),
2085
+ },
2086
+ },
2087
+ { // (... & 0xff000000) >> 24 = ... >> 24
2088
+ {
2089
+ new ConstantInstruction(InstructionConstants.OP_LDC, I_0xff000000),
2090
+ new SimpleInstruction(InstructionConstants.OP_IAND),
2091
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 24),
2092
+ new SimpleInstruction(InstructionConstants.OP_ISHR),
2093
+ },{
2094
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 24),
2095
+ new SimpleInstruction(InstructionConstants.OP_ISHR),
2096
+ },
2097
+ },
2098
+ { // (... & 0xffff0000) >> 16 = ... >> 16
2099
+ {
2100
+ new ConstantInstruction(InstructionConstants.OP_LDC, I_0xffff0000),
2101
+ new SimpleInstruction(InstructionConstants.OP_IAND),
2102
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 16),
2103
+ new SimpleInstruction(InstructionConstants.OP_ISHR),
2104
+ },{
2105
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 16),
2106
+ new SimpleInstruction(InstructionConstants.OP_ISHR),
2107
+ },
2108
+ },
2109
+ { // (... & 0xffff0000) >>> 16 = ... >>> 16
2110
+ {
2111
+ new ConstantInstruction(InstructionConstants.OP_LDC, I_0xffff0000),
2112
+ new SimpleInstruction(InstructionConstants.OP_IAND),
2113
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 16),
2114
+ new SimpleInstruction(InstructionConstants.OP_IUSHR),
2115
+ },{
2116
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 16),
2117
+ new SimpleInstruction(InstructionConstants.OP_IUSHR),
2118
+ },
2119
+ },
2120
+ { // (... >> 24) & 0xff = ... >>> 24
2121
+ {
2122
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 24),
2123
+ new SimpleInstruction(InstructionConstants.OP_ISHR),
2124
+ new SimpleInstruction(InstructionConstants.OP_SIPUSH, 0xff),
2125
+ new SimpleInstruction(InstructionConstants.OP_IAND),
2126
+ },{
2127
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 24),
2128
+ new SimpleInstruction(InstructionConstants.OP_IUSHR),
2129
+ },
2130
+ },
2131
+ { // (... >>> 24) & 0xff = ... >>> 24
2132
+ {
2133
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 24),
2134
+ new SimpleInstruction(InstructionConstants.OP_IUSHR),
2135
+ new SimpleInstruction(InstructionConstants.OP_SIPUSH, 0xff),
2136
+ new SimpleInstruction(InstructionConstants.OP_IAND),
2137
+ },{
2138
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 24),
2139
+ new SimpleInstruction(InstructionConstants.OP_IUSHR),
2140
+ },
2141
+ },
2142
+ { // (byte)(... & 0x000000ff) = (byte)...
2143
+ {
2144
+ new SimpleInstruction(InstructionConstants.OP_SIPUSH, 0xff),
2145
+ new SimpleInstruction(InstructionConstants.OP_IAND),
2146
+ new SimpleInstruction(InstructionConstants.OP_I2B),
2147
+ },{
2148
+ new SimpleInstruction(InstructionConstants.OP_I2B),
2149
+ },
2150
+ },
2151
+ { // (char)(... & 0x0000ffff) = (char)...
2152
+ {
2153
+ new ConstantInstruction(InstructionConstants.OP_LDC, I_0x0000ffff),
2154
+ new SimpleInstruction(InstructionConstants.OP_IAND),
2155
+ new SimpleInstruction(InstructionConstants.OP_I2C),
2156
+ },{
2157
+ new SimpleInstruction(InstructionConstants.OP_I2C),
2158
+ },
2159
+ },
2160
+ { // (short)(... & 0x0000ffff) = (short)...
2161
+ {
2162
+ new ConstantInstruction(InstructionConstants.OP_LDC, I_0x0000ffff),
2163
+ new SimpleInstruction(InstructionConstants.OP_IAND),
2164
+ new SimpleInstruction(InstructionConstants.OP_I2S),
2165
+ },{
2166
+ new SimpleInstruction(InstructionConstants.OP_I2S),
2167
+ },
2168
+ },
2169
+ { // (byte)(... >> 24) = ... >> 24
2170
+ {
2171
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 24),
2172
+ new SimpleInstruction(InstructionConstants.OP_ISHR),
2173
+ new SimpleInstruction(InstructionConstants.OP_I2B),
2174
+ },{
2175
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 24),
2176
+ new SimpleInstruction(InstructionConstants.OP_ISHR),
2177
+ },
2178
+ },
2179
+ { // (byte)(... >>> 24) = ... >> 24
2180
+ {
2181
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 24),
2182
+ new SimpleInstruction(InstructionConstants.OP_IUSHR),
2183
+ new SimpleInstruction(InstructionConstants.OP_I2B),
2184
+ },{
2185
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 24),
2186
+ new SimpleInstruction(InstructionConstants.OP_ISHR),
2187
+ },
2188
+ },
2189
+ { // (char)(... >> 16) = ... >>> 16
2190
+ {
2191
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 16),
2192
+ new SimpleInstruction(InstructionConstants.OP_ISHR),
2193
+ new SimpleInstruction(InstructionConstants.OP_I2C),
2194
+ },{
2195
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 16),
2196
+ new SimpleInstruction(InstructionConstants.OP_IUSHR),
2197
+ },
2198
+ },
2199
+ { // (char)(... >>> 16) = ... >>> 16
2200
+ {
2201
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 16),
2202
+ new SimpleInstruction(InstructionConstants.OP_IUSHR),
2203
+ new SimpleInstruction(InstructionConstants.OP_I2C),
2204
+ },{
2205
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 16),
2206
+ new SimpleInstruction(InstructionConstants.OP_IUSHR),
2207
+ },
2208
+ },
2209
+ { // (short)(... >> 16) = ... >> 16
2210
+ {
2211
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 16),
2212
+ new SimpleInstruction(InstructionConstants.OP_ISHR),
2213
+ new SimpleInstruction(InstructionConstants.OP_I2S),
2214
+ },{
2215
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 16),
2216
+ new SimpleInstruction(InstructionConstants.OP_ISHR),
2217
+ },
2218
+ },
2219
+ { // (short)(... >>> 16) = ... >> 16
2220
+ {
2221
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 16),
2222
+ new SimpleInstruction(InstructionConstants.OP_IUSHR),
2223
+ new SimpleInstruction(InstructionConstants.OP_I2S),
2224
+ },{
2225
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 16),
2226
+ new SimpleInstruction(InstructionConstants.OP_ISHR),
2227
+ },
2228
+ },
2229
+ { // ... << 24 >> 24 = (byte)...
2230
+ {
2231
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 24),
2232
+ new SimpleInstruction(InstructionConstants.OP_ISHL),
2233
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 24),
2234
+ new SimpleInstruction(InstructionConstants.OP_ISHR),
2235
+ },{
2236
+ new SimpleInstruction(InstructionConstants.OP_I2B),
2237
+ },
2238
+ },
2239
+ { // ... << 16 >>> 16 = (char)...
2240
+ {
2241
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 16),
2242
+ new SimpleInstruction(InstructionConstants.OP_ISHL),
2243
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 16),
2244
+ new SimpleInstruction(InstructionConstants.OP_IUSHR),
2245
+ },{
2246
+ new SimpleInstruction(InstructionConstants.OP_I2C),
2247
+ },
2248
+ },
2249
+ { // ... << 16 >> 16 = (short)...
2250
+ {
2251
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 16),
2252
+ new SimpleInstruction(InstructionConstants.OP_ISHL),
2253
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 16),
2254
+ new SimpleInstruction(InstructionConstants.OP_ISHR),
2255
+ },{
2256
+ new SimpleInstruction(InstructionConstants.OP_I2S),
2257
+ },
2258
+ },
2259
+ { // ... << 32 >> 32 = (long)(int)...
2260
+ {
2261
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 32),
2262
+ new SimpleInstruction(InstructionConstants.OP_LSHL),
2263
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 32),
2264
+ new SimpleInstruction(InstructionConstants.OP_LSHR),
2265
+ },{
2266
+ new SimpleInstruction(InstructionConstants.OP_L2I),
2267
+ new SimpleInstruction(InstructionConstants.OP_I2L),
2268
+ },
2269
+ },
2270
+ { // (int)(... & 0x00000000ffffffffL) = (int)...
2271
+ {
2272
+ new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_0x00000000ffffffff),
2273
+ new SimpleInstruction(InstructionConstants.OP_LAND),
2274
+ new SimpleInstruction(InstructionConstants.OP_L2I),
2275
+ },{
2276
+ new SimpleInstruction(InstructionConstants.OP_L2I),
2277
+ },
2278
+ },
2279
+ { // (... & 0xffffffff00000000L) >> 32 = ... >> 32
2280
+ {
2281
+ new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_0xffffffff00000000),
2282
+ new SimpleInstruction(InstructionConstants.OP_LAND),
2283
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 32),
2284
+ new SimpleInstruction(InstructionConstants.OP_LSHR),
2285
+ },{
2286
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 32),
2287
+ new SimpleInstruction(InstructionConstants.OP_LSHR),
2288
+ },
2289
+ },
2290
+ { // (... & 0xffffffff00000000L) >>> 32 = ... >>> 32
2291
+ {
2292
+ new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_0xffffffff00000000),
2293
+ new SimpleInstruction(InstructionConstants.OP_LAND),
2294
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 32),
2295
+ new SimpleInstruction(InstructionConstants.OP_LUSHR),
2296
+ },{
2297
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, 32),
2298
+ new SimpleInstruction(InstructionConstants.OP_LUSHR),
2299
+ },
2300
+ },
2301
+ { // ... += 0 = nothing
2302
+ {
2303
+ new VariableInstruction(InstructionConstants.OP_IINC, X, 0),
2304
+ },{
2305
+ // Nothing.
2306
+ },
2307
+ },
2308
+ };
2309
+
2310
+ public static final Instruction[][][] FIELD = new Instruction[][][]
2311
+ {
2312
+ { // getfield/putfield = nothing
2313
+ {
2314
+ new VariableInstruction(InstructionConstants.OP_ALOAD, X),
2315
+ new VariableInstruction(InstructionConstants.OP_ALOAD, X),
2316
+ new ConstantInstruction(InstructionConstants.OP_GETFIELD, Y),
2317
+ new ConstantInstruction(InstructionConstants.OP_PUTFIELD, Y),
2318
+ },{
2319
+ // Nothing.
2320
+ },
2321
+ },
2322
+ // { // putfield_L/putfield_L = pop2_x1/putfield
2323
+ // {
2324
+ // new VariableInstruction(InstructionConstants.OP_ALOAD, X),
2325
+ // // ...
2326
+ // new ConstantInstruction(InstructionConstants.OP_PUTFIELD, FIELD_L),
2327
+ // new VariableInstruction(InstructionConstants.OP_ALOAD, X),
2328
+ // // ...
2329
+ // new ConstantInstruction(InstructionConstants.OP_PUTFIELD, FIELD_L),
2330
+ // },{
2331
+ // new VariableInstruction(InstructionConstants.OP_ALOAD, X),
2332
+ // // ...
2333
+ // new SimpleInstruction(InstructionConstants.OP_POP2),
2334
+ // // ...
2335
+ // new ConstantInstruction(InstructionConstants.OP_PUTFIELD, FIELD_L),
2336
+ // },
2337
+ // },
2338
+ // { // putfield_D/putfield_D = pop2_x1/putfield
2339
+ // {
2340
+ // new VariableInstruction(InstructionConstants.OP_ALOAD, X),
2341
+ // // ...
2342
+ // new ConstantInstruction(InstructionConstants.OP_PUTFIELD, FIELD_D),
2343
+ // new VariableInstruction(InstructionConstants.OP_ALOAD, X),
2344
+ // // ...
2345
+ // new ConstantInstruction(InstructionConstants.OP_PUTFIELD, FIELD_D),
2346
+ // },{
2347
+ // new VariableInstruction(InstructionConstants.OP_ALOAD, X),
2348
+ // // ...
2349
+ // new SimpleInstruction(InstructionConstants.OP_POP2),
2350
+ // // ...
2351
+ // new ConstantInstruction(InstructionConstants.OP_PUTFIELD, FIELD_D),
2352
+ // },
2353
+ // },
2354
+ // { // putfield/putfield = pop_x1/putfield
2355
+ // {
2356
+ // new VariableInstruction(InstructionConstants.OP_ALOAD, X),
2357
+ // // ...
2358
+ // new ConstantInstruction(InstructionConstants.OP_PUTFIELD, Y),
2359
+ // new VariableInstruction(InstructionConstants.OP_ALOAD, X),
2360
+ // // ...
2361
+ // new ConstantInstruction(InstructionConstants.OP_PUTFIELD, Y),
2362
+ // },{
2363
+ // new VariableInstruction(InstructionConstants.OP_ALOAD, X),
2364
+ // // ...
2365
+ // new SimpleInstruction(InstructionConstants.OP_POP),
2366
+ // // ...
2367
+ // new ConstantInstruction(InstructionConstants.OP_PUTFIELD, Y),
2368
+ // },
2369
+ // },
2370
+ // { // putfield_L/getfield_L = dup2_x1/putfield
2371
+ // {
2372
+ // new VariableInstruction(InstructionConstants.OP_ALOAD, X),
2373
+ // // ...
2374
+ // new ConstantInstruction(InstructionConstants.OP_PUTFIELD, FIELD_L),
2375
+ // new VariableInstruction(InstructionConstants.OP_ALOAD, X),
2376
+ // new ConstantInstruction(InstructionConstants.OP_GETFIELD, FIELD_L),
2377
+ // },{
2378
+ // new VariableInstruction(InstructionConstants.OP_ALOAD, X),
2379
+ // // ...
2380
+ // new SimpleInstruction(InstructionConstants.OP_DUP2_X1),
2381
+ // new ConstantInstruction(InstructionConstants.OP_PUTFIELD, FIELD_L),
2382
+ // },
2383
+ // },
2384
+ // { // putfield_D/getfield_D = dup2_x1/putfield
2385
+ // {
2386
+ // new VariableInstruction(InstructionConstants.OP_ALOAD, X),
2387
+ // // ...
2388
+ // new ConstantInstruction(InstructionConstants.OP_PUTFIELD, FIELD_D),
2389
+ // new VariableInstruction(InstructionConstants.OP_ALOAD, X),
2390
+ // new ConstantInstruction(InstructionConstants.OP_GETFIELD, FIELD_D),
2391
+ // },{
2392
+ // new VariableInstruction(InstructionConstants.OP_ALOAD, X),
2393
+ // // ...
2394
+ // new SimpleInstruction(InstructionConstants.OP_DUP2_X1),
2395
+ // new ConstantInstruction(InstructionConstants.OP_PUTFIELD, FIELD_D),
2396
+ // },
2397
+ // },
2398
+ // { // putfield/getfield = dup_x1/putfield
2399
+ // {
2400
+ // new VariableInstruction(InstructionConstants.OP_ALOAD, X),
2401
+ // // ...
2402
+ // new ConstantInstruction(InstructionConstants.OP_PUTFIELD, Y),
2403
+ // new VariableInstruction(InstructionConstants.OP_ALOAD, X),
2404
+ // new ConstantInstruction(InstructionConstants.OP_GETFIELD, Y),
2405
+ // },{
2406
+ // new VariableInstruction(InstructionConstants.OP_ALOAD, X),
2407
+ // // ...
2408
+ // new SimpleInstruction(InstructionConstants.OP_DUP_X1),
2409
+ // new ConstantInstruction(InstructionConstants.OP_PUTFIELD, Y),
2410
+ // },
2411
+ // },
2412
+ { // getstatic/putstatic = nothing
2413
+ {
2414
+ new ConstantInstruction(InstructionConstants.OP_GETSTATIC, X),
2415
+ new ConstantInstruction(InstructionConstants.OP_PUTSTATIC, X),
2416
+ },{
2417
+ // Nothing.
2418
+ },
2419
+ },
2420
+ { // putstatic_L/putstatic_L = pop2/putstatic
2421
+ {
2422
+ new ConstantInstruction(InstructionConstants.OP_PUTSTATIC, FIELD_L),
2423
+ new ConstantInstruction(InstructionConstants.OP_PUTSTATIC, FIELD_L),
2424
+ },{
2425
+ new SimpleInstruction(InstructionConstants.OP_POP2),
2426
+ new ConstantInstruction(InstructionConstants.OP_PUTSTATIC, FIELD_L),
2427
+ },
2428
+ },
2429
+ { // putstatic_D/putstatic_D = pop2/putstatic
2430
+ {
2431
+ new ConstantInstruction(InstructionConstants.OP_PUTSTATIC, FIELD_D),
2432
+ new ConstantInstruction(InstructionConstants.OP_PUTSTATIC, FIELD_D),
2433
+ },{
2434
+ new SimpleInstruction(InstructionConstants.OP_POP2),
2435
+ new ConstantInstruction(InstructionConstants.OP_PUTSTATIC, FIELD_D),
2436
+ },
2437
+ },
2438
+ { // putstatic/putstatic = pop/putstatic
2439
+ {
2440
+ new ConstantInstruction(InstructionConstants.OP_PUTSTATIC, X),
2441
+ new ConstantInstruction(InstructionConstants.OP_PUTSTATIC, X),
2442
+ },{
2443
+ new SimpleInstruction(InstructionConstants.OP_POP),
2444
+ new ConstantInstruction(InstructionConstants.OP_PUTSTATIC, X),
2445
+ },
2446
+ },
2447
+ { // putstatic_L/getstatic_L = dup2/putstatic
2448
+ {
2449
+ new ConstantInstruction(InstructionConstants.OP_PUTSTATIC, FIELD_L),
2450
+ new ConstantInstruction(InstructionConstants.OP_GETSTATIC, FIELD_L),
2451
+ },{
2452
+ new SimpleInstruction(InstructionConstants.OP_DUP2),
2453
+ new ConstantInstruction(InstructionConstants.OP_PUTSTATIC, FIELD_L),
2454
+ },
2455
+ },
2456
+ { // putstatic_D/getstatic_D = dup2/putstatic
2457
+ {
2458
+ new ConstantInstruction(InstructionConstants.OP_PUTSTATIC, FIELD_D),
2459
+ new ConstantInstruction(InstructionConstants.OP_GETSTATIC, FIELD_D),
2460
+ },{
2461
+ new SimpleInstruction(InstructionConstants.OP_DUP2),
2462
+ new ConstantInstruction(InstructionConstants.OP_PUTSTATIC, FIELD_D),
2463
+ },
2464
+ },
2465
+ { // putstatic/getstatic = dup/putstatic
2466
+ {
2467
+ new ConstantInstruction(InstructionConstants.OP_PUTSTATIC, X),
2468
+ new ConstantInstruction(InstructionConstants.OP_GETSTATIC, X),
2469
+ },{
2470
+ new SimpleInstruction(InstructionConstants.OP_DUP),
2471
+ new ConstantInstruction(InstructionConstants.OP_PUTSTATIC, X),
2472
+ },
2473
+ },
2474
+ };
2475
+
2476
+ public static final Instruction[][][] CAST = new Instruction[][][]
2477
+ {
2478
+ { // (byte)(byte)... = (byte)...
2479
+ {
2480
+ new SimpleInstruction(InstructionConstants.OP_I2B),
2481
+ new SimpleInstruction(InstructionConstants.OP_I2B),
2482
+ },{
2483
+ new SimpleInstruction(InstructionConstants.OP_I2B),
2484
+ },
2485
+ },
2486
+ { // (byte)(char)... = (byte)...
2487
+ {
2488
+ new SimpleInstruction(InstructionConstants.OP_I2C),
2489
+ new SimpleInstruction(InstructionConstants.OP_I2B),
2490
+ },{
2491
+ new SimpleInstruction(InstructionConstants.OP_I2B),
2492
+ },
2493
+ },
2494
+ { // (byte)(short)... = (byte)...
2495
+ {
2496
+ new SimpleInstruction(InstructionConstants.OP_I2S),
2497
+ new SimpleInstruction(InstructionConstants.OP_I2B),
2498
+ },{
2499
+ new SimpleInstruction(InstructionConstants.OP_I2B),
2500
+ },
2501
+ },
2502
+ { // (char)(char)... = (char)...
2503
+ {
2504
+ new SimpleInstruction(InstructionConstants.OP_I2C),
2505
+ new SimpleInstruction(InstructionConstants.OP_I2C),
2506
+ },{
2507
+ new SimpleInstruction(InstructionConstants.OP_I2C),
2508
+ },
2509
+ },
2510
+ { // (char)(short)... = (char)...
2511
+ {
2512
+ new SimpleInstruction(InstructionConstants.OP_I2S),
2513
+ new SimpleInstruction(InstructionConstants.OP_I2C),
2514
+ },{
2515
+ new SimpleInstruction(InstructionConstants.OP_I2C),
2516
+ },
2517
+ },
2518
+ { // (short)(byte)... = (byte)...
2519
+ {
2520
+ new SimpleInstruction(InstructionConstants.OP_I2B),
2521
+ new SimpleInstruction(InstructionConstants.OP_I2S),
2522
+ },{
2523
+ new SimpleInstruction(InstructionConstants.OP_I2B),
2524
+ },
2525
+ },
2526
+ { // (short)(char)... = (short)...
2527
+ {
2528
+ new SimpleInstruction(InstructionConstants.OP_I2C),
2529
+ new SimpleInstruction(InstructionConstants.OP_I2S),
2530
+ },{
2531
+ new SimpleInstruction(InstructionConstants.OP_I2S),
2532
+ },
2533
+ },
2534
+ { // (short)(short)... = (short)...
2535
+ {
2536
+ new SimpleInstruction(InstructionConstants.OP_I2S),
2537
+ new SimpleInstruction(InstructionConstants.OP_I2S),
2538
+ },{
2539
+ new SimpleInstruction(InstructionConstants.OP_I2S),
2540
+ },
2541
+ },
2542
+ { // (int)(long)... = ...
2543
+ {
2544
+ new SimpleInstruction(InstructionConstants.OP_I2L),
2545
+ new SimpleInstruction(InstructionConstants.OP_L2I),
2546
+ },{
2547
+ // Nothing.
2548
+ },
2549
+ },
2550
+ { // (X)(X)... = (X)...
2551
+ {
2552
+ new ConstantInstruction(InstructionConstants.OP_CHECKCAST, X),
2553
+ new ConstantInstruction(InstructionConstants.OP_CHECKCAST, X),
2554
+ },{
2555
+ new ConstantInstruction(InstructionConstants.OP_CHECKCAST, X),
2556
+ },
2557
+ },
2558
+ // Not handled correctly in all cases by VMs prior to Java 6...
2559
+ // { // (byte)bytes[...] = bytes[...]
2560
+ // {
2561
+ // new SimpleInstruction(InstructionConstants.OP_BALOAD),
2562
+ // new SimpleInstruction(InstructionConstants.OP_I2B),
2563
+ // },{
2564
+ // new SimpleInstruction(InstructionConstants.OP_BALOAD),
2565
+ // },
2566
+ // },
2567
+ // { // (short)bytes[...] = bytes[...]
2568
+ // {
2569
+ // new SimpleInstruction(InstructionConstants.OP_BALOAD),
2570
+ // new SimpleInstruction(InstructionConstants.OP_I2S),
2571
+ // },{
2572
+ // new SimpleInstruction(InstructionConstants.OP_BALOAD),
2573
+ // },
2574
+ // },
2575
+ // { // (char)chars[...] = chars[...]
2576
+ // {
2577
+ // new SimpleInstruction(InstructionConstants.OP_CALOAD),
2578
+ // new SimpleInstruction(InstructionConstants.OP_I2C),
2579
+ // },{
2580
+ // new SimpleInstruction(InstructionConstants.OP_CALOAD),
2581
+ // },
2582
+ // },
2583
+ // { // (short)shorts[...] = shorts[...]
2584
+ // {
2585
+ // new SimpleInstruction(InstructionConstants.OP_SALOAD),
2586
+ // new SimpleInstruction(InstructionConstants.OP_I2S),
2587
+ // },{
2588
+ // new SimpleInstruction(InstructionConstants.OP_SALOAD),
2589
+ // },
2590
+ // },
2591
+ // { // bytes[...] = (byte)... = bytes[...] = ...
2592
+ // {
2593
+ // new SimpleInstruction(InstructionConstants.OP_I2B),
2594
+ // new SimpleInstruction(InstructionConstants.OP_BASTORE),
2595
+ // },{
2596
+ // new SimpleInstruction(InstructionConstants.OP_BASTORE),
2597
+ // },
2598
+ // },
2599
+ // { // chars[...] = (char)... = chars[...] = ...
2600
+ // {
2601
+ // new SimpleInstruction(InstructionConstants.OP_I2C),
2602
+ // new SimpleInstruction(InstructionConstants.OP_CASTORE),
2603
+ // },{
2604
+ // new SimpleInstruction(InstructionConstants.OP_CASTORE),
2605
+ // },
2606
+ // },
2607
+ // { // shorts[...] = (short)... = shorts[...] = ...
2608
+ // {
2609
+ // new SimpleInstruction(InstructionConstants.OP_I2S),
2610
+ // new SimpleInstruction(InstructionConstants.OP_SASTORE),
2611
+ // },{
2612
+ // new SimpleInstruction(InstructionConstants.OP_SASTORE),
2613
+ // },
2614
+ // },
2615
+ };
2616
+
2617
+ public static final Instruction[][][] BRANCH = new Instruction[][][]
2618
+ {
2619
+ { // goto +3 = nothing
2620
+ {
2621
+ new BranchInstruction(InstructionConstants.OP_GOTO, 3),
2622
+ },{
2623
+ // Nothing.
2624
+ },
2625
+ },
2626
+ { // ifeq +3 = pop
2627
+ {
2628
+ new BranchInstruction(InstructionConstants.OP_IFEQ, 3),
2629
+ },{
2630
+ new SimpleInstruction(InstructionConstants.OP_POP),
2631
+ },
2632
+ },
2633
+ { // ifne +3 = pop
2634
+ {
2635
+ new BranchInstruction(InstructionConstants.OP_IFNE, 3),
2636
+ },{
2637
+ new SimpleInstruction(InstructionConstants.OP_POP),
2638
+ },
2639
+ },
2640
+ { // iflt +3 = pop
2641
+ {
2642
+ new BranchInstruction(InstructionConstants.OP_IFLT, 3),
2643
+ },{
2644
+ new SimpleInstruction(InstructionConstants.OP_POP),
2645
+ },
2646
+ },
2647
+ { // ifge +3 = pop
2648
+ {
2649
+ new BranchInstruction(InstructionConstants.OP_IFGE, 3),
2650
+ },{
2651
+ new SimpleInstruction(InstructionConstants.OP_POP),
2652
+ },
2653
+ },
2654
+ { // ifgt +3 = pop
2655
+ {
2656
+ new BranchInstruction(InstructionConstants.OP_IFGT, 3),
2657
+ },{
2658
+ new SimpleInstruction(InstructionConstants.OP_POP),
2659
+ },
2660
+ },
2661
+ { // ifle +3 = pop
2662
+ {
2663
+ new BranchInstruction(InstructionConstants.OP_IFLE, 3),
2664
+ },{
2665
+ new SimpleInstruction(InstructionConstants.OP_POP),
2666
+ },
2667
+ },
2668
+ { // ificmpeq +3 = pop2
2669
+ {
2670
+ new BranchInstruction(InstructionConstants.OP_IFICMPEQ, 3),
2671
+ },{
2672
+ new SimpleInstruction(InstructionConstants.OP_POP2),
2673
+ },
2674
+ },
2675
+ { // ificmpne +3 = pop2
2676
+ {
2677
+ new BranchInstruction(InstructionConstants.OP_IFICMPNE, 3),
2678
+ },{
2679
+ new SimpleInstruction(InstructionConstants.OP_POP2),
2680
+ },
2681
+ },
2682
+ { // ificmplt +3 = pop2
2683
+ {
2684
+ new BranchInstruction(InstructionConstants.OP_IFICMPLT, 3),
2685
+ },{
2686
+ new SimpleInstruction(InstructionConstants.OP_POP2),
2687
+ },
2688
+ },
2689
+ { // ificmpge +3 = pop2
2690
+ {
2691
+ new BranchInstruction(InstructionConstants.OP_IFICMPGE, 3),
2692
+ },{
2693
+ new SimpleInstruction(InstructionConstants.OP_POP2),
2694
+ },
2695
+ },
2696
+ { // ificmpgt +3 = pop2
2697
+ {
2698
+ new BranchInstruction(InstructionConstants.OP_IFICMPGT, 3),
2699
+ },{
2700
+ new SimpleInstruction(InstructionConstants.OP_POP2),
2701
+ },
2702
+ },
2703
+ { // ificmple +3 = pop2
2704
+ {
2705
+ new BranchInstruction(InstructionConstants.OP_IFICMPLE, 3),
2706
+ },{
2707
+ new SimpleInstruction(InstructionConstants.OP_POP2),
2708
+ },
2709
+ },
2710
+ { // ifacmpeq +3 = pop2
2711
+ {
2712
+ new BranchInstruction(InstructionConstants.OP_IFACMPEQ, 3),
2713
+ },{
2714
+ new SimpleInstruction(InstructionConstants.OP_POP2),
2715
+ },
2716
+ },
2717
+ { // ifacmpne +3 = pop2
2718
+ {
2719
+ new BranchInstruction(InstructionConstants.OP_IFACMPNE, 3),
2720
+ },{
2721
+ new SimpleInstruction(InstructionConstants.OP_POP2),
2722
+ },
2723
+ },
2724
+ { // ifnull +3 = pop
2725
+ {
2726
+ new BranchInstruction(InstructionConstants.OP_IFNULL, 3),
2727
+ },{
2728
+ new SimpleInstruction(InstructionConstants.OP_POP),
2729
+ },
2730
+ },
2731
+ { // ifnonnull +3 = pop
2732
+ {
2733
+ new BranchInstruction(InstructionConstants.OP_IFNONNULL, 3),
2734
+ },{
2735
+ new SimpleInstruction(InstructionConstants.OP_POP),
2736
+ },
2737
+ },
2738
+ { // if (... == 0) = ifeq
2739
+ {
2740
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0),
2741
+ new BranchInstruction(InstructionConstants.OP_IFICMPEQ, X),
2742
+ },{
2743
+ new BranchInstruction(InstructionConstants.OP_IFEQ, X),
2744
+ },
2745
+ },
2746
+ { // if (0 == i) = iload/ifeq
2747
+ {
2748
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0),
2749
+ new VariableInstruction(InstructionConstants.OP_ILOAD, Y),
2750
+ new BranchInstruction(InstructionConstants.OP_IFICMPEQ, X),
2751
+ },{
2752
+ new VariableInstruction(InstructionConstants.OP_ILOAD, Y),
2753
+ new BranchInstruction(InstructionConstants.OP_IFEQ, X),
2754
+ },
2755
+ },
2756
+ { // if (0 == i) = getstatic/ifeq
2757
+ {
2758
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0),
2759
+ new ConstantInstruction(InstructionConstants.OP_GETSTATIC, Y),
2760
+ new BranchInstruction(InstructionConstants.OP_IFICMPEQ, X),
2761
+ },{
2762
+ new ConstantInstruction(InstructionConstants.OP_GETSTATIC, Y),
2763
+ new BranchInstruction(InstructionConstants.OP_IFEQ, X),
2764
+ },
2765
+ },
2766
+ { // if (0 == i) = getfield/ifeq
2767
+ {
2768
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0),
2769
+ new VariableInstruction(InstructionConstants.OP_ALOAD, Y),
2770
+ new ConstantInstruction(InstructionConstants.OP_GETFIELD, Z),
2771
+ new BranchInstruction(InstructionConstants.OP_IFICMPEQ, X),
2772
+ },{
2773
+ new VariableInstruction(InstructionConstants.OP_ALOAD, Y),
2774
+ new ConstantInstruction(InstructionConstants.OP_GETFIELD, Z),
2775
+ new BranchInstruction(InstructionConstants.OP_IFEQ, X),
2776
+ },
2777
+ },
2778
+ { // if (... != 0) = ifne
2779
+ {
2780
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0),
2781
+ new BranchInstruction(InstructionConstants.OP_IFICMPNE, X),
2782
+ },{
2783
+ new BranchInstruction(InstructionConstants.OP_IFNE, X),
2784
+ },
2785
+ },
2786
+ { // if (0 != i) = iload/ifeq
2787
+ {
2788
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0),
2789
+ new VariableInstruction(InstructionConstants.OP_ILOAD, Y),
2790
+ new BranchInstruction(InstructionConstants.OP_IFICMPNE, X),
2791
+ },{
2792
+ new VariableInstruction(InstructionConstants.OP_ILOAD, Y),
2793
+ new BranchInstruction(InstructionConstants.OP_IFNE, X),
2794
+ },
2795
+ },
2796
+ { // if (0 != i) = getstatic/ifeq
2797
+ {
2798
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0),
2799
+ new ConstantInstruction(InstructionConstants.OP_GETSTATIC, Y),
2800
+ new BranchInstruction(InstructionConstants.OP_IFICMPNE, X),
2801
+ },{
2802
+ new ConstantInstruction(InstructionConstants.OP_GETSTATIC, Y),
2803
+ new BranchInstruction(InstructionConstants.OP_IFNE, X),
2804
+ },
2805
+ },
2806
+ { // if (0 != i) = getfield/ifeq
2807
+ {
2808
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0),
2809
+ new VariableInstruction(InstructionConstants.OP_ALOAD, Y),
2810
+ new ConstantInstruction(InstructionConstants.OP_GETFIELD, Z),
2811
+ new BranchInstruction(InstructionConstants.OP_IFICMPNE, X),
2812
+ },{
2813
+ new VariableInstruction(InstructionConstants.OP_ALOAD, Y),
2814
+ new ConstantInstruction(InstructionConstants.OP_GETFIELD, Z),
2815
+ new BranchInstruction(InstructionConstants.OP_IFNE, X),
2816
+ },
2817
+ },
2818
+ { // if (... < 0) = iflt
2819
+ {
2820
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0),
2821
+ new BranchInstruction(InstructionConstants.OP_IFICMPLT, X),
2822
+ },{
2823
+ new BranchInstruction(InstructionConstants.OP_IFLT, X),
2824
+ },
2825
+ },
2826
+ { // if (... < 1) = ifle
2827
+ {
2828
+ new SimpleInstruction(InstructionConstants.OP_ICONST_1),
2829
+ new BranchInstruction(InstructionConstants.OP_IFICMPLT, X),
2830
+ },{
2831
+ new BranchInstruction(InstructionConstants.OP_IFLE, X),
2832
+ },
2833
+ },
2834
+ { // if (0 > i) = iload/iflt
2835
+ {
2836
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0),
2837
+ new VariableInstruction(InstructionConstants.OP_ILOAD, Y),
2838
+ new BranchInstruction(InstructionConstants.OP_IFICMPGT, X),
2839
+ },{
2840
+ new VariableInstruction(InstructionConstants.OP_ILOAD, Y),
2841
+ new BranchInstruction(InstructionConstants.OP_IFLT, X),
2842
+ },
2843
+ },
2844
+ { // if (1 > i) = iload/ifle
2845
+ {
2846
+ new SimpleInstruction(InstructionConstants.OP_ICONST_1),
2847
+ new VariableInstruction(InstructionConstants.OP_ILOAD, Y),
2848
+ new BranchInstruction(InstructionConstants.OP_IFICMPGT, X),
2849
+ },{
2850
+ new VariableInstruction(InstructionConstants.OP_ILOAD, Y),
2851
+ new BranchInstruction(InstructionConstants.OP_IFLE, X),
2852
+ },
2853
+ },
2854
+ { // if (0 > i) = getstatic/iflt
2855
+ {
2856
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0),
2857
+ new ConstantInstruction(InstructionConstants.OP_GETSTATIC, Y),
2858
+ new BranchInstruction(InstructionConstants.OP_IFICMPGT, X),
2859
+ },{
2860
+ new ConstantInstruction(InstructionConstants.OP_GETSTATIC, Y),
2861
+ new BranchInstruction(InstructionConstants.OP_IFLT, X),
2862
+ },
2863
+ },
2864
+ { // if (1 > i) = getstatic/ifle
2865
+ {
2866
+ new SimpleInstruction(InstructionConstants.OP_ICONST_1),
2867
+ new ConstantInstruction(InstructionConstants.OP_GETSTATIC, Y),
2868
+ new BranchInstruction(InstructionConstants.OP_IFICMPGT, X),
2869
+ },{
2870
+ new ConstantInstruction(InstructionConstants.OP_GETSTATIC, Y),
2871
+ new BranchInstruction(InstructionConstants.OP_IFLE, X),
2872
+ },
2873
+ },
2874
+ { // if (0 > i) = getfield/iflt
2875
+ {
2876
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0),
2877
+ new VariableInstruction(InstructionConstants.OP_ALOAD, Y),
2878
+ new ConstantInstruction(InstructionConstants.OP_GETFIELD, Z),
2879
+ new BranchInstruction(InstructionConstants.OP_IFICMPGT, X),
2880
+ },{
2881
+ new VariableInstruction(InstructionConstants.OP_ALOAD, Y),
2882
+ new ConstantInstruction(InstructionConstants.OP_GETFIELD, Z),
2883
+ new BranchInstruction(InstructionConstants.OP_IFLT, X),
2884
+ },
2885
+ },
2886
+ { // if (1 > i) = getfield/ifle
2887
+ {
2888
+ new SimpleInstruction(InstructionConstants.OP_ICONST_1),
2889
+ new VariableInstruction(InstructionConstants.OP_ALOAD, Y),
2890
+ new ConstantInstruction(InstructionConstants.OP_GETFIELD, Z),
2891
+ new BranchInstruction(InstructionConstants.OP_IFICMPGT, X),
2892
+ },{
2893
+ new VariableInstruction(InstructionConstants.OP_ALOAD, Y),
2894
+ new ConstantInstruction(InstructionConstants.OP_GETFIELD, Z),
2895
+ new BranchInstruction(InstructionConstants.OP_IFLE, X),
2896
+ },
2897
+ },
2898
+ { // if (... >= 0) = ifge
2899
+ {
2900
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0),
2901
+ new BranchInstruction(InstructionConstants.OP_IFICMPGE, X),
2902
+ },{
2903
+ new BranchInstruction(InstructionConstants.OP_IFGE, X),
2904
+ },
2905
+ },
2906
+ { // if (... >= 1) = ifgt
2907
+ {
2908
+ new SimpleInstruction(InstructionConstants.OP_ICONST_1),
2909
+ new BranchInstruction(InstructionConstants.OP_IFICMPGE, X),
2910
+ },{
2911
+ new BranchInstruction(InstructionConstants.OP_IFGT, X),
2912
+ },
2913
+ },
2914
+ { // if (0 <= i) = iload/ifge
2915
+ {
2916
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0),
2917
+ new VariableInstruction(InstructionConstants.OP_ILOAD, Y),
2918
+ new BranchInstruction(InstructionConstants.OP_IFICMPLE, X),
2919
+ },{
2920
+ new VariableInstruction(InstructionConstants.OP_ILOAD, Y),
2921
+ new BranchInstruction(InstructionConstants.OP_IFGE, X),
2922
+ },
2923
+ },
2924
+ { // if (1 <= i) = iload/ifgt
2925
+ {
2926
+ new SimpleInstruction(InstructionConstants.OP_ICONST_1),
2927
+ new VariableInstruction(InstructionConstants.OP_ILOAD, Y),
2928
+ new BranchInstruction(InstructionConstants.OP_IFICMPLE, X),
2929
+ },{
2930
+ new VariableInstruction(InstructionConstants.OP_ILOAD, Y),
2931
+ new BranchInstruction(InstructionConstants.OP_IFGT, X),
2932
+ },
2933
+ },
2934
+ { // if (0 <= i) = getstatic/ifge
2935
+ {
2936
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0),
2937
+ new ConstantInstruction(InstructionConstants.OP_GETSTATIC, Y),
2938
+ new BranchInstruction(InstructionConstants.OP_IFICMPLE, X),
2939
+ },{
2940
+ new ConstantInstruction(InstructionConstants.OP_GETSTATIC, Y),
2941
+ new BranchInstruction(InstructionConstants.OP_IFGE, X),
2942
+ },
2943
+ },
2944
+ { // if (1 <= i) = getstatic/ifgt
2945
+ {
2946
+ new SimpleInstruction(InstructionConstants.OP_ICONST_1),
2947
+ new ConstantInstruction(InstructionConstants.OP_GETSTATIC, Y),
2948
+ new BranchInstruction(InstructionConstants.OP_IFICMPLE, X),
2949
+ },{
2950
+ new ConstantInstruction(InstructionConstants.OP_GETSTATIC, Y),
2951
+ new BranchInstruction(InstructionConstants.OP_IFGT, X),
2952
+ },
2953
+ },
2954
+ { // if (0 <= i) = getfield/ifge
2955
+ {
2956
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0),
2957
+ new VariableInstruction(InstructionConstants.OP_ALOAD, Y),
2958
+ new ConstantInstruction(InstructionConstants.OP_GETFIELD, Z),
2959
+ new BranchInstruction(InstructionConstants.OP_IFICMPLE, X),
2960
+ },{
2961
+ new VariableInstruction(InstructionConstants.OP_ALOAD, Y),
2962
+ new ConstantInstruction(InstructionConstants.OP_GETFIELD, Z),
2963
+ new BranchInstruction(InstructionConstants.OP_IFGE, X),
2964
+ },
2965
+ },
2966
+ { // if (1 <= i) = getfield/ifgt
2967
+ {
2968
+ new SimpleInstruction(InstructionConstants.OP_ICONST_1),
2969
+ new VariableInstruction(InstructionConstants.OP_ALOAD, Y),
2970
+ new ConstantInstruction(InstructionConstants.OP_GETFIELD, Z),
2971
+ new BranchInstruction(InstructionConstants.OP_IFICMPLE, X),
2972
+ },{
2973
+ new VariableInstruction(InstructionConstants.OP_ALOAD, Y),
2974
+ new ConstantInstruction(InstructionConstants.OP_GETFIELD, Z),
2975
+ new BranchInstruction(InstructionConstants.OP_IFGT, X),
2976
+ },
2977
+ },
2978
+ { // if (... > 0) = ifgt
2979
+ {
2980
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0),
2981
+ new BranchInstruction(InstructionConstants.OP_IFICMPGT, X),
2982
+ },{
2983
+ new BranchInstruction(InstructionConstants.OP_IFGT, X),
2984
+ },
2985
+ },
2986
+ { // if (... > -1) = ifge
2987
+ {
2988
+ new SimpleInstruction(InstructionConstants.OP_ICONST_M1),
2989
+ new BranchInstruction(InstructionConstants.OP_IFICMPGT, X),
2990
+ },{
2991
+ new BranchInstruction(InstructionConstants.OP_IFGE, X),
2992
+ },
2993
+ },
2994
+ { // if (0 < i) = iload/ifgt
2995
+ {
2996
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0),
2997
+ new VariableInstruction(InstructionConstants.OP_ILOAD, Y),
2998
+ new BranchInstruction(InstructionConstants.OP_IFICMPLT, X),
2999
+ },{
3000
+ new VariableInstruction(InstructionConstants.OP_ILOAD, Y),
3001
+ new BranchInstruction(InstructionConstants.OP_IFGT, X),
3002
+ },
3003
+ },
3004
+ { // if (-1 < i) = iload/ifge
3005
+ {
3006
+ new SimpleInstruction(InstructionConstants.OP_ICONST_M1),
3007
+ new VariableInstruction(InstructionConstants.OP_ILOAD, Y),
3008
+ new BranchInstruction(InstructionConstants.OP_IFICMPLT, X),
3009
+ },{
3010
+ new VariableInstruction(InstructionConstants.OP_ILOAD, Y),
3011
+ new BranchInstruction(InstructionConstants.OP_IFGE, X),
3012
+ },
3013
+ },
3014
+ { // if (0 < i) = getstatic/ifgt
3015
+ {
3016
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0),
3017
+ new ConstantInstruction(InstructionConstants.OP_GETSTATIC, Y),
3018
+ new BranchInstruction(InstructionConstants.OP_IFICMPLT, X),
3019
+ },{
3020
+ new ConstantInstruction(InstructionConstants.OP_GETSTATIC, Y),
3021
+ new BranchInstruction(InstructionConstants.OP_IFGT, X),
3022
+ },
3023
+ },
3024
+ { // if (-1 < i) = getstatic/ifge
3025
+ {
3026
+ new SimpleInstruction(InstructionConstants.OP_ICONST_M1),
3027
+ new ConstantInstruction(InstructionConstants.OP_GETSTATIC, Y),
3028
+ new BranchInstruction(InstructionConstants.OP_IFICMPLT, X),
3029
+ },{
3030
+ new ConstantInstruction(InstructionConstants.OP_GETSTATIC, Y),
3031
+ new BranchInstruction(InstructionConstants.OP_IFGE, X),
3032
+ },
3033
+ },
3034
+ { // if (0 < i) = getfield/ifgt
3035
+ {
3036
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0),
3037
+ new VariableInstruction(InstructionConstants.OP_ALOAD, Y),
3038
+ new ConstantInstruction(InstructionConstants.OP_GETFIELD, Z),
3039
+ new BranchInstruction(InstructionConstants.OP_IFICMPLT, X),
3040
+ },{
3041
+ new VariableInstruction(InstructionConstants.OP_ALOAD, Y),
3042
+ new ConstantInstruction(InstructionConstants.OP_GETFIELD, Z),
3043
+ new BranchInstruction(InstructionConstants.OP_IFGT, X),
3044
+ },
3045
+ },
3046
+ { // if (-1 < i) = getfield/ifge
3047
+ {
3048
+ new SimpleInstruction(InstructionConstants.OP_ICONST_M1),
3049
+ new VariableInstruction(InstructionConstants.OP_ALOAD, Y),
3050
+ new ConstantInstruction(InstructionConstants.OP_GETFIELD, Z),
3051
+ new BranchInstruction(InstructionConstants.OP_IFICMPLT, X),
3052
+ },{
3053
+ new VariableInstruction(InstructionConstants.OP_ALOAD, Y),
3054
+ new ConstantInstruction(InstructionConstants.OP_GETFIELD, Z),
3055
+ new BranchInstruction(InstructionConstants.OP_IFGE, X),
3056
+ },
3057
+ },
3058
+ { // if (... <= 0) = ifle
3059
+ {
3060
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0),
3061
+ new BranchInstruction(InstructionConstants.OP_IFICMPLE, X),
3062
+ },{
3063
+ new BranchInstruction(InstructionConstants.OP_IFLE, X),
3064
+ },
3065
+ },
3066
+ { // if (... <= -1) = iflt
3067
+ {
3068
+ new SimpleInstruction(InstructionConstants.OP_ICONST_M1),
3069
+ new BranchInstruction(InstructionConstants.OP_IFICMPLE, X),
3070
+ },{
3071
+ new BranchInstruction(InstructionConstants.OP_IFLT, X),
3072
+ },
3073
+ },
3074
+ { // if (0 >= i) = iload/ifle
3075
+ {
3076
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0),
3077
+ new VariableInstruction(InstructionConstants.OP_ILOAD, Y),
3078
+ new BranchInstruction(InstructionConstants.OP_IFICMPGE, X),
3079
+ },{
3080
+ new VariableInstruction(InstructionConstants.OP_ILOAD, Y),
3081
+ new BranchInstruction(InstructionConstants.OP_IFLE, X),
3082
+ },
3083
+ },
3084
+ { // if (-1 >= i) = iload/iflt
3085
+ {
3086
+ new SimpleInstruction(InstructionConstants.OP_ICONST_M1),
3087
+ new VariableInstruction(InstructionConstants.OP_ILOAD, Y),
3088
+ new BranchInstruction(InstructionConstants.OP_IFICMPGE, X),
3089
+ },{
3090
+ new VariableInstruction(InstructionConstants.OP_ILOAD, Y),
3091
+ new BranchInstruction(InstructionConstants.OP_IFLT, X),
3092
+ },
3093
+ },
3094
+ { // if (0 >= i) = getstatic/ifle
3095
+ {
3096
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0),
3097
+ new ConstantInstruction(InstructionConstants.OP_GETSTATIC, Y),
3098
+ new BranchInstruction(InstructionConstants.OP_IFICMPGE, X),
3099
+ },{
3100
+ new ConstantInstruction(InstructionConstants.OP_GETSTATIC, Y),
3101
+ new BranchInstruction(InstructionConstants.OP_IFLE, X),
3102
+ },
3103
+ },
3104
+ { // if (-1 >= i) = getstatic/iflt
3105
+ {
3106
+ new SimpleInstruction(InstructionConstants.OP_ICONST_M1),
3107
+ new ConstantInstruction(InstructionConstants.OP_GETSTATIC, Y),
3108
+ new BranchInstruction(InstructionConstants.OP_IFICMPGE, X),
3109
+ },{
3110
+ new ConstantInstruction(InstructionConstants.OP_GETSTATIC, Y),
3111
+ new BranchInstruction(InstructionConstants.OP_IFLT, X),
3112
+ },
3113
+ },
3114
+ { // if (0 >= i) = getfield/ifle
3115
+ {
3116
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0),
3117
+ new VariableInstruction(InstructionConstants.OP_ALOAD, Y),
3118
+ new ConstantInstruction(InstructionConstants.OP_GETFIELD, Z),
3119
+ new BranchInstruction(InstructionConstants.OP_IFICMPGE, X),
3120
+ },{
3121
+ new VariableInstruction(InstructionConstants.OP_ALOAD, Y),
3122
+ new ConstantInstruction(InstructionConstants.OP_GETFIELD, Z),
3123
+ new BranchInstruction(InstructionConstants.OP_IFLE, X),
3124
+ },
3125
+ },
3126
+ { // if (-1 >= i) = getfield/iflt
3127
+ {
3128
+ new SimpleInstruction(InstructionConstants.OP_ICONST_M1),
3129
+ new VariableInstruction(InstructionConstants.OP_ALOAD, Y),
3130
+ new ConstantInstruction(InstructionConstants.OP_GETFIELD, Z),
3131
+ new BranchInstruction(InstructionConstants.OP_IFICMPGE, X),
3132
+ },{
3133
+ new VariableInstruction(InstructionConstants.OP_ALOAD, Y),
3134
+ new ConstantInstruction(InstructionConstants.OP_GETFIELD, Z),
3135
+ new BranchInstruction(InstructionConstants.OP_IFLT, X),
3136
+ },
3137
+ },
3138
+ { // if (... == null) = ifnull
3139
+ {
3140
+ new SimpleInstruction(InstructionConstants.OP_ACONST_NULL),
3141
+ new BranchInstruction(InstructionConstants.OP_IFACMPEQ, X),
3142
+ },{
3143
+ new BranchInstruction(InstructionConstants.OP_IFNULL, X),
3144
+ },
3145
+ },
3146
+ { // if (null == a) = aload/ifnull
3147
+ {
3148
+ new SimpleInstruction(InstructionConstants.OP_ACONST_NULL),
3149
+ new VariableInstruction(InstructionConstants.OP_ALOAD, Y),
3150
+ new BranchInstruction(InstructionConstants.OP_IFACMPEQ, X),
3151
+ },{
3152
+ new VariableInstruction(InstructionConstants.OP_ALOAD, Y),
3153
+ new BranchInstruction(InstructionConstants.OP_IFNULL, X),
3154
+ },
3155
+ },
3156
+ { // if (null == a) = getstatic/ifnull
3157
+ {
3158
+ new SimpleInstruction(InstructionConstants.OP_ACONST_NULL),
3159
+ new ConstantInstruction(InstructionConstants.OP_GETSTATIC, Y),
3160
+ new BranchInstruction(InstructionConstants.OP_IFACMPEQ, X),
3161
+ },{
3162
+ new ConstantInstruction(InstructionConstants.OP_GETSTATIC, Y),
3163
+ new BranchInstruction(InstructionConstants.OP_IFNULL, X),
3164
+ },
3165
+ },
3166
+ { // if (null == a) = getfield/ifnull
3167
+ {
3168
+ new SimpleInstruction(InstructionConstants.OP_ACONST_NULL),
3169
+ new VariableInstruction(InstructionConstants.OP_ALOAD, Y),
3170
+ new ConstantInstruction(InstructionConstants.OP_GETFIELD, Z),
3171
+ new BranchInstruction(InstructionConstants.OP_IFACMPEQ, X),
3172
+ },{
3173
+ new VariableInstruction(InstructionConstants.OP_ALOAD, Y),
3174
+ new ConstantInstruction(InstructionConstants.OP_GETFIELD, Z),
3175
+ new BranchInstruction(InstructionConstants.OP_IFNULL, X),
3176
+ },
3177
+ },
3178
+ { // if (... != null) = ifnonnull
3179
+ {
3180
+ new SimpleInstruction(InstructionConstants.OP_ACONST_NULL),
3181
+ new BranchInstruction(InstructionConstants.OP_IFACMPNE, X),
3182
+ },{
3183
+ new BranchInstruction(InstructionConstants.OP_IFNONNULL, X),
3184
+ },
3185
+ },
3186
+ { // if (null != a) = aload/ifnonnull
3187
+ {
3188
+ new SimpleInstruction(InstructionConstants.OP_ACONST_NULL),
3189
+ new VariableInstruction(InstructionConstants.OP_ALOAD, Y),
3190
+ new BranchInstruction(InstructionConstants.OP_IFACMPNE, X),
3191
+ },{
3192
+ new VariableInstruction(InstructionConstants.OP_ALOAD, Y),
3193
+ new BranchInstruction(InstructionConstants.OP_IFNONNULL, X),
3194
+ },
3195
+ },
3196
+ { // if (null != a) = getstatic/ifnonnull
3197
+ {
3198
+ new SimpleInstruction(InstructionConstants.OP_ACONST_NULL),
3199
+ new ConstantInstruction(InstructionConstants.OP_GETSTATIC, Y),
3200
+ new BranchInstruction(InstructionConstants.OP_IFACMPNE, X),
3201
+ },{
3202
+ new ConstantInstruction(InstructionConstants.OP_GETSTATIC, Y),
3203
+ new BranchInstruction(InstructionConstants.OP_IFNONNULL, X),
3204
+ },
3205
+ },
3206
+ { // if (null != a) = getfield/ifnonnull
3207
+ {
3208
+ new SimpleInstruction(InstructionConstants.OP_ACONST_NULL),
3209
+ new VariableInstruction(InstructionConstants.OP_ALOAD, Y),
3210
+ new ConstantInstruction(InstructionConstants.OP_GETFIELD, Z),
3211
+ new BranchInstruction(InstructionConstants.OP_IFACMPNE, X),
3212
+ },{
3213
+ new VariableInstruction(InstructionConstants.OP_ALOAD, Y),
3214
+ new ConstantInstruction(InstructionConstants.OP_GETFIELD, Z),
3215
+ new BranchInstruction(InstructionConstants.OP_IFNONNULL, X),
3216
+ },
3217
+ },
3218
+ { // iconst_0/ifeq = goto
3219
+ {
3220
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0),
3221
+ new BranchInstruction(InstructionConstants.OP_IFEQ, X),
3222
+ },{
3223
+ new BranchInstruction(InstructionConstants.OP_GOTO, X),
3224
+ },
3225
+ },
3226
+ { // iconst/ifeq = nothing
3227
+ {
3228
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0, A),
3229
+ new BranchInstruction(InstructionConstants.OP_IFEQ, X),
3230
+ },{
3231
+ // Nothing.
3232
+ },
3233
+ },
3234
+ { // bipush/ifeq = nothing
3235
+ {
3236
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, A),
3237
+ new BranchInstruction(InstructionConstants.OP_IFEQ, X),
3238
+ },{
3239
+ // Nothing.
3240
+ },
3241
+ },
3242
+ { // sipush/ifeq = nothing
3243
+ {
3244
+ new SimpleInstruction(InstructionConstants.OP_SIPUSH, A),
3245
+ new BranchInstruction(InstructionConstants.OP_IFEQ, X),
3246
+ },{
3247
+ // Nothing.
3248
+ },
3249
+ },
3250
+ { // iconst_0/ifne = nothing
3251
+ {
3252
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0),
3253
+ new BranchInstruction(InstructionConstants.OP_IFNE, X),
3254
+ },{
3255
+ // Nothing.
3256
+ },
3257
+ },
3258
+ { // iconst/ifne = goto
3259
+ {
3260
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0, A),
3261
+ new BranchInstruction(InstructionConstants.OP_IFNE, X),
3262
+ },{
3263
+ new BranchInstruction(InstructionConstants.OP_GOTO, X),
3264
+ },
3265
+ },
3266
+ { // bipush/ifne = goto
3267
+ {
3268
+ new SimpleInstruction(InstructionConstants.OP_BIPUSH, A),
3269
+ new BranchInstruction(InstructionConstants.OP_IFNE, X),
3270
+ },{
3271
+ new BranchInstruction(InstructionConstants.OP_GOTO, X),
3272
+ },
3273
+ },
3274
+ { // sipush/ifne = goto
3275
+ {
3276
+ new SimpleInstruction(InstructionConstants.OP_SIPUSH, A),
3277
+ new BranchInstruction(InstructionConstants.OP_IFNE, X),
3278
+ },{
3279
+ new BranchInstruction(InstructionConstants.OP_GOTO, X),
3280
+ },
3281
+ },
3282
+ { // iconst_0/iflt = nothing
3283
+ {
3284
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0),
3285
+ new BranchInstruction(InstructionConstants.OP_IFLT, X),
3286
+ },{
3287
+ // Nothing.
3288
+ },
3289
+ },
3290
+ { // iconst_0/ifge = goto
3291
+ {
3292
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0),
3293
+ new BranchInstruction(InstructionConstants.OP_IFGE, X),
3294
+ },{
3295
+ new BranchInstruction(InstructionConstants.OP_GOTO, X),
3296
+ },
3297
+ },
3298
+ { // iconst_0/ifgt = nothing
3299
+ {
3300
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0),
3301
+ new BranchInstruction(InstructionConstants.OP_IFGT, X),
3302
+ },{
3303
+ // Nothing.
3304
+ },
3305
+ },
3306
+ { // iconst_0/ifle = goto
3307
+ {
3308
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0),
3309
+ new BranchInstruction(InstructionConstants.OP_IFLE, X),
3310
+ },{
3311
+ new BranchInstruction(InstructionConstants.OP_GOTO, X),
3312
+ },
3313
+ },
3314
+ { // aconst_null/ifnull = goto
3315
+ {
3316
+ new SimpleInstruction(InstructionConstants.OP_ACONST_NULL),
3317
+ new BranchInstruction(InstructionConstants.OP_IFNULL, X),
3318
+ },{
3319
+ new BranchInstruction(InstructionConstants.OP_GOTO, X),
3320
+ },
3321
+ },
3322
+ { // aconst_null/ifnonnul = nothing
3323
+ {
3324
+ new SimpleInstruction(InstructionConstants.OP_ACONST_NULL),
3325
+ new BranchInstruction(InstructionConstants.OP_IFNONNULL, X),
3326
+ },{
3327
+ // Nothing.
3328
+ },
3329
+ },
3330
+ { // ifeq/goto = ifne
3331
+ {
3332
+ new BranchInstruction(InstructionConstants.OP_IFEQ, 6),
3333
+ new BranchInstruction(InstructionConstants.OP_GOTO, X),
3334
+ },{
3335
+ new BranchInstruction(InstructionConstants.OP_IFNE, X),
3336
+ },
3337
+ },
3338
+ { // ifne/goto = ifeq
3339
+ {
3340
+ new BranchInstruction(InstructionConstants.OP_IFNE, 6),
3341
+ new BranchInstruction(InstructionConstants.OP_GOTO, X),
3342
+ },{
3343
+ new BranchInstruction(InstructionConstants.OP_IFEQ, X),
3344
+ },
3345
+ },
3346
+ { // iflt/goto = ifge
3347
+ {
3348
+ new BranchInstruction(InstructionConstants.OP_IFLT, 6),
3349
+ new BranchInstruction(InstructionConstants.OP_GOTO, X),
3350
+ },{
3351
+ new BranchInstruction(InstructionConstants.OP_IFGE, X),
3352
+ },
3353
+ },
3354
+ { // ifge/goto = iflt
3355
+ {
3356
+ new BranchInstruction(InstructionConstants.OP_IFGE, 6),
3357
+ new BranchInstruction(InstructionConstants.OP_GOTO, X),
3358
+ },{
3359
+ new BranchInstruction(InstructionConstants.OP_IFLT, X),
3360
+ },
3361
+ },
3362
+ { // ifgt/goto = ifle
3363
+ {
3364
+ new BranchInstruction(InstructionConstants.OP_IFGT, 6),
3365
+ new BranchInstruction(InstructionConstants.OP_GOTO, X),
3366
+ },{
3367
+ new BranchInstruction(InstructionConstants.OP_IFLE, X),
3368
+ },
3369
+ },
3370
+ { // ifle/goto = ifgt
3371
+ {
3372
+ new BranchInstruction(InstructionConstants.OP_IFLE, 6),
3373
+ new BranchInstruction(InstructionConstants.OP_GOTO, X),
3374
+ },{
3375
+ new BranchInstruction(InstructionConstants.OP_IFGT, X),
3376
+ },
3377
+ },
3378
+ { // ificmpeq/goto = ificmpne
3379
+ {
3380
+ new BranchInstruction(InstructionConstants.OP_IFICMPEQ, 6),
3381
+ new BranchInstruction(InstructionConstants.OP_GOTO, X),
3382
+ },{
3383
+ new BranchInstruction(InstructionConstants.OP_IFICMPNE, X),
3384
+ },
3385
+ },
3386
+ { // ificmpne/goto = ificmpeq
3387
+ {
3388
+ new BranchInstruction(InstructionConstants.OP_IFICMPNE, 6),
3389
+ new BranchInstruction(InstructionConstants.OP_GOTO, X),
3390
+ },{
3391
+ new BranchInstruction(InstructionConstants.OP_IFICMPEQ, X),
3392
+ },
3393
+ },
3394
+ { // ificmplt/goto = ificmpge
3395
+ {
3396
+ new BranchInstruction(InstructionConstants.OP_IFICMPLT, 6),
3397
+ new BranchInstruction(InstructionConstants.OP_GOTO, X),
3398
+ },{
3399
+ new BranchInstruction(InstructionConstants.OP_IFICMPGE, X),
3400
+ },
3401
+ },
3402
+ { // ificmpge/goto = ificmplt
3403
+ {
3404
+ new BranchInstruction(InstructionConstants.OP_IFICMPGE, 6),
3405
+ new BranchInstruction(InstructionConstants.OP_GOTO, X),
3406
+ },{
3407
+ new BranchInstruction(InstructionConstants.OP_IFICMPLT, X),
3408
+ },
3409
+ },
3410
+ { // ificmpgt/goto = ificmple
3411
+ {
3412
+ new BranchInstruction(InstructionConstants.OP_IFICMPGT, 6),
3413
+ new BranchInstruction(InstructionConstants.OP_GOTO, X),
3414
+ },{
3415
+ new BranchInstruction(InstructionConstants.OP_IFICMPLE, X),
3416
+ },
3417
+ },
3418
+ { // ificmple/goto = ificmpgt
3419
+ {
3420
+ new BranchInstruction(InstructionConstants.OP_IFICMPLE, 6),
3421
+ new BranchInstruction(InstructionConstants.OP_GOTO, X),
3422
+ },{
3423
+ new BranchInstruction(InstructionConstants.OP_IFICMPGT, X),
3424
+ },
3425
+ },
3426
+ { // ifacmpeq/goto = ifacmpne
3427
+ {
3428
+ new BranchInstruction(InstructionConstants.OP_IFACMPEQ, 6),
3429
+ new BranchInstruction(InstructionConstants.OP_GOTO, X),
3430
+ },{
3431
+ new BranchInstruction(InstructionConstants.OP_IFACMPNE, X),
3432
+ },
3433
+ },
3434
+ { // ifacmpne/goto = ifacmpeq
3435
+ {
3436
+ new BranchInstruction(InstructionConstants.OP_IFACMPNE, 6),
3437
+ new BranchInstruction(InstructionConstants.OP_GOTO, X),
3438
+ },{
3439
+ new BranchInstruction(InstructionConstants.OP_IFACMPEQ, X),
3440
+ },
3441
+ },
3442
+ { // ifnull/goto = ifnonnull
3443
+ {
3444
+ new BranchInstruction(InstructionConstants.OP_IFNULL, 6),
3445
+ new BranchInstruction(InstructionConstants.OP_GOTO, X),
3446
+ },{
3447
+ new BranchInstruction(InstructionConstants.OP_IFNONNULL, X),
3448
+ },
3449
+ },
3450
+ { // ifnonnull/goto = ifnull
3451
+ {
3452
+ new BranchInstruction(InstructionConstants.OP_IFNONNULL, 6),
3453
+ new BranchInstruction(InstructionConstants.OP_GOTO, X),
3454
+ },{
3455
+ new BranchInstruction(InstructionConstants.OP_IFNULL, X),
3456
+ },
3457
+ },
3458
+ // { // switch (...) { default: ... } = pop/goto ...
3459
+ // {
3460
+ // new TableSwitchInstruction(InstructionConstants.OP_TABLESWITCH, A, X, Y, 0, new int[0]),
3461
+ // },{
3462
+ // new SimpleInstruction(InstructionConstants.OP_POP),
3463
+ // new BranchInstruction(InstructionConstants.OP_GOTO, A),
3464
+ // },
3465
+ // },
3466
+ // { // switch (...) { default: ... } = pop/goto ...
3467
+ // {
3468
+ // new LookUpSwitchInstruction(InstructionConstants.OP_LOOKUPSWITCH, A, 0, new int[0], new int[0]),
3469
+ // },{
3470
+ // new SimpleInstruction(InstructionConstants.OP_POP),
3471
+ // new BranchInstruction(InstructionConstants.OP_GOTO, A),
3472
+ // },
3473
+ // },
3474
+ { // switch (...) { case/case/default: ... } = switch (...) { case/default: ... }
3475
+ {
3476
+ new LookUpSwitchInstruction(InstructionConstants.OP_LOOKUPSWITCH, A, new int[] { X, Y }, new int[] { A, B }),
3477
+ },{
3478
+ new LookUpSwitchInstruction(InstructionConstants.OP_LOOKUPSWITCH, A, new int[] { Y }, new int[] { B }),
3479
+ },
3480
+ },
3481
+ { // switch (...) { case/case/default: ... } = switch (...) { case/default: ... }
3482
+ {
3483
+ new LookUpSwitchInstruction(InstructionConstants.OP_LOOKUPSWITCH, B, new int[] { X, Y }, new int[] { A, B }),
3484
+ },{
3485
+ new LookUpSwitchInstruction(InstructionConstants.OP_LOOKUPSWITCH, B, new int[] { X }, new int[] { A }),
3486
+ },
3487
+ },
3488
+ { // switch (...) { case/case/case/default: ... } = switch (...) { case/case/default: ... }
3489
+ {
3490
+ new LookUpSwitchInstruction(InstructionConstants.OP_LOOKUPSWITCH, A, new int[] { X, Y, Z }, new int[] { A, B, C }),
3491
+ },{
3492
+ new LookUpSwitchInstruction(InstructionConstants.OP_LOOKUPSWITCH, A, new int[] { Y, Z }, new int[] { B, C }),
3493
+ },
3494
+ },
3495
+ { // switch (...) { case/case/case/default: ... } = switch (...) { case/case/default: ... }
3496
+ {
3497
+ new LookUpSwitchInstruction(InstructionConstants.OP_LOOKUPSWITCH, B, new int[] { X, Y, Z }, new int[] { A, B, C }),
3498
+ },{
3499
+ new LookUpSwitchInstruction(InstructionConstants.OP_LOOKUPSWITCH, B, new int[] { X, Z }, new int[] { A, C }),
3500
+ },
3501
+ },
3502
+ { // switch (...) { case/case/case/default: ... } = switch (...) { case/case/default: ... }
3503
+ {
3504
+ new LookUpSwitchInstruction(InstructionConstants.OP_LOOKUPSWITCH, C, new int[] { X, Y, Z }, new int[] { A, B, C }),
3505
+ },{
3506
+ new LookUpSwitchInstruction(InstructionConstants.OP_LOOKUPSWITCH, C, new int[] { X, Y }, new int[] { A, B }),
3507
+ },
3508
+ },
3509
+ // { // switch (...) { case ...: ... default: ... }
3510
+ // // = if (... == ...) ... else ...
3511
+ // {
3512
+ // new TableSwitchInstruction(InstructionConstants.OP_TABLESWITCH, A, X, Y, 1, new int[] { B }),
3513
+ // },{
3514
+ // new SimpleInstruction(InstructionConstants.OP_SIPUSH, X),
3515
+ // new BranchInstruction(InstructionConstants.OP_IFICMPNE, A),
3516
+ // new BranchInstruction(InstructionConstants.OP_GOTO, B),
3517
+ // },
3518
+ // },
3519
+ // { // switch (...) { case ...: ... default: ... }
3520
+ // // = if (... == ...) ... else ...
3521
+ // {
3522
+ // new LookUpSwitchInstruction(InstructionConstants.OP_LOOKUPSWITCH, A, 1, new int[] { X }, new int[] { B }),
3523
+ // },{
3524
+ // new SimpleInstruction(InstructionConstants.OP_SIPUSH, X),
3525
+ // new BranchInstruction(InstructionConstants.OP_IFICMPNE, A),
3526
+ // new BranchInstruction(InstructionConstants.OP_GOTO, B),
3527
+ // },
3528
+ // }
3529
+ };
3530
+
3531
+ public static final Instruction[][][] STRING = new Instruction[][][]
3532
+ {
3533
+ { // "...".equals("...") = true
3534
+ {
3535
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
3536
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
3537
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRING_EQUALS),
3538
+ },{
3539
+ new SimpleInstruction(InstructionConstants.OP_ICONST_1),
3540
+ },
3541
+ },
3542
+ { // "...".length() = ...
3543
+ {
3544
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
3545
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRING_LENGTH),
3546
+ },{
3547
+ new SimpleInstruction(InstructionConstants.OP_SIPUSH, STRING_A_LENGTH),
3548
+ },
3549
+ },
3550
+
3551
+ { // new StringBuffer("...").toString() = "..." (ignoring identity)
3552
+ {
3553
+ new ConstantInstruction(InstructionConstants.OP_NEW, CLASS_STRINGBUFFER),
3554
+ new SimpleInstruction(InstructionConstants.OP_DUP),
3555
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
3556
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING),
3557
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_TOSTRING),
3558
+ },{
3559
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
3560
+ },
3561
+ },
3562
+ { // new StringBuffer("...").length() = length
3563
+ {
3564
+ new ConstantInstruction(InstructionConstants.OP_NEW, CLASS_STRINGBUFFER),
3565
+ new SimpleInstruction(InstructionConstants.OP_DUP),
3566
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
3567
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING),
3568
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_LENGTH),
3569
+ },{
3570
+ new SimpleInstruction(InstructionConstants.OP_SIPUSH, STRING_A_LENGTH),
3571
+ },
3572
+ },
3573
+ { // StringBuffer#append("") = nothing
3574
+ {
3575
+ new ConstantInstruction(InstructionConstants.OP_LDC, STRING_EMPTY),
3576
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_STRING),
3577
+ },{
3578
+ // Nothing.
3579
+ },
3580
+ },
3581
+ { // new StringBuffer().append(Z) = new StringBuffer("....")
3582
+ {
3583
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT),
3584
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0, A),
3585
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_BOOLEAN),
3586
+ },{
3587
+ new ConstantInstruction(InstructionConstants.OP_LDC, BOOLEAN_A_STRING),
3588
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING),
3589
+ },
3590
+ },
3591
+ { // new StringBuffer().append(C) = new StringBuffer("....")
3592
+ {
3593
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT),
3594
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0, A),
3595
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_CHAR),
3596
+ },{
3597
+ new ConstantInstruction(InstructionConstants.OP_LDC, CHAR_A_STRING),
3598
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING),
3599
+ },
3600
+ },
3601
+ { // new StringBuffer().append(Cc) = new StringBuffer("....")
3602
+ {
3603
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT),
3604
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
3605
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_CHAR),
3606
+ },{
3607
+ new ConstantInstruction(InstructionConstants.OP_LDC, CHAR_A_STRING),
3608
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING),
3609
+ },
3610
+ },
3611
+ { // new StringBuffer().append(I) = new StringBuffer("....")
3612
+ {
3613
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT),
3614
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0, A),
3615
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_INTEGER),
3616
+ },{
3617
+ new ConstantInstruction(InstructionConstants.OP_LDC, INT_A_STRING),
3618
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING),
3619
+ },
3620
+ },
3621
+ { // new StringBuffer().append(Ic) = new StringBuffer("....")
3622
+ {
3623
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT),
3624
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
3625
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_INTEGER),
3626
+ },{
3627
+ new ConstantInstruction(InstructionConstants.OP_LDC, INT_A_STRING),
3628
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING),
3629
+ },
3630
+ },
3631
+ { // new StringBuffer().append(J) = new StringBuffer("....")
3632
+ {
3633
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT),
3634
+ new SimpleInstruction(InstructionConstants.OP_LCONST_0, A),
3635
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_LONG),
3636
+ },{
3637
+ new ConstantInstruction(InstructionConstants.OP_LDC, LONG_A_STRING),
3638
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING),
3639
+ },
3640
+ },
3641
+ { // new StringBuffer().append(Jc) = new StringBuffer("....")
3642
+ {
3643
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT),
3644
+ new ConstantInstruction(InstructionConstants.OP_LDC2_W, A),
3645
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_LONG),
3646
+ },{
3647
+ new ConstantInstruction(InstructionConstants.OP_LDC, LONG_A_STRING),
3648
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING),
3649
+ },
3650
+ },
3651
+ { // new StringBuffer().append(F) = new StringBuffer("....")
3652
+ {
3653
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT),
3654
+ new SimpleInstruction(InstructionConstants.OP_FCONST_0, A),
3655
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_FLOAT),
3656
+ },{
3657
+ new ConstantInstruction(InstructionConstants.OP_LDC, FLOAT_A_STRING),
3658
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING),
3659
+ },
3660
+ },
3661
+ { // new StringBuffer().append(Fc) = new StringBuffer("....")
3662
+ {
3663
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT),
3664
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
3665
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_FLOAT),
3666
+ },{
3667
+ new ConstantInstruction(InstructionConstants.OP_LDC, FLOAT_A_STRING),
3668
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING),
3669
+ },
3670
+ },
3671
+ { // new StringBuffer().append(D) = new StringBuffer("....")
3672
+ {
3673
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT),
3674
+ new SimpleInstruction(InstructionConstants.OP_DCONST_0, A),
3675
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_DOUBLE),
3676
+ },{
3677
+ new ConstantInstruction(InstructionConstants.OP_LDC, DOUBLE_A_STRING),
3678
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING),
3679
+ },
3680
+ },
3681
+ { // new StringBuffer().append(Dc) = new StringBuffer("....")
3682
+ {
3683
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT),
3684
+ new ConstantInstruction(InstructionConstants.OP_LDC2_W, A),
3685
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_DOUBLE),
3686
+ },{
3687
+ new ConstantInstruction(InstructionConstants.OP_LDC, DOUBLE_A_STRING),
3688
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING),
3689
+ },
3690
+ },
3691
+ { // new StringBuffer().append("...") = new StringBuffer("......")
3692
+ {
3693
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT),
3694
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
3695
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_STRING),
3696
+ },{
3697
+ new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING),
3698
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING),
3699
+ },
3700
+ },
3701
+ { // new StringBuffer("...").append(Z) = new StringBuffer("....")
3702
+ {
3703
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
3704
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING),
3705
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0, B),
3706
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_BOOLEAN),
3707
+ },{
3708
+ new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | BOOLEAN_B_STRING),
3709
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING),
3710
+ },
3711
+ },
3712
+ { // new StringBuffer("...").append(C) = new StringBuffer("....")
3713
+ {
3714
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
3715
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING),
3716
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0, B),
3717
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_CHAR),
3718
+ },{
3719
+ new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | CHAR_B_STRING),
3720
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING),
3721
+ },
3722
+ },
3723
+ { // new StringBuffer("...").append(Cc) = new StringBuffer("....")
3724
+ {
3725
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
3726
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING),
3727
+ new ConstantInstruction(InstructionConstants.OP_LDC, B),
3728
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_CHAR),
3729
+ },{
3730
+ new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | CHAR_B_STRING),
3731
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING),
3732
+ },
3733
+ },
3734
+ { // new StringBuffer("...").append(I) = new StringBuffer("....")
3735
+ {
3736
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
3737
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING),
3738
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0, B),
3739
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_INTEGER),
3740
+ },{
3741
+ new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | INT_B_STRING),
3742
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING),
3743
+ },
3744
+ },
3745
+ { // new StringBuffer("...").append(Ic) = new StringBuffer("....")
3746
+ {
3747
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
3748
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING),
3749
+ new ConstantInstruction(InstructionConstants.OP_LDC, B),
3750
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_INTEGER),
3751
+ },{
3752
+ new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | INT_B_STRING),
3753
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING),
3754
+ },
3755
+ },
3756
+ { // new StringBuffer("...").append(J) = new StringBuffer("....")
3757
+ {
3758
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
3759
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING),
3760
+ new SimpleInstruction(InstructionConstants.OP_LCONST_0, B),
3761
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_LONG),
3762
+ },{
3763
+ new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | LONG_B_STRING),
3764
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING),
3765
+ },
3766
+ },
3767
+ { // new StringBuffer("...").append(Jc) = new StringBuffer("....")
3768
+ {
3769
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
3770
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING),
3771
+ new ConstantInstruction(InstructionConstants.OP_LDC2_W, B),
3772
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_LONG),
3773
+ },{
3774
+ new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | LONG_B_STRING),
3775
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING),
3776
+ },
3777
+ },
3778
+ { // new StringBuffer("...").append(F) = new StringBuffer("....")
3779
+ {
3780
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
3781
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING),
3782
+ new SimpleInstruction(InstructionConstants.OP_FCONST_0, B),
3783
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_FLOAT),
3784
+ },{
3785
+ new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | FLOAT_B_STRING),
3786
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING),
3787
+ },
3788
+ },
3789
+ { // new StringBuffer("...").append(Fc) = new StringBuffer("....")
3790
+ {
3791
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
3792
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING),
3793
+ new ConstantInstruction(InstructionConstants.OP_LDC, B),
3794
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_FLOAT),
3795
+ },{
3796
+ new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | FLOAT_B_STRING),
3797
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING),
3798
+ },
3799
+ },
3800
+ { // new StringBuffer("...").append(D) = new StringBuffer("....")
3801
+ {
3802
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
3803
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING),
3804
+ new SimpleInstruction(InstructionConstants.OP_DCONST_0, B),
3805
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_DOUBLE),
3806
+ },{
3807
+ new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | DOUBLE_B_STRING),
3808
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING),
3809
+ },
3810
+ },
3811
+ { // new StringBuffer("...").append(Dc) = new StringBuffer("....")
3812
+ {
3813
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
3814
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING),
3815
+ new ConstantInstruction(InstructionConstants.OP_LDC2_W, B),
3816
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_DOUBLE),
3817
+ },{
3818
+ new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | DOUBLE_B_STRING),
3819
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING),
3820
+ },
3821
+ },
3822
+ { // new StringBuffer("...").append("...") = new StringBuffer("......")
3823
+ {
3824
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
3825
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING),
3826
+ new ConstantInstruction(InstructionConstants.OP_LDC, B),
3827
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_STRING),
3828
+ },{
3829
+ new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | STRING_B_STRING),
3830
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING),
3831
+ },
3832
+ },
3833
+ { // StringBuffer#append("...").append(Z) = StringBuffer#append("....")
3834
+ {
3835
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
3836
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_STRING),
3837
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0, B),
3838
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_BOOLEAN),
3839
+ },{
3840
+ new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | BOOLEAN_B_STRING),
3841
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_STRING),
3842
+ },
3843
+ },
3844
+ { // StringBuffer#append("...").append(C) = StringBuffer#append("....")
3845
+ {
3846
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
3847
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_STRING),
3848
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0, B),
3849
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_CHAR),
3850
+ },{
3851
+ new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | CHAR_B_STRING),
3852
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_STRING),
3853
+ },
3854
+ },
3855
+ { // StringBuffer#append("...").append(Cc) = StringBuffer#append("....")
3856
+ {
3857
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
3858
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_STRING),
3859
+ new ConstantInstruction(InstructionConstants.OP_LDC, B),
3860
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_CHAR),
3861
+ },{
3862
+ new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | CHAR_B_STRING),
3863
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_STRING),
3864
+ },
3865
+ },
3866
+ { // StringBuffer#append("...").append(I) = StringBuffer#append("....")
3867
+ {
3868
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
3869
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_STRING),
3870
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0, B),
3871
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_INTEGER),
3872
+ },{
3873
+ new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | INT_B_STRING),
3874
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_STRING),
3875
+ },
3876
+ },
3877
+ { // StringBuffer#append("...").append(Ic) = StringBuffer#append("....")
3878
+ {
3879
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
3880
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_STRING),
3881
+ new ConstantInstruction(InstructionConstants.OP_LDC, B),
3882
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_INTEGER),
3883
+ },{
3884
+ new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | INT_B_STRING),
3885
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_STRING),
3886
+ },
3887
+ },
3888
+ { // StringBuffer#append("...").append(J) = StringBuffer#append("....")
3889
+ {
3890
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
3891
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_STRING),
3892
+ new SimpleInstruction(InstructionConstants.OP_LCONST_0, B),
3893
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_LONG),
3894
+ },{
3895
+ new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | LONG_B_STRING),
3896
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_STRING),
3897
+ },
3898
+ },
3899
+ { // StringBuffer#append("...").append(Jc) = StringBuffer#append("....")
3900
+ {
3901
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
3902
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_STRING),
3903
+ new ConstantInstruction(InstructionConstants.OP_LDC2_W, B),
3904
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_LONG),
3905
+ },{
3906
+ new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | LONG_B_STRING),
3907
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_STRING),
3908
+ },
3909
+ },
3910
+ { // StringBuffer#append("...").append(F) = StringBuffer#append("....")
3911
+ {
3912
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
3913
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_STRING),
3914
+ new SimpleInstruction(InstructionConstants.OP_FCONST_0, B),
3915
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_FLOAT),
3916
+ },{
3917
+ new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | FLOAT_B_STRING),
3918
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_STRING),
3919
+ },
3920
+ },
3921
+ { // StringBuffer#append("...").append(Fc) = StringBuffer#append("....")
3922
+ {
3923
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
3924
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_STRING),
3925
+ new ConstantInstruction(InstructionConstants.OP_LDC, B),
3926
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_FLOAT),
3927
+ },{
3928
+ new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | FLOAT_B_STRING),
3929
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_STRING),
3930
+ },
3931
+ },
3932
+ { // StringBuffer#append("...").append(D) = StringBuffer#append("....")
3933
+ {
3934
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
3935
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_STRING),
3936
+ new SimpleInstruction(InstructionConstants.OP_DCONST_0, B),
3937
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_DOUBLE),
3938
+ },{
3939
+ new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | DOUBLE_B_STRING),
3940
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_STRING),
3941
+ },
3942
+ },
3943
+ { // StringBuffer#append("...").append(Dc) = StringBuffer#append("....")
3944
+ {
3945
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
3946
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_STRING),
3947
+ new ConstantInstruction(InstructionConstants.OP_LDC2_W, B),
3948
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_DOUBLE),
3949
+ },{
3950
+ new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | DOUBLE_B_STRING),
3951
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_STRING),
3952
+ },
3953
+ },
3954
+ { // StringBuffer#append("...").append("...") = StringBuffer#append("......")
3955
+ {
3956
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
3957
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_STRING),
3958
+ new ConstantInstruction(InstructionConstants.OP_LDC, B),
3959
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_STRING),
3960
+ },{
3961
+ new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | STRING_B_STRING),
3962
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_STRING),
3963
+ },
3964
+ },
3965
+
3966
+ { // new StringBuilder("...").toString() = "..." (ignoring identity)
3967
+ {
3968
+ new ConstantInstruction(InstructionConstants.OP_NEW, CLASS_STRINGBUILDER),
3969
+ new SimpleInstruction(InstructionConstants.OP_DUP),
3970
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
3971
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING),
3972
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_TOSTRING),
3973
+ },{
3974
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
3975
+ },
3976
+ },
3977
+ { // new StringBuilder("...").length() = length
3978
+ {
3979
+ new ConstantInstruction(InstructionConstants.OP_NEW, CLASS_STRINGBUILDER),
3980
+ new SimpleInstruction(InstructionConstants.OP_DUP),
3981
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
3982
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING),
3983
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_LENGTH),
3984
+ },{
3985
+ new SimpleInstruction(InstructionConstants.OP_SIPUSH, STRING_A_LENGTH),
3986
+ },
3987
+ },
3988
+ { // StringBuilder#append("") = nothing
3989
+ {
3990
+ new ConstantInstruction(InstructionConstants.OP_LDC, STRING_EMPTY),
3991
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_STRING),
3992
+ },{
3993
+ // Nothing.
3994
+ },
3995
+ },
3996
+ { // new StringBuilder().append(Z) = new StringBuilder("....")
3997
+ {
3998
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT),
3999
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0, A),
4000
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_BOOLEAN),
4001
+ },{
4002
+ new ConstantInstruction(InstructionConstants.OP_LDC, BOOLEAN_A_STRING),
4003
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING),
4004
+ },
4005
+ },
4006
+ { // new StringBuilder().append(C) = new StringBuilder("....")
4007
+ {
4008
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT),
4009
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0, A),
4010
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_CHAR),
4011
+ },{
4012
+ new ConstantInstruction(InstructionConstants.OP_LDC, CHAR_A_STRING),
4013
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING),
4014
+ },
4015
+ },
4016
+ { // new StringBuilder().append(Cc) = new StringBuilder("....")
4017
+ {
4018
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT),
4019
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
4020
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_CHAR),
4021
+ },{
4022
+ new ConstantInstruction(InstructionConstants.OP_LDC, CHAR_A_STRING),
4023
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING),
4024
+ },
4025
+ },
4026
+ { // new StringBuilder().append(I) = new StringBuilder("....")
4027
+ {
4028
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT),
4029
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0, A),
4030
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_INTEGER),
4031
+ },{
4032
+ new ConstantInstruction(InstructionConstants.OP_LDC, INT_A_STRING),
4033
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING),
4034
+ },
4035
+ },
4036
+ { // new StringBuilder().append(Ic) = new StringBuilder("....")
4037
+ {
4038
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT),
4039
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
4040
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_INTEGER),
4041
+ },{
4042
+ new ConstantInstruction(InstructionConstants.OP_LDC, INT_A_STRING),
4043
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING),
4044
+ },
4045
+ },
4046
+ { // new StringBuilder().append(J) = new StringBuilder("....")
4047
+ {
4048
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT),
4049
+ new SimpleInstruction(InstructionConstants.OP_LCONST_0, A),
4050
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_LONG),
4051
+ },{
4052
+ new ConstantInstruction(InstructionConstants.OP_LDC, LONG_A_STRING),
4053
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING),
4054
+ },
4055
+ },
4056
+ { // new StringBuilder().append(Jc) = new StringBuilder("....")
4057
+ {
4058
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT),
4059
+ new ConstantInstruction(InstructionConstants.OP_LDC2_W, A),
4060
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_LONG),
4061
+ },{
4062
+ new ConstantInstruction(InstructionConstants.OP_LDC, LONG_A_STRING),
4063
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING),
4064
+ },
4065
+ },
4066
+ { // new StringBuilder().append(F) = new StringBuilder("....")
4067
+ {
4068
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT),
4069
+ new SimpleInstruction(InstructionConstants.OP_FCONST_0, A),
4070
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_FLOAT),
4071
+ },{
4072
+ new ConstantInstruction(InstructionConstants.OP_LDC, FLOAT_A_STRING),
4073
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING),
4074
+ },
4075
+ },
4076
+ { // new StringBuilder().append(Fc) = new StringBuilder("....")
4077
+ {
4078
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT),
4079
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
4080
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_FLOAT),
4081
+ },{
4082
+ new ConstantInstruction(InstructionConstants.OP_LDC, FLOAT_A_STRING),
4083
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING),
4084
+ },
4085
+ },
4086
+ { // new StringBuilder().append(D) = new StringBuilder("....")
4087
+ {
4088
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT),
4089
+ new SimpleInstruction(InstructionConstants.OP_DCONST_0, A),
4090
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_DOUBLE),
4091
+ },{
4092
+ new ConstantInstruction(InstructionConstants.OP_LDC, DOUBLE_A_STRING),
4093
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING),
4094
+ },
4095
+ },
4096
+ { // new StringBuilder().append(Dc) = new StringBuilder("....")
4097
+ {
4098
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT),
4099
+ new ConstantInstruction(InstructionConstants.OP_LDC2_W, A),
4100
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_DOUBLE),
4101
+ },{
4102
+ new ConstantInstruction(InstructionConstants.OP_LDC, DOUBLE_A_STRING),
4103
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING),
4104
+ },
4105
+ },
4106
+ { // new StringBuilder().append("...") = new StringBuilder("......")
4107
+ {
4108
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT),
4109
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
4110
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_STRING),
4111
+ },{
4112
+ new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING),
4113
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING),
4114
+ },
4115
+ },
4116
+ { // new StringBuilder("...").append(Z) = new StringBuilder("....")
4117
+ {
4118
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
4119
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING),
4120
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0, B),
4121
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_BOOLEAN),
4122
+ },{
4123
+ new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | BOOLEAN_B_STRING),
4124
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING),
4125
+ },
4126
+ },
4127
+ { // new StringBuilder("...").append(C) = new StringBuilder("....")
4128
+ {
4129
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
4130
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING),
4131
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0, B),
4132
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_CHAR),
4133
+ },{
4134
+ new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | CHAR_B_STRING),
4135
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING),
4136
+ },
4137
+ },
4138
+ { // new StringBuilder("...").append(Cc) = new StringBuilder("....")
4139
+ {
4140
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
4141
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING),
4142
+ new ConstantInstruction(InstructionConstants.OP_LDC, B),
4143
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_CHAR),
4144
+ },{
4145
+ new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | CHAR_B_STRING),
4146
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING),
4147
+ },
4148
+ },
4149
+ { // new StringBuilder("...").append(I) = new StringBuilder("....")
4150
+ {
4151
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
4152
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING),
4153
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0, B),
4154
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_INTEGER),
4155
+ },{
4156
+ new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | INT_B_STRING),
4157
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING),
4158
+ },
4159
+ },
4160
+ { // new StringBuilder("...").append(Ic) = new StringBuilder("....")
4161
+ {
4162
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
4163
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING),
4164
+ new ConstantInstruction(InstructionConstants.OP_LDC, B),
4165
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_INTEGER),
4166
+ },{
4167
+ new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | INT_B_STRING),
4168
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING),
4169
+ },
4170
+ },
4171
+ { // new StringBuilder("...").append(J) = new StringBuilder("....")
4172
+ {
4173
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
4174
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING),
4175
+ new SimpleInstruction(InstructionConstants.OP_LCONST_0, B),
4176
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_LONG),
4177
+ },{
4178
+ new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | LONG_B_STRING),
4179
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING),
4180
+ },
4181
+ },
4182
+ { // new StringBuilder("...").append(Jc) = new StringBuilder("....")
4183
+ {
4184
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
4185
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING),
4186
+ new ConstantInstruction(InstructionConstants.OP_LDC2_W, B),
4187
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_LONG),
4188
+ },{
4189
+ new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | LONG_B_STRING),
4190
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING),
4191
+ },
4192
+ },
4193
+ { // new StringBuilder("...").append(F) = new StringBuilder("....")
4194
+ {
4195
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
4196
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING),
4197
+ new SimpleInstruction(InstructionConstants.OP_FCONST_0, B),
4198
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_FLOAT),
4199
+ },{
4200
+ new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | FLOAT_B_STRING),
4201
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING),
4202
+ },
4203
+ },
4204
+ { // new StringBuilder("...").append(Fc) = new StringBuilder("....")
4205
+ {
4206
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
4207
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING),
4208
+ new ConstantInstruction(InstructionConstants.OP_LDC, B),
4209
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_FLOAT),
4210
+ },{
4211
+ new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | FLOAT_B_STRING),
4212
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING),
4213
+ },
4214
+ },
4215
+ { // new StringBuilder("...").append(D) = new StringBuilder("....")
4216
+ {
4217
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
4218
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING),
4219
+ new SimpleInstruction(InstructionConstants.OP_DCONST_0, B),
4220
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_DOUBLE),
4221
+ },{
4222
+ new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | DOUBLE_B_STRING),
4223
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING),
4224
+ },
4225
+ },
4226
+ { // new StringBuilder("...").append(Dc) = new StringBuilder("....")
4227
+ {
4228
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
4229
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING),
4230
+ new ConstantInstruction(InstructionConstants.OP_LDC2_W, B),
4231
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_DOUBLE),
4232
+ },{
4233
+ new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | DOUBLE_B_STRING),
4234
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING),
4235
+ },
4236
+ },
4237
+ { // new StringBuilder("...").append("...") = new StringBuilder("......")
4238
+ {
4239
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
4240
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING),
4241
+ new ConstantInstruction(InstructionConstants.OP_LDC, B),
4242
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_STRING),
4243
+ },{
4244
+ new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | STRING_B_STRING),
4245
+ new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING),
4246
+ },
4247
+ },
4248
+ { // StringBuilder#append("...").append(Z) = StringBuilder#append("....")
4249
+ {
4250
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
4251
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_STRING),
4252
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0, B),
4253
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_BOOLEAN),
4254
+ },{
4255
+ new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | BOOLEAN_B_STRING),
4256
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_STRING),
4257
+ },
4258
+ },
4259
+ { // StringBuilder#append("...").append(C) = StringBuilder#append("....")
4260
+ {
4261
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
4262
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_STRING),
4263
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0, B),
4264
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_CHAR),
4265
+ },{
4266
+ new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | CHAR_B_STRING),
4267
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_STRING),
4268
+ },
4269
+ },
4270
+ { // StringBuilder#append("...").append(Cc) = StringBuilder#append("....")
4271
+ {
4272
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
4273
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_STRING),
4274
+ new ConstantInstruction(InstructionConstants.OP_LDC, B),
4275
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_CHAR),
4276
+ },{
4277
+ new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | CHAR_B_STRING),
4278
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_STRING),
4279
+ },
4280
+ },
4281
+ { // StringBuilder#append("...").append(I) = StringBuilder#append("....")
4282
+ {
4283
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
4284
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_STRING),
4285
+ new SimpleInstruction(InstructionConstants.OP_ICONST_0, B),
4286
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_INTEGER),
4287
+ },{
4288
+ new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | INT_B_STRING),
4289
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_STRING),
4290
+ },
4291
+ },
4292
+ { // StringBuilder#append("...").append(Ic) = StringBuilder#append("....")
4293
+ {
4294
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
4295
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_STRING),
4296
+ new ConstantInstruction(InstructionConstants.OP_LDC, B),
4297
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_INTEGER),
4298
+ },{
4299
+ new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | INT_B_STRING),
4300
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_STRING),
4301
+ },
4302
+ },
4303
+ { // StringBuilder#append("...").append(J) = StringBuilder#append("....")
4304
+ {
4305
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
4306
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_STRING),
4307
+ new SimpleInstruction(InstructionConstants.OP_LCONST_0, B),
4308
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_LONG),
4309
+ },{
4310
+ new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | LONG_B_STRING),
4311
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_STRING),
4312
+ },
4313
+ },
4314
+ { // StringBuilder#append("...").append(Jc) = StringBuilder#append("....")
4315
+ {
4316
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
4317
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_STRING),
4318
+ new ConstantInstruction(InstructionConstants.OP_LDC2_W, B),
4319
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_LONG),
4320
+ },{
4321
+ new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | LONG_B_STRING),
4322
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_STRING),
4323
+ },
4324
+ },
4325
+ { // StringBuilder#append("...").append(F) = StringBuilder#append("....")
4326
+ {
4327
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
4328
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_STRING),
4329
+ new SimpleInstruction(InstructionConstants.OP_FCONST_0, B),
4330
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_FLOAT),
4331
+ },{
4332
+ new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | FLOAT_B_STRING),
4333
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_STRING),
4334
+ },
4335
+ },
4336
+ { // StringBuilder#append("...").append(Fc) = StringBuilder#append("....")
4337
+ {
4338
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
4339
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_STRING),
4340
+ new ConstantInstruction(InstructionConstants.OP_LDC, B),
4341
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_FLOAT),
4342
+ },{
4343
+ new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | FLOAT_B_STRING),
4344
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_STRING),
4345
+ },
4346
+ },
4347
+ { // StringBuilder#append("...").append(D) = StringBuilder#append("....")
4348
+ {
4349
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
4350
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_STRING),
4351
+ new SimpleInstruction(InstructionConstants.OP_DCONST_0, B),
4352
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_DOUBLE),
4353
+ },{
4354
+ new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | DOUBLE_B_STRING),
4355
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_STRING),
4356
+ },
4357
+ },
4358
+ { // StringBuilder#append("...").append(Dc) = StringBuilder#append("....")
4359
+ {
4360
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
4361
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_STRING),
4362
+ new ConstantInstruction(InstructionConstants.OP_LDC2_W, B),
4363
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_DOUBLE),
4364
+ },{
4365
+ new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | DOUBLE_B_STRING),
4366
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_STRING),
4367
+ },
4368
+ },
4369
+ { // StringBuilder#append("...").append("...") = StringBuilder#append("......")
4370
+ {
4371
+ new ConstantInstruction(InstructionConstants.OP_LDC, A),
4372
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_STRING),
4373
+ new ConstantInstruction(InstructionConstants.OP_LDC, B),
4374
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_STRING),
4375
+ },{
4376
+ new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | STRING_B_STRING),
4377
+ new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_STRING),
4378
+ },
4379
+ },
4380
+ };
4381
+
4382
+ /*
4383
+ static
4384
+ {
4385
+ ProgramClass clazz = new ProgramClass();
4386
+ clazz.constantPool = CONSTANTS;
4387
+
4388
+ ClassPrinter printer = new ClassPrinter();
4389
+
4390
+ for (int index = 0; index < CONSTANTS.length; index++)
4391
+ {
4392
+ System.out.print("["+index+"] ");
4393
+ try
4394
+ {
4395
+ CONSTANTS[index].accept(clazz, printer);
4396
+ }
4397
+ catch (Exception e)
4398
+ {
4399
+ System.out.println("("+e.getClass().getName()+")");
4400
+ }
4401
+ }
4402
+
4403
+ if (CONSTANTS.length != SENTINEL)
4404
+ {
4405
+ throw new IllegalStateException("Constants length ["+CONSTANTS.length+"] different from number of constant names ["+SENTINEL+"]");
4406
+ }
4407
+
4408
+ Instruction[] instructions = STRING[2][0];
4409
+
4410
+ for (int index = 0; index < instructions.length; index++)
4411
+ {
4412
+ Instruction instruction = instructions[index];
4413
+ try
4414
+ {
4415
+ instruction.accept(clazz, null, null, index, new ClassPrinter());
4416
+ }
4417
+ catch (Exception e)
4418
+ {
4419
+ //System.out.println(" "+instruction.toString(offset));
4420
+ }
4421
+ }
4422
+ }
4423
+ //*/
4424
+ }