1 /* 2 * ProGuard -- shrinking, optimization, obfuscation, and preverification 3 * of Java bytecode. 4 * 5 * Copyright (c) 2002-2014 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; // Implicitly uses X and Y. 104 private static final int FIELD_L = 33; // Implicitly uses X and Y. 105 private static final int FIELD_F = 34; // Implicitly uses X and Y. 106 private static final int FIELD_D = 35; // Implicitly uses X and Y. 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_STRING_VALUEOF_Z = 38; 111 private static final int METHOD_STRING_VALUEOF_C = 39; 112 private static final int METHOD_STRING_VALUEOF_I = 40; 113 private static final int METHOD_STRING_VALUEOF_J = 41; 114 private static final int METHOD_STRING_VALUEOF_F = 42; 115 private static final int METHOD_STRING_VALUEOF_D = 43; 116 private static final int METHOD_STRING_VALUEOF_OBJECT = 44; 117 private static final int METHOD_STRINGBUFFER_INIT = 45; 118 private static final int METHOD_STRINGBUFFER_INIT_STRING = 46; 119 private static final int METHOD_STRINGBUFFER_APPEND_Z = 47; 120 private static final int METHOD_STRINGBUFFER_APPEND_C = 48; 121 private static final int METHOD_STRINGBUFFER_APPEND_I = 49; 122 private static final int METHOD_STRINGBUFFER_APPEND_J = 50; 123 private static final int METHOD_STRINGBUFFER_APPEND_F = 51; 124 private static final int METHOD_STRINGBUFFER_APPEND_D = 52; 125 private static final int METHOD_STRINGBUFFER_APPEND_STRING = 53; 126 private static final int METHOD_STRINGBUFFER_APPEND_OBJECT = 54; 127 private static final int METHOD_STRINGBUFFER_LENGTH = 55; 128 private static final int METHOD_STRINGBUFFER_TOSTRING = 56; 129 private static final int METHOD_STRINGBUILDER_INIT = 57; 130 private static final int METHOD_STRINGBUILDER_INIT_STRING = 58; 131 private static final int METHOD_STRINGBUILDER_APPEND_Z = 59; 132 private static final int METHOD_STRINGBUILDER_APPEND_C = 60; 133 private static final int METHOD_STRINGBUILDER_APPEND_I = 61; 134 private static final int METHOD_STRINGBUILDER_APPEND_J = 62; 135 private static final int METHOD_STRINGBUILDER_APPEND_F = 63; 136 private static final int METHOD_STRINGBUILDER_APPEND_D = 64; 137 private static final int METHOD_STRINGBUILDER_APPEND_STRING = 65; 138 private static final int METHOD_STRINGBUILDER_APPEND_OBJECT = 66; 139 private static final int METHOD_STRINGBUILDER_LENGTH = 67; 140 private static final int METHOD_STRINGBUILDER_TOSTRING = 68; 141 142 private static final int CLASS_STRING = 69; 143 private static final int CLASS_STRINGBUFFER = 70; 144 private static final int CLASS_STRINGBUILDER = 71; 145 146 private static final int NAME_AND_TYPE_I = 72; // Implicitly uses Y. 147 private static final int NAME_AND_TYPE_L = 73; // Implicitly uses Y. 148 private static final int NAME_AND_TYPE_F = 74; // Implicitly uses Y. 149 private static final int NAME_AND_TYPE_D = 75; // Implicitly uses Y. 150 151 private static final int NAME_AND_TYPE_EQUALS = 76; 152 private static final int NAME_AND_TYPE_LENGTH = 77; 153 private static final int NAME_AND_TYPE_VALUEOF_Z = 78; 154 private static final int NAME_AND_TYPE_VALUEOF_C = 79; 155 private static final int NAME_AND_TYPE_VALUEOF_I = 80; 156 private static final int NAME_AND_TYPE_VALUEOF_J = 81; 157 private static final int NAME_AND_TYPE_VALUEOF_F = 82; 158 private static final int NAME_AND_TYPE_VALUEOF_D = 83; 159 private static final int NAME_AND_TYPE_VALUEOF_OBJECT = 84; 160 private static final int NAME_AND_TYPE_INIT = 85; 161 private static final int NAME_AND_TYPE_INIT_STRING = 86; 162 private static final int NAME_AND_TYPE_APPEND_Z_STRINGBUFFER = 87; 163 private static final int NAME_AND_TYPE_APPEND_C_STRINGBUFFER = 88; 164 private static final int NAME_AND_TYPE_APPEND_I_STRINGBUFFER = 89; 165 private static final int NAME_AND_TYPE_APPEND_J_STRINGBUFFER = 90; 166 private static final int NAME_AND_TYPE_APPEND_F_STRINGBUFFER = 91; 167 private static final int NAME_AND_TYPE_APPEND_D_STRINGBUFFER = 92; 168 private static final int NAME_AND_TYPE_APPEND_STRING_STRINGBUFFER = 93; 169 private static final int NAME_AND_TYPE_APPEND_OBJECT_STRINGBUFFER = 94; 170 private static final int NAME_AND_TYPE_APPEND_Z_STRINGBUILDER = 95; 171 private static final int NAME_AND_TYPE_APPEND_C_STRINGBUILDER = 96; 172 private static final int NAME_AND_TYPE_APPEND_I_STRINGBUILDER = 97; 173 private static final int NAME_AND_TYPE_APPEND_J_STRINGBUILDER = 98; 174 private static final int NAME_AND_TYPE_APPEND_F_STRINGBUILDER = 99; 175 private static final int NAME_AND_TYPE_APPEND_D_STRINGBUILDER = 100; 176 private static final int NAME_AND_TYPE_APPEND_STRING_STRINGBUILDER = 101; 177 private static final int NAME_AND_TYPE_APPEND_OBJECT_STRINGBUILDER = 102; 178 private static final int NAME_AND_TYPE_TOSTRING = 103; 179 180 private static final int UTF8_EMPTY = 104; 181 private static final int UTF8_I = 105; 182 private static final int UTF8_L = 106; 183 private static final int UTF8_F = 107; 184 private static final int UTF8_D = 108; 185 private static final int UTF8_STRING = 109; 186 private static final int UTF8_STRINGBUFFER = 110; 187 private static final int UTF8_STRINGBUILDER = 111; 188 private static final int UTF8_EQUALS = 112; 189 private static final int UTF8_OBJECT_Z = 113; 190 private static final int UTF8_LENGTH = 114; 191 private static final int UTF8__I = 115; 192 private static final int UTF8_VALUEOF = 116; 193 private static final int UTF8_Z_STRING = 117; 194 private static final int UTF8_C_STRING = 118; 195 private static final int UTF8_I_STRING = 119; 196 private static final int UTF8_J_STRING = 120; 197 private static final int UTF8_F_STRING = 121; 198 private static final int UTF8_D_STRING = 122; 199 private static final int UTF8_OBJECT_STRING = 123; 200 private static final int UTF8_INIT = 124; 201 private static final int UTF8__VOID = 125; 202 private static final int UTF8_STRING_VOID = 126; 203 private static final int UTF8_TOSTRING = 127; 204 private static final int UTF8__STRING = 128; 205 private static final int UTF8_APPEND = 129; 206 private static final int UTF8_Z_STRINGBUFFER = 130; 207 private static final int UTF8_C_STRINGBUFFER = 131; 208 private static final int UTF8_I_STRINGBUFFER = 132; 209 private static final int UTF8_J_STRINGBUFFER = 133; 210 private static final int UTF8_F_STRINGBUFFER = 134; 211 private static final int UTF8_D_STRINGBUFFER = 135; 212 private static final int UTF8_STRING_STRINGBUFFER = 136; 213 private static final int UTF8_OBJECT_STRINGBUFFER = 137; 214 private static final int UTF8_Z_STRINGBUILDER = 138; 215 private static final int UTF8_C_STRINGBUILDER = 139; 216 private static final int UTF8_I_STRINGBUILDER = 140; 217 private static final int UTF8_J_STRINGBUILDER = 141; 218 private static final int UTF8_F_STRINGBUILDER = 142; 219 private static final int UTF8_D_STRINGBUILDER = 143; 220 private static final int UTF8_STRING_STRINGBUILDER = 144; 221 private static final int UTF8_OBJECT_STRINGBUILDER = 145; 222 223 private static final int SENTINEL = 146; 224 225 226 public static final Constant[] CONSTANTS = new Constant[] 227 { 228 new IntegerConstant(32768), 229 new IntegerConstant(65536), 230 new IntegerConstant(16777216), 231 232 new IntegerConstant(0x0000ff00), 233 new IntegerConstant(0x00ff0000), 234 new IntegerConstant(0xff000000), 235 new IntegerConstant(0x0000ffff), 236 new IntegerConstant(0xffff0000), 237 238 new LongConstant(-1L), 239 new LongConstant(2L), 240 new LongConstant(4L), 241 new LongConstant(8L), 242 new LongConstant(16L), 243 new LongConstant(32L), 244 new LongConstant(64L), 245 new LongConstant(128L), 246 new LongConstant(256L), 247 new LongConstant(512L), 248 new LongConstant(1024L), 249 new LongConstant(2048L), 250 new LongConstant(4096L), 251 new LongConstant(8192L), 252 new LongConstant(16384L), 253 new LongConstant(32768L), 254 new LongConstant(65536L), 255 new LongConstant(16777216L), 256 new LongConstant(4294967296L), 257 258 new LongConstant(0x00000000ffffffffL), 259 new LongConstant(0xffffffff00000000L), 260 261 new FloatConstant(-1f), 262 263 new DoubleConstant(-1d), 264 265 new StringConstant(UTF8_EMPTY, null, null), 266 267 new FieldrefConstant(X, NAME_AND_TYPE_I, null, null), 268 new FieldrefConstant(X, NAME_AND_TYPE_L, null, null), 269 new FieldrefConstant(X, NAME_AND_TYPE_F, null, null), 270 new FieldrefConstant(X, NAME_AND_TYPE_D, null, null), 271 272 new MethodrefConstant(CLASS_STRING, NAME_AND_TYPE_EQUALS, null, null), 273 new MethodrefConstant(CLASS_STRING, NAME_AND_TYPE_LENGTH, null, null), 274 new MethodrefConstant(CLASS_STRING, NAME_AND_TYPE_VALUEOF_Z, null, null), 275 new MethodrefConstant(CLASS_STRING, NAME_AND_TYPE_VALUEOF_C, null, null), 276 new MethodrefConstant(CLASS_STRING, NAME_AND_TYPE_VALUEOF_I, null, null), 277 new MethodrefConstant(CLASS_STRING, NAME_AND_TYPE_VALUEOF_J, null, null), 278 new MethodrefConstant(CLASS_STRING, NAME_AND_TYPE_VALUEOF_F, null, null), 279 new MethodrefConstant(CLASS_STRING, NAME_AND_TYPE_VALUEOF_D, null, null), 280 new MethodrefConstant(CLASS_STRING, NAME_AND_TYPE_VALUEOF_OBJECT, null, null), 281 new MethodrefConstant(CLASS_STRINGBUFFER, NAME_AND_TYPE_INIT, null, null), 282 new MethodrefConstant(CLASS_STRINGBUFFER, NAME_AND_TYPE_INIT_STRING, null, null), 283 new MethodrefConstant(CLASS_STRINGBUFFER, NAME_AND_TYPE_APPEND_Z_STRINGBUFFER, null, null), 284 new MethodrefConstant(CLASS_STRINGBUFFER, NAME_AND_TYPE_APPEND_C_STRINGBUFFER, null, null), 285 new MethodrefConstant(CLASS_STRINGBUFFER, NAME_AND_TYPE_APPEND_I_STRINGBUFFER, null, null), 286 new MethodrefConstant(CLASS_STRINGBUFFER, NAME_AND_TYPE_APPEND_J_STRINGBUFFER, null, null), 287 new MethodrefConstant(CLASS_STRINGBUFFER, NAME_AND_TYPE_APPEND_F_STRINGBUFFER, null, null), 288 new MethodrefConstant(CLASS_STRINGBUFFER, NAME_AND_TYPE_APPEND_D_STRINGBUFFER, null, null), 289 new MethodrefConstant(CLASS_STRINGBUFFER, NAME_AND_TYPE_APPEND_STRING_STRINGBUFFER, null, null), 290 new MethodrefConstant(CLASS_STRINGBUFFER, NAME_AND_TYPE_APPEND_OBJECT_STRINGBUFFER, null, null), 291 new MethodrefConstant(CLASS_STRINGBUFFER, NAME_AND_TYPE_LENGTH, null, null), 292 new MethodrefConstant(CLASS_STRINGBUFFER, NAME_AND_TYPE_TOSTRING, null, null), 293 new MethodrefConstant(CLASS_STRINGBUILDER, NAME_AND_TYPE_INIT, null, null), 294 new MethodrefConstant(CLASS_STRINGBUILDER, NAME_AND_TYPE_INIT_STRING, null, null), 295 new MethodrefConstant(CLASS_STRINGBUILDER, NAME_AND_TYPE_APPEND_Z_STRINGBUILDER, null, null), 296 new MethodrefConstant(CLASS_STRINGBUILDER, NAME_AND_TYPE_APPEND_C_STRINGBUILDER, null, null), 297 new MethodrefConstant(CLASS_STRINGBUILDER, NAME_AND_TYPE_APPEND_I_STRINGBUILDER, null, null), 298 new MethodrefConstant(CLASS_STRINGBUILDER, NAME_AND_TYPE_APPEND_J_STRINGBUILDER, null, null), 299 new MethodrefConstant(CLASS_STRINGBUILDER, NAME_AND_TYPE_APPEND_F_STRINGBUILDER, null, null), 300 new MethodrefConstant(CLASS_STRINGBUILDER, NAME_AND_TYPE_APPEND_D_STRINGBUILDER, null, null), 301 new MethodrefConstant(CLASS_STRINGBUILDER, NAME_AND_TYPE_APPEND_STRING_STRINGBUILDER, null, null), 302 new MethodrefConstant(CLASS_STRINGBUILDER, NAME_AND_TYPE_APPEND_OBJECT_STRINGBUILDER, null, null), 303 new MethodrefConstant(CLASS_STRINGBUILDER, NAME_AND_TYPE_LENGTH, null, null), 304 new MethodrefConstant(CLASS_STRINGBUILDER, NAME_AND_TYPE_TOSTRING, null, null), 305 306 new ClassConstant(UTF8_STRING, null), 307 new ClassConstant(UTF8_STRINGBUFFER, null), 308 new ClassConstant(UTF8_STRINGBUILDER, null), 309 310 new NameAndTypeConstant(Y, UTF8_I), 311 new NameAndTypeConstant(Y, UTF8_L), 312 new NameAndTypeConstant(Y, UTF8_F), 313 new NameAndTypeConstant(Y, UTF8_D), 314 new NameAndTypeConstant(UTF8_EQUALS, UTF8_OBJECT_Z), 315 new NameAndTypeConstant(UTF8_LENGTH, UTF8__I), 316 new NameAndTypeConstant(UTF8_VALUEOF, UTF8_Z_STRING), 317 new NameAndTypeConstant(UTF8_VALUEOF, UTF8_C_STRING), 318 new NameAndTypeConstant(UTF8_VALUEOF, UTF8_I_STRING), 319 new NameAndTypeConstant(UTF8_VALUEOF, UTF8_J_STRING), 320 new NameAndTypeConstant(UTF8_VALUEOF, UTF8_F_STRING), 321 new NameAndTypeConstant(UTF8_VALUEOF, UTF8_D_STRING), 322 new NameAndTypeConstant(UTF8_VALUEOF, UTF8_OBJECT_STRING), 323 new NameAndTypeConstant(UTF8_INIT, UTF8__VOID), 324 new NameAndTypeConstant(UTF8_INIT, UTF8_STRING_VOID), 325 new NameAndTypeConstant(UTF8_APPEND, UTF8_Z_STRINGBUFFER), 326 new NameAndTypeConstant(UTF8_APPEND, UTF8_C_STRINGBUFFER), 327 new NameAndTypeConstant(UTF8_APPEND, UTF8_I_STRINGBUFFER), 328 new NameAndTypeConstant(UTF8_APPEND, UTF8_J_STRINGBUFFER), 329 new NameAndTypeConstant(UTF8_APPEND, UTF8_F_STRINGBUFFER), 330 new NameAndTypeConstant(UTF8_APPEND, UTF8_D_STRINGBUFFER), 331 new NameAndTypeConstant(UTF8_APPEND, UTF8_STRING_STRINGBUFFER), 332 new NameAndTypeConstant(UTF8_APPEND, UTF8_OBJECT_STRINGBUFFER), 333 new NameAndTypeConstant(UTF8_APPEND, UTF8_Z_STRINGBUILDER), 334 new NameAndTypeConstant(UTF8_APPEND, UTF8_C_STRINGBUILDER), 335 new NameAndTypeConstant(UTF8_APPEND, UTF8_I_STRINGBUILDER), 336 new NameAndTypeConstant(UTF8_APPEND, UTF8_J_STRINGBUILDER), 337 new NameAndTypeConstant(UTF8_APPEND, UTF8_F_STRINGBUILDER), 338 new NameAndTypeConstant(UTF8_APPEND, UTF8_D_STRINGBUILDER), 339 new NameAndTypeConstant(UTF8_APPEND, UTF8_STRING_STRINGBUILDER), 340 new NameAndTypeConstant(UTF8_APPEND, UTF8_OBJECT_STRINGBUILDER), 341 new NameAndTypeConstant(UTF8_TOSTRING, UTF8__STRING), 342 343 new Utf8Constant(""), 344 new Utf8Constant("I"), 345 new Utf8Constant("J"), 346 new Utf8Constant("F"), 347 new Utf8Constant("D"), 348 new Utf8Constant(ClassConstants.NAME_JAVA_LANG_STRING), 349 new Utf8Constant(ClassConstants.NAME_JAVA_LANG_STRING_BUFFER), 350 new Utf8Constant(ClassConstants.NAME_JAVA_LANG_STRING_BUILDER), 351 new Utf8Constant(ClassConstants.METHOD_NAME_EQUALS), 352 new Utf8Constant(ClassConstants.METHOD_TYPE_EQUALS), 353 new Utf8Constant(ClassConstants.METHOD_NAME_LENGTH), 354 new Utf8Constant(ClassConstants.METHOD_TYPE_LENGTH), 355 new Utf8Constant(ClassConstants.METHOD_NAME_VALUEOF), 356 new Utf8Constant(ClassConstants.METHOD_TYPE_VALUEOF_BOOLEAN), 357 new Utf8Constant(ClassConstants.METHOD_TYPE_VALUEOF_CHAR), 358 new Utf8Constant(ClassConstants.METHOD_TYPE_VALUEOF_INT), 359 new Utf8Constant(ClassConstants.METHOD_TYPE_VALUEOF_LONG), 360 new Utf8Constant(ClassConstants.METHOD_TYPE_VALUEOF_FLOAT), 361 new Utf8Constant(ClassConstants.METHOD_TYPE_VALUEOF_DOUBLE), 362 new Utf8Constant(ClassConstants.METHOD_TYPE_VALUEOF_OBJECT), 363 new Utf8Constant(ClassConstants.METHOD_NAME_INIT), 364 new Utf8Constant(ClassConstants.METHOD_TYPE_INIT), 365 new Utf8Constant(ClassConstants.METHOD_TYPE_STRING_VOID), 366 new Utf8Constant(ClassConstants.METHOD_NAME_TOSTRING), 367 new Utf8Constant(ClassConstants.METHOD_TYPE_TOSTRING), 368 new Utf8Constant(ClassConstants.METHOD_NAME_APPEND), 369 new Utf8Constant(ClassConstants.METHOD_TYPE_BOOLEAN_STRING_BUFFER), 370 new Utf8Constant(ClassConstants.METHOD_TYPE_CHAR_STRING_BUFFER), 371 new Utf8Constant(ClassConstants.METHOD_TYPE_INT_STRING_BUFFER), 372 new Utf8Constant(ClassConstants.METHOD_TYPE_LONG_STRING_BUFFER), 373 new Utf8Constant(ClassConstants.METHOD_TYPE_FLOAT_STRING_BUFFER), 374 new Utf8Constant(ClassConstants.METHOD_TYPE_DOUBLE_STRING_BUFFER), 375 new Utf8Constant(ClassConstants.METHOD_TYPE_STRING_STRING_BUFFER), 376 new Utf8Constant(ClassConstants.METHOD_TYPE_OBJECT_STRING_BUFFER), 377 new Utf8Constant(ClassConstants.METHOD_TYPE_BOOLEAN_STRING_BUILDER), 378 new Utf8Constant(ClassConstants.METHOD_TYPE_CHAR_STRING_BUILDER), 379 new Utf8Constant(ClassConstants.METHOD_TYPE_INT_STRING_BUILDER), 380 new Utf8Constant(ClassConstants.METHOD_TYPE_LONG_STRING_BUILDER), 381 new Utf8Constant(ClassConstants.METHOD_TYPE_FLOAT_STRING_BUILDER), 382 new Utf8Constant(ClassConstants.METHOD_TYPE_DOUBLE_STRING_BUILDER), 383 new Utf8Constant(ClassConstants.METHOD_TYPE_STRING_STRING_BUILDER), 384 new Utf8Constant(ClassConstants.METHOD_TYPE_OBJECT_STRING_BUILDER), 385 }; 386 387 public static final Instruction[][][] VARIABLE = new Instruction[][][] 388 { 389 { // nop = nothing 390 { 391 new SimpleInstruction(InstructionConstants.OP_NOP), 392 },{ 393 // Nothing. 394 }, 395 }, 396 { // iload/pop = nothing 397 { 398 new VariableInstruction(InstructionConstants.OP_ILOAD, X), 399 new SimpleInstruction(InstructionConstants.OP_POP), 400 },{ 401 // Nothing. 402 }, 403 }, 404 { // lload/pop2 = nothing 405 { 406 new VariableInstruction(InstructionConstants.OP_LLOAD, X), 407 new SimpleInstruction(InstructionConstants.OP_POP2), 408 },{ 409 // Nothing. 410 }, 411 }, 412 { // fload/pop = nothing 413 { 414 new VariableInstruction(InstructionConstants.OP_FLOAD, X), 415 new SimpleInstruction(InstructionConstants.OP_POP), 416 },{ 417 // Nothing. 418 }, 419 }, 420 { // dload/pop2 = nothing 421 { 422 new VariableInstruction(InstructionConstants.OP_DLOAD, X), 423 new SimpleInstruction(InstructionConstants.OP_POP2), 424 },{ 425 // Nothing. 426 }, 427 }, 428 { // aload/pop = nothing 429 { 430 new VariableInstruction(InstructionConstants.OP_ALOAD, X), 431 new SimpleInstruction(InstructionConstants.OP_POP), 432 },{ 433 // Nothing. 434 }, 435 }, 436 { // i = i = nothing 437 { 438 new VariableInstruction(InstructionConstants.OP_ILOAD, X), 439 new VariableInstruction(InstructionConstants.OP_ISTORE, X), 440 },{ 441 // Nothing. 442 }, 443 }, 444 { // l = l = nothing 445 { 446 new VariableInstruction(InstructionConstants.OP_LLOAD, X), 447 new VariableInstruction(InstructionConstants.OP_LSTORE, X), 448 },{ 449 // Nothing. 450 }, 451 }, 452 { // f = f = nothing 453 { 454 new VariableInstruction(InstructionConstants.OP_FLOAD, X), 455 new VariableInstruction(InstructionConstants.OP_FSTORE, X), 456 },{ 457 // Nothing. 458 }, 459 }, 460 { // d = d = nothing 461 { 462 new VariableInstruction(InstructionConstants.OP_DLOAD, X), 463 new VariableInstruction(InstructionConstants.OP_DSTORE, X), 464 },{ 465 // Nothing. 466 }, 467 }, 468 { // a = a = nothing 469 { 470 new VariableInstruction(InstructionConstants.OP_ALOAD, X), 471 new VariableInstruction(InstructionConstants.OP_ASTORE, X), 472 },{ 473 // Nothing. 474 }, 475 }, 476 { // istore/istore = pop/istore 477 { 478 new VariableInstruction(InstructionConstants.OP_ISTORE, X), 479 new VariableInstruction(InstructionConstants.OP_ISTORE, X), 480 },{ 481 new SimpleInstruction(InstructionConstants.OP_POP), 482 new VariableInstruction(InstructionConstants.OP_ISTORE, X), 483 }, 484 }, 485 { // lstore/lstore = pop2/lstore 486 { 487 new VariableInstruction(InstructionConstants.OP_LSTORE, X), 488 new VariableInstruction(InstructionConstants.OP_LSTORE, X), 489 },{ 490 new SimpleInstruction(InstructionConstants.OP_POP2), 491 new VariableInstruction(InstructionConstants.OP_LSTORE, X), 492 }, 493 }, 494 { // fstore/fstore = pop/fstore 495 { 496 new VariableInstruction(InstructionConstants.OP_FSTORE, X), 497 new VariableInstruction(InstructionConstants.OP_FSTORE, X), 498 },{ 499 new SimpleInstruction(InstructionConstants.OP_POP), 500 new VariableInstruction(InstructionConstants.OP_FSTORE, X), 501 }, 502 }, 503 { // dstore/dstore = pop2/dstore 504 { 505 new VariableInstruction(InstructionConstants.OP_DSTORE, X), 506 new VariableInstruction(InstructionConstants.OP_DSTORE, X), 507 },{ 508 new SimpleInstruction(InstructionConstants.OP_POP2), 509 new VariableInstruction(InstructionConstants.OP_DSTORE, X), 510 }, 511 }, 512 { // astore/astore = pop/astore 513 { 514 new VariableInstruction(InstructionConstants.OP_ASTORE, X), 515 new VariableInstruction(InstructionConstants.OP_ASTORE, X), 516 },{ 517 new SimpleInstruction(InstructionConstants.OP_POP), 518 new VariableInstruction(InstructionConstants.OP_ASTORE, X), 519 }, 520 }, 521 { // istore/iload = dup/istore 522 { 523 new VariableInstruction(InstructionConstants.OP_ISTORE, X), 524 new VariableInstruction(InstructionConstants.OP_ILOAD, X), 525 },{ 526 new SimpleInstruction(InstructionConstants.OP_DUP), 527 new VariableInstruction(InstructionConstants.OP_ISTORE, X), 528 }, 529 }, 530 { // lstore/lload = dup2/lstore 531 { 532 new VariableInstruction(InstructionConstants.OP_LSTORE, X), 533 new VariableInstruction(InstructionConstants.OP_LLOAD, X), 534 },{ 535 new SimpleInstruction(InstructionConstants.OP_DUP2), 536 new VariableInstruction(InstructionConstants.OP_LSTORE, X), 537 }, 538 }, 539 { // fstore/fload = dup/fstore 540 { 541 new VariableInstruction(InstructionConstants.OP_FSTORE, X), 542 new VariableInstruction(InstructionConstants.OP_FLOAD, X), 543 },{ 544 new SimpleInstruction(InstructionConstants.OP_DUP), 545 new VariableInstruction(InstructionConstants.OP_FSTORE, X), 546 }, 547 }, 548 { // dstore/dload = dup2/dstore 549 { 550 new VariableInstruction(InstructionConstants.OP_DSTORE, X), 551 new VariableInstruction(InstructionConstants.OP_DLOAD, X), 552 },{ 553 new SimpleInstruction(InstructionConstants.OP_DUP2), 554 new VariableInstruction(InstructionConstants.OP_DSTORE, X), 555 }, 556 }, 557 { // astore/aload = dup/astore 558 { 559 new VariableInstruction(InstructionConstants.OP_ASTORE, X), 560 new VariableInstruction(InstructionConstants.OP_ALOAD, X), 561 },{ 562 new SimpleInstruction(InstructionConstants.OP_DUP), 563 new VariableInstruction(InstructionConstants.OP_ASTORE, X), 564 }, 565 }, 566 }; 567 568 public static final Instruction[][][] ARITHMETIC = new Instruction[][][] 569 { 570 { // c + i = i + c 571 { 572 new SimpleInstruction(InstructionConstants.OP_ICONST_0, A), 573 new VariableInstruction(InstructionConstants.OP_ILOAD, X), 574 new SimpleInstruction(InstructionConstants.OP_IADD), 575 },{ 576 new VariableInstruction(InstructionConstants.OP_ILOAD, X), 577 new SimpleInstruction(InstructionConstants.OP_ICONST_0, A), 578 new SimpleInstruction(InstructionConstants.OP_IADD), 579 }, 580 }, 581 { // b + i = i + b 582 { 583 new SimpleInstruction(InstructionConstants.OP_BIPUSH, A), 584 new VariableInstruction(InstructionConstants.OP_ILOAD, X), 585 new SimpleInstruction(InstructionConstants.OP_IADD), 586 },{ 587 new VariableInstruction(InstructionConstants.OP_ILOAD, X), 588 new SimpleInstruction(InstructionConstants.OP_BIPUSH, A), 589 new SimpleInstruction(InstructionConstants.OP_IADD), 590 }, 591 }, 592 { // s + i = i + s 593 { 594 new SimpleInstruction(InstructionConstants.OP_SIPUSH, A), 595 new VariableInstruction(InstructionConstants.OP_ILOAD, X), 596 new SimpleInstruction(InstructionConstants.OP_IADD), 597 },{ 598 new VariableInstruction(InstructionConstants.OP_ILOAD, X), 599 new SimpleInstruction(InstructionConstants.OP_SIPUSH, A), 600 new SimpleInstruction(InstructionConstants.OP_IADD), 601 }, 602 }, 603 { // c + i = i + c 604 { 605 new ConstantInstruction(InstructionConstants.OP_LDC, A), 606 new VariableInstruction(InstructionConstants.OP_ILOAD, X), 607 new SimpleInstruction(InstructionConstants.OP_IADD), 608 },{ 609 new VariableInstruction(InstructionConstants.OP_ILOAD, X), 610 new ConstantInstruction(InstructionConstants.OP_LDC, A), 611 new SimpleInstruction(InstructionConstants.OP_IADD), 612 }, 613 }, 614 { // c * i = i * c 615 { 616 new SimpleInstruction(InstructionConstants.OP_SIPUSH, A), 617 new VariableInstruction(InstructionConstants.OP_ILOAD, X), 618 new SimpleInstruction(InstructionConstants.OP_IMUL), 619 },{ 620 new VariableInstruction(InstructionConstants.OP_ILOAD, X), 621 new SimpleInstruction(InstructionConstants.OP_SIPUSH, A), 622 new SimpleInstruction(InstructionConstants.OP_IMUL), 623 }, 624 }, 625 { // b * i = i * b 626 { 627 new SimpleInstruction(InstructionConstants.OP_BIPUSH, A), 628 new VariableInstruction(InstructionConstants.OP_ILOAD, X), 629 new SimpleInstruction(InstructionConstants.OP_IMUL), 630 },{ 631 new VariableInstruction(InstructionConstants.OP_ILOAD, X), 632 new SimpleInstruction(InstructionConstants.OP_BIPUSH, A), 633 new SimpleInstruction(InstructionConstants.OP_IMUL), 634 }, 635 }, 636 { // s * i = i * s 637 { 638 new SimpleInstruction(InstructionConstants.OP_SIPUSH, A), 639 new VariableInstruction(InstructionConstants.OP_ILOAD, X), 640 new SimpleInstruction(InstructionConstants.OP_IMUL), 641 },{ 642 new VariableInstruction(InstructionConstants.OP_ILOAD, X), 643 new SimpleInstruction(InstructionConstants.OP_SIPUSH, A), 644 new SimpleInstruction(InstructionConstants.OP_IMUL), 645 }, 646 }, 647 { // c * i = i * c 648 { 649 new ConstantInstruction(InstructionConstants.OP_LDC, A), 650 new VariableInstruction(InstructionConstants.OP_ILOAD, X), 651 new SimpleInstruction(InstructionConstants.OP_IMUL), 652 },{ 653 new VariableInstruction(InstructionConstants.OP_ILOAD, X), 654 new ConstantInstruction(InstructionConstants.OP_LDC, A), 655 new SimpleInstruction(InstructionConstants.OP_IMUL), 656 }, 657 }, 658 { // c + l = l + c 659 { 660 new SimpleInstruction(InstructionConstants.OP_LCONST_0, A), 661 new VariableInstruction(InstructionConstants.OP_LLOAD, X), 662 new SimpleInstruction(InstructionConstants.OP_LADD), 663 },{ 664 new VariableInstruction(InstructionConstants.OP_LLOAD, X), 665 new SimpleInstruction(InstructionConstants.OP_LCONST_0, A), 666 new SimpleInstruction(InstructionConstants.OP_LADD), 667 }, 668 }, 669 { // c + l = l + c 670 { 671 new ConstantInstruction(InstructionConstants.OP_LDC2_W, A), 672 new VariableInstruction(InstructionConstants.OP_LLOAD, X), 673 new SimpleInstruction(InstructionConstants.OP_LADD), 674 },{ 675 new VariableInstruction(InstructionConstants.OP_LLOAD, X), 676 new ConstantInstruction(InstructionConstants.OP_LDC2_W, A), 677 new SimpleInstruction(InstructionConstants.OP_LADD), 678 }, 679 }, 680 { // c * l = l * c 681 { 682 new SimpleInstruction(InstructionConstants.OP_LCONST_0, A), 683 new VariableInstruction(InstructionConstants.OP_LLOAD, X), 684 new SimpleInstruction(InstructionConstants.OP_LMUL), 685 },{ 686 new VariableInstruction(InstructionConstants.OP_LLOAD, X), 687 new SimpleInstruction(InstructionConstants.OP_LCONST_0, A), 688 new SimpleInstruction(InstructionConstants.OP_LMUL), 689 }, 690 }, 691 { // c + f = f + c 692 { 693 new SimpleInstruction(InstructionConstants.OP_FCONST_0, A), 694 new VariableInstruction(InstructionConstants.OP_FLOAD, X), 695 new SimpleInstruction(InstructionConstants.OP_FADD), 696 },{ 697 new VariableInstruction(InstructionConstants.OP_FLOAD, X), 698 new SimpleInstruction(InstructionConstants.OP_FCONST_0, A), 699 new SimpleInstruction(InstructionConstants.OP_FADD), 700 }, 701 }, 702 { // c + f = f + c 703 { 704 new ConstantInstruction(InstructionConstants.OP_LDC, A), 705 new VariableInstruction(InstructionConstants.OP_FLOAD, X), 706 new SimpleInstruction(InstructionConstants.OP_FADD), 707 },{ 708 new VariableInstruction(InstructionConstants.OP_FLOAD, X), 709 new ConstantInstruction(InstructionConstants.OP_LDC, A), 710 new SimpleInstruction(InstructionConstants.OP_FADD), 711 }, 712 }, 713 { // c * f = f * c 714 { 715 new SimpleInstruction(InstructionConstants.OP_FCONST_0, A), 716 new VariableInstruction(InstructionConstants.OP_FLOAD, X), 717 new SimpleInstruction(InstructionConstants.OP_FMUL), 718 },{ 719 new VariableInstruction(InstructionConstants.OP_FLOAD, X), 720 new SimpleInstruction(InstructionConstants.OP_FCONST_0, A), 721 new SimpleInstruction(InstructionConstants.OP_FMUL), 722 }, 723 }, 724 { // c * f = f * c 725 { 726 new ConstantInstruction(InstructionConstants.OP_LDC, A), 727 new VariableInstruction(InstructionConstants.OP_FLOAD, X), 728 new SimpleInstruction(InstructionConstants.OP_LMUL), 729 },{ 730 new VariableInstruction(InstructionConstants.OP_FLOAD, X), 731 new ConstantInstruction(InstructionConstants.OP_LDC, A), 732 new SimpleInstruction(InstructionConstants.OP_LMUL), 733 }, 734 }, 735 { // c + d = d + c 736 { 737 new SimpleInstruction(InstructionConstants.OP_DCONST_0, A), 738 new VariableInstruction(InstructionConstants.OP_DLOAD, X), 739 new SimpleInstruction(InstructionConstants.OP_DADD), 740 },{ 741 new VariableInstruction(InstructionConstants.OP_DLOAD, X), 742 new SimpleInstruction(InstructionConstants.OP_DCONST_0, A), 743 new SimpleInstruction(InstructionConstants.OP_DADD), 744 }, 745 }, 746 { // c + d = d + c 747 { 748 new ConstantInstruction(InstructionConstants.OP_LDC2_W, A), 749 new VariableInstruction(InstructionConstants.OP_DLOAD, X), 750 new SimpleInstruction(InstructionConstants.OP_DADD), 751 },{ 752 new VariableInstruction(InstructionConstants.OP_DLOAD, X), 753 new ConstantInstruction(InstructionConstants.OP_LDC2_W, A), 754 new SimpleInstruction(InstructionConstants.OP_DADD), 755 }, 756 }, 757 { // c * d = d * c 758 { 759 new SimpleInstruction(InstructionConstants.OP_DCONST_0, A), 760 new VariableInstruction(InstructionConstants.OP_DLOAD, X), 761 new SimpleInstruction(InstructionConstants.OP_DMUL), 762 },{ 763 new VariableInstruction(InstructionConstants.OP_DLOAD, X), 764 new SimpleInstruction(InstructionConstants.OP_DCONST_0, A), 765 new SimpleInstruction(InstructionConstants.OP_DMUL), 766 }, 767 }, 768 { // c * d = d * c 769 { 770 new ConstantInstruction(InstructionConstants.OP_LDC2_W, A), 771 new VariableInstruction(InstructionConstants.OP_DLOAD, X), 772 new SimpleInstruction(InstructionConstants.OP_DMUL), 773 },{ 774 new VariableInstruction(InstructionConstants.OP_DLOAD, X), 775 new ConstantInstruction(InstructionConstants.OP_LDC2_W, A), 776 new SimpleInstruction(InstructionConstants.OP_DMUL), 777 }, 778 }, 779 { // i = i + c = i += c 780 { 781 new VariableInstruction(InstructionConstants.OP_ILOAD, X), 782 new SimpleInstruction(InstructionConstants.OP_SIPUSH, A), 783 new SimpleInstruction(InstructionConstants.OP_IADD), 784 new VariableInstruction(InstructionConstants.OP_ISTORE, X), 785 },{ 786 new VariableInstruction(InstructionConstants.OP_IINC, X, A), 787 }, 788 }, 789 { // i = i + b = i += b 790 { 791 new VariableInstruction(InstructionConstants.OP_ILOAD, X), 792 new SimpleInstruction(InstructionConstants.OP_BIPUSH, A), 793 new SimpleInstruction(InstructionConstants.OP_IADD), 794 new VariableInstruction(InstructionConstants.OP_ISTORE, X), 795 },{ 796 new VariableInstruction(InstructionConstants.OP_IINC, X, A), 797 }, 798 }, 799 { // i = i + s = i += s 800 { 801 new VariableInstruction(InstructionConstants.OP_ILOAD, X), 802 new SimpleInstruction(InstructionConstants.OP_SIPUSH, A), 803 new SimpleInstruction(InstructionConstants.OP_IADD), 804 new VariableInstruction(InstructionConstants.OP_ISTORE, X), 805 },{ 806 new VariableInstruction(InstructionConstants.OP_IINC, X, A), 807 }, 808 }, 809 { // i = i - -1 = i++ 810 { 811 new VariableInstruction(InstructionConstants.OP_ILOAD, X), 812 new SimpleInstruction(InstructionConstants.OP_ICONST_M1), 813 new SimpleInstruction(InstructionConstants.OP_ISUB), 814 new VariableInstruction(InstructionConstants.OP_ISTORE, X), 815 },{ 816 new VariableInstruction(InstructionConstants.OP_IINC, X, 1), 817 }, 818 }, 819 { // i = i - 1 = i-- 820 { 821 new VariableInstruction(InstructionConstants.OP_ILOAD, X), 822 new SimpleInstruction(InstructionConstants.OP_ICONST_1), 823 new SimpleInstruction(InstructionConstants.OP_ISUB), 824 new VariableInstruction(InstructionConstants.OP_ISTORE, X), 825 },{ 826 new VariableInstruction(InstructionConstants.OP_IINC, X, -1), 827 }, 828 }, 829 { // i = i - 2 = i -= 2 830 { 831 new VariableInstruction(InstructionConstants.OP_ILOAD, X), 832 new SimpleInstruction(InstructionConstants.OP_ICONST_2), 833 new SimpleInstruction(InstructionConstants.OP_ISUB), 834 new VariableInstruction(InstructionConstants.OP_ISTORE, X), 835 },{ 836 new VariableInstruction(InstructionConstants.OP_IINC, X, -2), 837 }, 838 }, 839 { // i = i - 3 = i -= 3 840 { 841 new VariableInstruction(InstructionConstants.OP_ILOAD, X), 842 new SimpleInstruction(InstructionConstants.OP_ICONST_3), 843 new SimpleInstruction(InstructionConstants.OP_ISUB), 844 new VariableInstruction(InstructionConstants.OP_ISTORE, X), 845 },{ 846 new VariableInstruction(InstructionConstants.OP_IINC, X, -3), 847 }, 848 }, 849 { // i = i - 4 = i -= 4 850 { 851 new VariableInstruction(InstructionConstants.OP_ILOAD, X), 852 new SimpleInstruction(InstructionConstants.OP_ICONST_4), 853 new SimpleInstruction(InstructionConstants.OP_ISUB), 854 new VariableInstruction(InstructionConstants.OP_ISTORE, X), 855 },{ 856 new VariableInstruction(InstructionConstants.OP_IINC, X, -4), 857 }, 858 }, 859 { // i = i - 5 = i -= 5 860 { 861 new VariableInstruction(InstructionConstants.OP_ILOAD, X), 862 new SimpleInstruction(InstructionConstants.OP_ICONST_5), 863 new SimpleInstruction(InstructionConstants.OP_ISUB), 864 new VariableInstruction(InstructionConstants.OP_ISTORE, X), 865 },{ 866 new VariableInstruction(InstructionConstants.OP_IINC, X, -5), 867 }, 868 }, 869 { // ... + 0 = ... 870 { 871 new SimpleInstruction(InstructionConstants.OP_ICONST_0), 872 new SimpleInstruction(InstructionConstants.OP_IADD), 873 },{ 874 // Nothing. 875 }, 876 }, 877 { // ... + 0L = ... 878 { 879 new SimpleInstruction(InstructionConstants.OP_LCONST_0), 880 new SimpleInstruction(InstructionConstants.OP_LADD), 881 },{ 882 // Nothing. 883 }, 884 }, 885 // Not valid for -0.0. 886 // { // ... + 0f = ... 887 // { 888 // new SimpleInstruction(InstructionConstants.OP_FCONST_0), 889 // new SimpleInstruction(InstructionConstants.OP_FADD), 890 // },{ 891 // // Nothing. 892 // }, 893 // }, 894 // { // ... + 0d = ... 895 // { 896 // new SimpleInstruction(InstructionConstants.OP_DCONST_0), 897 // new SimpleInstruction(InstructionConstants.OP_DADD), 898 // },{ 899 // // Nothing. 900 // }, 901 // }, 902 { // ... - 0 = ... 903 { 904 new SimpleInstruction(InstructionConstants.OP_ICONST_0), 905 new SimpleInstruction(InstructionConstants.OP_ISUB), 906 },{ 907 // Nothing. 908 }, 909 }, 910 { // ... - 0L = ... 911 { 912 new SimpleInstruction(InstructionConstants.OP_LCONST_0), 913 new SimpleInstruction(InstructionConstants.OP_LSUB), 914 },{ 915 // Nothing. 916 }, 917 }, 918 { // ... - 0f = ... 919 { 920 new SimpleInstruction(InstructionConstants.OP_FCONST_0), 921 new SimpleInstruction(InstructionConstants.OP_FSUB), 922 },{ 923 // Nothing. 924 }, 925 }, 926 { // ... - 0d = ... 927 { 928 new SimpleInstruction(InstructionConstants.OP_DCONST_0), 929 new SimpleInstruction(InstructionConstants.OP_DSUB), 930 },{ 931 // Nothing. 932 }, 933 }, 934 { // ... * -1 = -... 935 { 936 new SimpleInstruction(InstructionConstants.OP_ICONST_M1), 937 new SimpleInstruction(InstructionConstants.OP_IMUL), 938 },{ 939 new SimpleInstruction(InstructionConstants.OP_INEG), 940 }, 941 }, 942 { // ... * 0 = 0 943 { 944 new SimpleInstruction(InstructionConstants.OP_ICONST_0), 945 new SimpleInstruction(InstructionConstants.OP_IMUL), 946 },{ 947 new SimpleInstruction(InstructionConstants.OP_POP), 948 new SimpleInstruction(InstructionConstants.OP_ICONST_0), 949 }, 950 }, 951 { // ... * 1 = ... 952 { 953 new SimpleInstruction(InstructionConstants.OP_ICONST_1), 954 new SimpleInstruction(InstructionConstants.OP_IMUL), 955 },{ 956 // Nothing. 957 }, 958 }, 959 { // ... * 2 = ... << 1 960 { 961 new SimpleInstruction(InstructionConstants.OP_ICONST_2), 962 new SimpleInstruction(InstructionConstants.OP_IMUL), 963 },{ 964 new SimpleInstruction(InstructionConstants.OP_ICONST_1), 965 new SimpleInstruction(InstructionConstants.OP_ISHL), 966 }, 967 }, 968 { // ... * 4 = ... << 2 969 { 970 new SimpleInstruction(InstructionConstants.OP_ICONST_4), 971 new SimpleInstruction(InstructionConstants.OP_IMUL), 972 },{ 973 new SimpleInstruction(InstructionConstants.OP_ICONST_2), 974 new SimpleInstruction(InstructionConstants.OP_ISHL), 975 }, 976 }, 977 { // ... * 8 = ... << 3 978 { 979 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 8), 980 new SimpleInstruction(InstructionConstants.OP_IMUL), 981 },{ 982 new SimpleInstruction(InstructionConstants.OP_ICONST_3), 983 new SimpleInstruction(InstructionConstants.OP_ISHL), 984 }, 985 }, 986 { // ... * 16 = ... << 4 987 { 988 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 16), 989 new SimpleInstruction(InstructionConstants.OP_IMUL), 990 },{ 991 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 4), 992 new SimpleInstruction(InstructionConstants.OP_ISHL), 993 }, 994 }, 995 { // ... * 32 = ... << 5 996 { 997 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 32), 998 new SimpleInstruction(InstructionConstants.OP_IMUL), 999 },{ 1000 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 5), 1001 new SimpleInstruction(InstructionConstants.OP_ISHL), 1002 }, 1003 }, 1004 { // ... * 64 = ... << 6 1005 { 1006 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 64), 1007 new SimpleInstruction(InstructionConstants.OP_IMUL), 1008 },{ 1009 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 6), 1010 new SimpleInstruction(InstructionConstants.OP_ISHL), 1011 }, 1012 }, 1013 { // ... * 128 = ... << 7 1014 { 1015 new SimpleInstruction(InstructionConstants.OP_SIPUSH, 128), 1016 new SimpleInstruction(InstructionConstants.OP_IMUL), 1017 },{ 1018 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 7), 1019 new SimpleInstruction(InstructionConstants.OP_ISHL), 1020 }, 1021 }, 1022 { // ... * 256 = ... << 8 1023 { 1024 new SimpleInstruction(InstructionConstants.OP_SIPUSH, 256), 1025 new SimpleInstruction(InstructionConstants.OP_IMUL), 1026 },{ 1027 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 8), 1028 new SimpleInstruction(InstructionConstants.OP_ISHL), 1029 }, 1030 }, 1031 { // ... * 512 = ... << 9 1032 { 1033 new SimpleInstruction(InstructionConstants.OP_SIPUSH, 512), 1034 new SimpleInstruction(InstructionConstants.OP_IMUL), 1035 },{ 1036 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 9), 1037 new SimpleInstruction(InstructionConstants.OP_ISHL), 1038 }, 1039 }, 1040 { // ... * 1024 = ... << 10 1041 { 1042 new SimpleInstruction(InstructionConstants.OP_SIPUSH, 1024), 1043 new SimpleInstruction(InstructionConstants.OP_IMUL), 1044 },{ 1045 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 10), 1046 new SimpleInstruction(InstructionConstants.OP_ISHL), 1047 }, 1048 }, 1049 { // ... * 2048 = ... << 11 1050 { 1051 new SimpleInstruction(InstructionConstants.OP_SIPUSH, 2048), 1052 new SimpleInstruction(InstructionConstants.OP_IMUL), 1053 },{ 1054 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 11), 1055 new SimpleInstruction(InstructionConstants.OP_ISHL), 1056 }, 1057 }, 1058 { // ... * 4096 = ... << 12 1059 { 1060 new SimpleInstruction(InstructionConstants.OP_SIPUSH, 4096), 1061 new SimpleInstruction(InstructionConstants.OP_IMUL), 1062 },{ 1063 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 12), 1064 new SimpleInstruction(InstructionConstants.OP_ISHL), 1065 }, 1066 }, 1067 { // ... * 8192 = ... << 13 1068 { 1069 new SimpleInstruction(InstructionConstants.OP_SIPUSH, 8192), 1070 new SimpleInstruction(InstructionConstants.OP_IMUL), 1071 },{ 1072 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 13), 1073 new SimpleInstruction(InstructionConstants.OP_ISHL), 1074 }, 1075 }, 1076 { // ... * 16384 = ... << 14 1077 { 1078 new SimpleInstruction(InstructionConstants.OP_SIPUSH, 16384), 1079 new SimpleInstruction(InstructionConstants.OP_IMUL), 1080 },{ 1081 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 14), 1082 new SimpleInstruction(InstructionConstants.OP_ISHL), 1083 }, 1084 }, 1085 { // ... * 32768 = ... << 15 1086 { 1087 new ConstantInstruction(InstructionConstants.OP_LDC, I_32768), 1088 new SimpleInstruction(InstructionConstants.OP_IMUL), 1089 },{ 1090 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 15), 1091 new SimpleInstruction(InstructionConstants.OP_ISHL), 1092 }, 1093 }, 1094 { // ... * 65536 = ... << 16 1095 { 1096 new ConstantInstruction(InstructionConstants.OP_LDC, I_65536), 1097 new SimpleInstruction(InstructionConstants.OP_IMUL), 1098 },{ 1099 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 16), 1100 new SimpleInstruction(InstructionConstants.OP_ISHL), 1101 }, 1102 }, 1103 { // ... * 16777216 = ... << 24 1104 { 1105 new ConstantInstruction(InstructionConstants.OP_LDC, I_16777216), 1106 new SimpleInstruction(InstructionConstants.OP_IMUL), 1107 },{ 1108 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 24), 1109 new SimpleInstruction(InstructionConstants.OP_ISHL), 1110 }, 1111 }, 1112 { // ... * -1L = -... 1113 { 1114 new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_M1), 1115 new SimpleInstruction(InstructionConstants.OP_LMUL), 1116 },{ 1117 new SimpleInstruction(InstructionConstants.OP_LNEG), 1118 }, 1119 }, 1120 { // ... * 0L = 0L 1121 { 1122 new SimpleInstruction(InstructionConstants.OP_LCONST_0), 1123 new SimpleInstruction(InstructionConstants.OP_LMUL), 1124 },{ 1125 new SimpleInstruction(InstructionConstants.OP_POP2), 1126 new SimpleInstruction(InstructionConstants.OP_LCONST_0), 1127 }, 1128 }, 1129 { // ... * 1L = ... 1130 { 1131 new SimpleInstruction(InstructionConstants.OP_LCONST_1), 1132 new SimpleInstruction(InstructionConstants.OP_LMUL), 1133 },{ 1134 // Nothing. 1135 }, 1136 }, 1137 { // ... * 2L = ... << 1 1138 { 1139 new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_2), 1140 new SimpleInstruction(InstructionConstants.OP_LMUL), 1141 },{ 1142 new SimpleInstruction(InstructionConstants.OP_ICONST_1), 1143 new SimpleInstruction(InstructionConstants.OP_LSHL), 1144 }, 1145 }, 1146 { // ... * 4L = ... << 2 1147 { 1148 new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_4), 1149 new SimpleInstruction(InstructionConstants.OP_LMUL), 1150 },{ 1151 new SimpleInstruction(InstructionConstants.OP_ICONST_2), 1152 new SimpleInstruction(InstructionConstants.OP_LSHL), 1153 }, 1154 }, 1155 { // ... * 8L = ... << 3 1156 { 1157 new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_8), 1158 new SimpleInstruction(InstructionConstants.OP_LMUL), 1159 },{ 1160 new SimpleInstruction(InstructionConstants.OP_ICONST_3), 1161 new SimpleInstruction(InstructionConstants.OP_LSHL), 1162 }, 1163 }, 1164 { // ... * 16L = ... << 4 1165 { 1166 new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_16), 1167 new SimpleInstruction(InstructionConstants.OP_LMUL), 1168 },{ 1169 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 4), 1170 new SimpleInstruction(InstructionConstants.OP_LSHL), 1171 }, 1172 }, 1173 { // ... * 32L = ... << 5 1174 { 1175 new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_32), 1176 new SimpleInstruction(InstructionConstants.OP_LMUL), 1177 },{ 1178 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 5), 1179 new SimpleInstruction(InstructionConstants.OP_LSHL), 1180 }, 1181 }, 1182 { // ... * 64L = ... << 6 1183 { 1184 new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_64), 1185 new SimpleInstruction(InstructionConstants.OP_LMUL), 1186 },{ 1187 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 6), 1188 new SimpleInstruction(InstructionConstants.OP_LSHL), 1189 }, 1190 }, 1191 { // ... * 128L = ... << 7 1192 { 1193 new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_128), 1194 new SimpleInstruction(InstructionConstants.OP_LMUL), 1195 },{ 1196 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 7), 1197 new SimpleInstruction(InstructionConstants.OP_LSHL), 1198 }, 1199 }, 1200 { // ... * 256L = ... << 8 1201 { 1202 new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_256), 1203 new SimpleInstruction(InstructionConstants.OP_LMUL), 1204 },{ 1205 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 8), 1206 new SimpleInstruction(InstructionConstants.OP_LSHL), 1207 }, 1208 }, 1209 { // ... * 512L = ... << 9 1210 { 1211 new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_512), 1212 new SimpleInstruction(InstructionConstants.OP_LMUL), 1213 },{ 1214 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 9), 1215 new SimpleInstruction(InstructionConstants.OP_LSHL), 1216 }, 1217 }, 1218 { // ... * 1024L = ... << 10 1219 { 1220 new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_1024), 1221 new SimpleInstruction(InstructionConstants.OP_LMUL), 1222 },{ 1223 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 10), 1224 new SimpleInstruction(InstructionConstants.OP_LSHL), 1225 }, 1226 }, 1227 { // ... * 2048L = ... << 11 1228 { 1229 new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_2048), 1230 new SimpleInstruction(InstructionConstants.OP_LMUL), 1231 },{ 1232 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 11), 1233 new SimpleInstruction(InstructionConstants.OP_LSHL), 1234 }, 1235 }, 1236 { // ... * 4096L = ... << 12 1237 { 1238 new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_4096), 1239 new SimpleInstruction(InstructionConstants.OP_LMUL), 1240 },{ 1241 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 12), 1242 new SimpleInstruction(InstructionConstants.OP_LSHL), 1243 }, 1244 }, 1245 { // ... * 8192L = ... << 13 1246 { 1247 new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_8192), 1248 new SimpleInstruction(InstructionConstants.OP_LMUL), 1249 },{ 1250 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 13), 1251 new SimpleInstruction(InstructionConstants.OP_LSHL), 1252 }, 1253 }, 1254 { // ... * 16384L = ... << 14 1255 { 1256 new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_16384), 1257 new SimpleInstruction(InstructionConstants.OP_LMUL), 1258 },{ 1259 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 14), 1260 new SimpleInstruction(InstructionConstants.OP_LSHL), 1261 }, 1262 }, 1263 { // ... * 32768L = ... << 15 1264 { 1265 new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_32768), 1266 new SimpleInstruction(InstructionConstants.OP_LMUL), 1267 },{ 1268 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 15), 1269 new SimpleInstruction(InstructionConstants.OP_LSHL), 1270 }, 1271 }, 1272 { // ... * 65536LL = ... << 16 1273 { 1274 new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_65536), 1275 new SimpleInstruction(InstructionConstants.OP_LMUL), 1276 },{ 1277 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 16), 1278 new SimpleInstruction(InstructionConstants.OP_LSHL), 1279 }, 1280 }, 1281 { // ... * 16777216L = ... << 24 1282 { 1283 new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_16777216), 1284 new SimpleInstruction(InstructionConstants.OP_LMUL), 1285 },{ 1286 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 24), 1287 new SimpleInstruction(InstructionConstants.OP_LSHL), 1288 }, 1289 }, 1290 { // ... * 4294967296L = ... << 32 1291 { 1292 new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_4294967296), 1293 new SimpleInstruction(InstructionConstants.OP_LMUL), 1294 },{ 1295 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 32), 1296 new SimpleInstruction(InstructionConstants.OP_LSHL), 1297 }, 1298 }, 1299 { // ... * -1f = -... 1300 { 1301 new ConstantInstruction(InstructionConstants.OP_LDC, F_M1), 1302 new SimpleInstruction(InstructionConstants.OP_FMUL), 1303 },{ 1304 new SimpleInstruction(InstructionConstants.OP_FNEG), 1305 }, 1306 }, 1307 // Not valid for -0.0 and for NaN. 1308 // { // ... * 0f = 0f 1309 // { 1310 // new SimpleInstruction(InstructionConstants.OP_FCONST_0), 1311 // new SimpleInstruction(InstructionConstants.OP_FMUL), 1312 // },{ 1313 // new SimpleInstruction(InstructionConstants.OP_POP), 1314 // new SimpleInstruction(InstructionConstants.OP_FCONST_0), 1315 // }, 1316 // }, 1317 { // ... * 1f = ... 1318 { 1319 new SimpleInstruction(InstructionConstants.OP_FCONST_1), 1320 new SimpleInstruction(InstructionConstants.OP_FMUL), 1321 },{ 1322 // Nothing. 1323 }, 1324 }, 1325 { // ... * -1d = -... 1326 { 1327 new ConstantInstruction(InstructionConstants.OP_LDC2_W, D_M1), 1328 new SimpleInstruction(InstructionConstants.OP_DMUL), 1329 },{ 1330 new SimpleInstruction(InstructionConstants.OP_DNEG), 1331 }, 1332 }, 1333 // Not valid for -0.0 and for NaN. 1334 // { // ... * 0d = 0d 1335 // { 1336 // new SimpleInstruction(InstructionConstants.OP_DCONST_0), 1337 // new SimpleInstruction(InstructionConstants.OP_DMUL), 1338 // },{ 1339 // new SimpleInstruction(InstructionConstants.OP_POP2), 1340 // new SimpleInstruction(InstructionConstants.OP_DCONST_0), 1341 // }, 1342 // }, 1343 { // ... * 1d = ... 1344 { 1345 new SimpleInstruction(InstructionConstants.OP_DCONST_1), 1346 new SimpleInstruction(InstructionConstants.OP_DMUL), 1347 },{ 1348 // Nothing. 1349 }, 1350 }, 1351 { // ... / -1 = -... 1352 { 1353 new SimpleInstruction(InstructionConstants.OP_ICONST_M1), 1354 new SimpleInstruction(InstructionConstants.OP_IDIV), 1355 },{ 1356 new SimpleInstruction(InstructionConstants.OP_INEG), 1357 }, 1358 }, 1359 { // ... / 1 = ... 1360 { 1361 new SimpleInstruction(InstructionConstants.OP_ICONST_1), 1362 new SimpleInstruction(InstructionConstants.OP_IDIV), 1363 },{ 1364 // Nothing. 1365 }, 1366 }, 1367 // Not valid for negative values. 1368 // { // ... / 2 = ... >> 1 1369 // { 1370 // new SimpleInstruction(InstructionConstants.OP_ICONST_2), 1371 // new SimpleInstruction(InstructionConstants.OP_IDIV), 1372 // },{ 1373 // new SimpleInstruction(InstructionConstants.OP_ICONST_1), 1374 // new SimpleInstruction(InstructionConstants.OP_ISHR), 1375 // }, 1376 // }, 1377 // { // ... / 4 = ... >> 2 1378 // { 1379 // new SimpleInstruction(InstructionConstants.OP_ICONST_4), 1380 // new SimpleInstruction(InstructionConstants.OP_IDIV), 1381 // },{ 1382 // new SimpleInstruction(InstructionConstants.OP_ICONST_2), 1383 // new SimpleInstruction(InstructionConstants.OP_ISHR), 1384 // }, 1385 // }, 1386 // { // ... / 8 = ... >> 3 1387 // { 1388 // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 8), 1389 // new SimpleInstruction(InstructionConstants.OP_IDIV), 1390 // },{ 1391 // new SimpleInstruction(InstructionConstants.OP_ICONST_3), 1392 // new SimpleInstruction(InstructionConstants.OP_ISHR), 1393 // }, 1394 // }, 1395 // { // ... / 16 = ... >> 4 1396 // { 1397 // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 16), 1398 // new SimpleInstruction(InstructionConstants.OP_IDIV), 1399 // },{ 1400 // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 4), 1401 // new SimpleInstruction(InstructionConstants.OP_ISHR), 1402 // }, 1403 // }, 1404 // { // ... / 32 = ... >> 5 1405 // { 1406 // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 32), 1407 // new SimpleInstruction(InstructionConstants.OP_IDIV), 1408 // },{ 1409 // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 5), 1410 // new SimpleInstruction(InstructionConstants.OP_ISHR), 1411 // }, 1412 // }, 1413 // { // ... / 64 = ... >> 6 1414 // { 1415 // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 64), 1416 // new SimpleInstruction(InstructionConstants.OP_IDIV), 1417 // },{ 1418 // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 6), 1419 // new SimpleInstruction(InstructionConstants.OP_ISHR), 1420 // }, 1421 // }, 1422 // { // ... / 128 = ... >> 7 1423 // { 1424 // new SimpleInstruction(InstructionConstants.OP_SIPUSH, 128), 1425 // new SimpleInstruction(InstructionConstants.OP_IDIV), 1426 // },{ 1427 // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 7), 1428 // new SimpleInstruction(InstructionConstants.OP_ISHR), 1429 // }, 1430 // }, 1431 // { // ... / 256 = ... >> 8 1432 // { 1433 // new SimpleInstruction(InstructionConstants.OP_SIPUSH, 256), 1434 // new SimpleInstruction(InstructionConstants.OP_IDIV), 1435 // },{ 1436 // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 8), 1437 // new SimpleInstruction(InstructionConstants.OP_ISHR), 1438 // }, 1439 // }, 1440 // { // ... / 512 = ... >> 9 1441 // { 1442 // new SimpleInstruction(InstructionConstants.OP_SIPUSH, 512), 1443 // new SimpleInstruction(InstructionConstants.OP_IDIV), 1444 // },{ 1445 // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 9), 1446 // new SimpleInstruction(InstructionConstants.OP_ISHR), 1447 // }, 1448 // }, 1449 // { // ... / 1024 = ... >> 10 1450 // { 1451 // new SimpleInstruction(InstructionConstants.OP_SIPUSH, 1024), 1452 // new SimpleInstruction(InstructionConstants.OP_IDIV), 1453 // },{ 1454 // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 10), 1455 // new SimpleInstruction(InstructionConstants.OP_ISHR), 1456 // }, 1457 // }, 1458 // { // ... / 2048 = ... >> 11 1459 // { 1460 // new SimpleInstruction(InstructionConstants.OP_SIPUSH, 2048), 1461 // new SimpleInstruction(InstructionConstants.OP_IDIV), 1462 // },{ 1463 // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 11), 1464 // new SimpleInstruction(InstructionConstants.OP_ISHR), 1465 // }, 1466 // }, 1467 // { // ... / 4096 = ... >> 12 1468 // { 1469 // new SimpleInstruction(InstructionConstants.OP_SIPUSH, 4096), 1470 // new SimpleInstruction(InstructionConstants.OP_IDIV), 1471 // },{ 1472 // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 12), 1473 // new SimpleInstruction(InstructionConstants.OP_ISHR), 1474 // }, 1475 // }, 1476 // { // ... / 8192 = ... >> 13 1477 // { 1478 // new SimpleInstruction(InstructionConstants.OP_SIPUSH, 8192), 1479 // new SimpleInstruction(InstructionConstants.OP_IDIV), 1480 // },{ 1481 // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 13), 1482 // new SimpleInstruction(InstructionConstants.OP_ISHR), 1483 // }, 1484 // }, 1485 // { // ... / 16384 = ... >> 14 1486 // { 1487 // new SimpleInstruction(InstructionConstants.OP_SIPUSH, 16384), 1488 // new SimpleInstruction(InstructionConstants.OP_IDIV), 1489 // },{ 1490 // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 14), 1491 // new SimpleInstruction(InstructionConstants.OP_ISHR), 1492 // }, 1493 // }, 1494 // { // ... / 32768 = ... >> 15 1495 // { 1496 // new ConstantInstruction(InstructionConstants.OP_LDC, I_32768), 1497 // new SimpleInstruction(InstructionConstants.OP_IDIV), 1498 // },{ 1499 // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 15), 1500 // new SimpleInstruction(InstructionConstants.OP_ISHR), 1501 // }, 1502 // }, 1503 // { // ... / 65536 = ... >> 16 1504 // { 1505 // new ConstantInstruction(InstructionConstants.OP_LDC, I_65536), 1506 // new SimpleInstruction(InstructionConstants.OP_IDIV), 1507 // },{ 1508 // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 16), 1509 // new SimpleInstruction(InstructionConstants.OP_ISHR), 1510 // }, 1511 // }, 1512 // { // ... / 16777216 = ... >> 24 1513 // { 1514 // new ConstantInstruction(InstructionConstants.OP_LDC, I_16777216), 1515 // new SimpleInstruction(InstructionConstants.OP_IDIV), 1516 // },{ 1517 // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 24), 1518 // new SimpleInstruction(InstructionConstants.OP_ISHR), 1519 // }, 1520 // }, 1521 { // ... / -1L = -... 1522 { 1523 new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_M1), 1524 new SimpleInstruction(InstructionConstants.OP_LDIV), 1525 },{ 1526 new SimpleInstruction(InstructionConstants.OP_LNEG), 1527 }, 1528 }, 1529 { // ... / 1L = ... 1530 { 1531 new SimpleInstruction(InstructionConstants.OP_LCONST_1), 1532 new SimpleInstruction(InstructionConstants.OP_LDIV), 1533 },{ 1534 // Nothing. 1535 }, 1536 }, 1537 // Not valid for negative values. 1538 // { // ... / 2L = ... >> 1 1539 // { 1540 // new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_2), 1541 // new SimpleInstruction(InstructionConstants.OP_LDIV), 1542 // },{ 1543 // new SimpleInstruction(InstructionConstants.OP_ICONST_1), 1544 // new SimpleInstruction(InstructionConstants.OP_LSHR), 1545 // }, 1546 // }, 1547 // { // ... / 4L = ... >> 2 1548 // { 1549 // new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_4), 1550 // new SimpleInstruction(InstructionConstants.OP_LDIV), 1551 // },{ 1552 // new SimpleInstruction(InstructionConstants.OP_ICONST_2), 1553 // new SimpleInstruction(InstructionConstants.OP_LSHR), 1554 // }, 1555 // }, 1556 // { // ... / 8L = ... >> 3 1557 // { 1558 // new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_8), 1559 // new SimpleInstruction(InstructionConstants.OP_LDIV), 1560 // },{ 1561 // new SimpleInstruction(InstructionConstants.OP_ICONST_3), 1562 // new SimpleInstruction(InstructionConstants.OP_LSHR), 1563 // }, 1564 // }, 1565 // { // ... / 16L = ... >> 4 1566 // { 1567 // new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_16), 1568 // new SimpleInstruction(InstructionConstants.OP_LDIV), 1569 // },{ 1570 // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 4), 1571 // new SimpleInstruction(InstructionConstants.OP_LSHR), 1572 // }, 1573 // }, 1574 // { // ... / 32L = ... >> 5 1575 // { 1576 // new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_32), 1577 // new SimpleInstruction(InstructionConstants.OP_LDIV), 1578 // },{ 1579 // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 5), 1580 // new SimpleInstruction(InstructionConstants.OP_LSHR), 1581 // }, 1582 // }, 1583 // { // ... / 64L = ... >> 6 1584 // { 1585 // new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_64), 1586 // new SimpleInstruction(InstructionConstants.OP_LDIV), 1587 // },{ 1588 // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 6), 1589 // new SimpleInstruction(InstructionConstants.OP_LSHR), 1590 // }, 1591 // }, 1592 // { // ... / 128L = ... >> 7 1593 // { 1594 // new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_128), 1595 // new SimpleInstruction(InstructionConstants.OP_LDIV), 1596 // },{ 1597 // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 7), 1598 // new SimpleInstruction(InstructionConstants.OP_LSHR), 1599 // }, 1600 // }, 1601 // { // ... / 256L = ... >> 8 1602 // { 1603 // new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_256), 1604 // new SimpleInstruction(InstructionConstants.OP_LDIV), 1605 // },{ 1606 // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 8), 1607 // new SimpleInstruction(InstructionConstants.OP_LSHR), 1608 // }, 1609 // }, 1610 // { // ... / 512L = ... >> 9 1611 // { 1612 // new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_512), 1613 // new SimpleInstruction(InstructionConstants.OP_LDIV), 1614 // },{ 1615 // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 9), 1616 // new SimpleInstruction(InstructionConstants.OP_LSHR), 1617 // }, 1618 // }, 1619 // { // ... / 1024L = ... >> 10 1620 // { 1621 // new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_1024), 1622 // new SimpleInstruction(InstructionConstants.OP_LDIV), 1623 // },{ 1624 // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 10), 1625 // new SimpleInstruction(InstructionConstants.OP_LSHR), 1626 // }, 1627 // }, 1628 // { // ... / 2048L = ... >> 11 1629 // { 1630 // new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_2048), 1631 // new SimpleInstruction(InstructionConstants.OP_LDIV), 1632 // },{ 1633 // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 11), 1634 // new SimpleInstruction(InstructionConstants.OP_LSHR), 1635 // }, 1636 // }, 1637 // { // ... / 4096L = ... >> 12 1638 // { 1639 // new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_4096), 1640 // new SimpleInstruction(InstructionConstants.OP_LDIV), 1641 // },{ 1642 // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 12), 1643 // new SimpleInstruction(InstructionConstants.OP_LSHR), 1644 // }, 1645 // }, 1646 // { // ... / 8192L = ... >> 13 1647 // { 1648 // new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_8192), 1649 // new SimpleInstruction(InstructionConstants.OP_LDIV), 1650 // },{ 1651 // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 13), 1652 // new SimpleInstruction(InstructionConstants.OP_LSHR), 1653 // }, 1654 // }, 1655 // { // ... / 16384L = ... >> 14 1656 // { 1657 // new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_16384), 1658 // new SimpleInstruction(InstructionConstants.OP_LDIV), 1659 // },{ 1660 // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 14), 1661 // new SimpleInstruction(InstructionConstants.OP_LSHR), 1662 // }, 1663 // }, 1664 // { // ... / 32768L = ... >> 15 1665 // { 1666 // new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_32768), 1667 // new SimpleInstruction(InstructionConstants.OP_LDIV), 1668 // },{ 1669 // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 15), 1670 // new SimpleInstruction(InstructionConstants.OP_LSHR), 1671 // }, 1672 // }, 1673 // { // ... / 65536LL = ... >> 16 1674 // { 1675 // new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_65536), 1676 // new SimpleInstruction(InstructionConstants.OP_LDIV), 1677 // },{ 1678 // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 16), 1679 // new SimpleInstruction(InstructionConstants.OP_LSHR), 1680 // }, 1681 // }, 1682 // { // ... / 16777216L = ... >> 24 1683 // { 1684 // new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_16777216), 1685 // new SimpleInstruction(InstructionConstants.OP_LDIV), 1686 // },{ 1687 // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 24), 1688 // new SimpleInstruction(InstructionConstants.OP_LSHR), 1689 // }, 1690 // }, 1691 // { // ... / 4294967296L = ... >> 32 1692 // { 1693 // new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_4294967296), 1694 // new SimpleInstruction(InstructionConstants.OP_LDIV), 1695 // },{ 1696 // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 32), 1697 // new SimpleInstruction(InstructionConstants.OP_LSHR), 1698 // }, 1699 // }, 1700 { // ... / -1f = -... 1701 { 1702 new ConstantInstruction(InstructionConstants.OP_LDC, F_M1), 1703 new SimpleInstruction(InstructionConstants.OP_FDIV), 1704 },{ 1705 new SimpleInstruction(InstructionConstants.OP_FNEG), 1706 }, 1707 }, 1708 { // ... / 1f = ... 1709 { 1710 new SimpleInstruction(InstructionConstants.OP_FCONST_1), 1711 new SimpleInstruction(InstructionConstants.OP_FDIV), 1712 },{ 1713 // Nothing. 1714 }, 1715 }, 1716 { // ... / -1d = -... 1717 { 1718 new ConstantInstruction(InstructionConstants.OP_LDC2_W, D_M1), 1719 new SimpleInstruction(InstructionConstants.OP_DDIV), 1720 },{ 1721 new SimpleInstruction(InstructionConstants.OP_DNEG), 1722 }, 1723 }, 1724 { // ... / 1d = ... 1725 { 1726 new SimpleInstruction(InstructionConstants.OP_DCONST_1), 1727 new SimpleInstruction(InstructionConstants.OP_DDIV), 1728 },{ 1729 // Nothing. 1730 }, 1731 }, 1732 { // ... % 1 = 0 1733 { 1734 new SimpleInstruction(InstructionConstants.OP_ICONST_1), 1735 new SimpleInstruction(InstructionConstants.OP_IREM), 1736 },{ 1737 new SimpleInstruction(InstructionConstants.OP_POP), 1738 new SimpleInstruction(InstructionConstants.OP_ICONST_0), 1739 }, 1740 }, 1741 // Not valid for negative values. 1742 // { // ... % 2 = ... & 0x1 1743 // { 1744 // new SimpleInstruction(InstructionConstants.OP_ICONST_2), 1745 // new SimpleInstruction(InstructionConstants.OP_IREM), 1746 // },{ 1747 // new SimpleInstruction(InstructionConstants.OP_ICONST_1), 1748 // new SimpleInstruction(InstructionConstants.OP_IAND), 1749 // }, 1750 // }, 1751 // { // ... % 4 = ... & 0x3 1752 // { 1753 // new SimpleInstruction(InstructionConstants.OP_ICONST_4), 1754 // new SimpleInstruction(InstructionConstants.OP_IREM), 1755 // },{ 1756 // new SimpleInstruction(InstructionConstants.OP_ICONST_3), 1757 // new SimpleInstruction(InstructionConstants.OP_IAND), 1758 // }, 1759 // }, 1760 // { // ... % 8 = ... & 0x07 1761 // { 1762 // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 8), 1763 // new SimpleInstruction(InstructionConstants.OP_IREM), 1764 // },{ 1765 // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 0x07), 1766 // new SimpleInstruction(InstructionConstants.OP_IAND), 1767 // }, 1768 // }, 1769 // { // ... % 16 = ... & 0x0f 1770 // { 1771 // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 16), 1772 // new SimpleInstruction(InstructionConstants.OP_IREM), 1773 // },{ 1774 // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 0x0f), 1775 // new SimpleInstruction(InstructionConstants.OP_IAND), 1776 // }, 1777 // }, 1778 // { // ... % 32 = ... & 0x1f 1779 // { 1780 // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 32), 1781 // new SimpleInstruction(InstructionConstants.OP_IREM), 1782 // },{ 1783 // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 0x1f), 1784 // new SimpleInstruction(InstructionConstants.OP_IAND), 1785 // }, 1786 // }, 1787 // { // ... % 64 = ... & 0x3f 1788 // { 1789 // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 64), 1790 // new SimpleInstruction(InstructionConstants.OP_IREM), 1791 // },{ 1792 // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 0x3f), 1793 // new SimpleInstruction(InstructionConstants.OP_IAND), 1794 // }, 1795 // }, 1796 // { // ... % 128 = ... & 0x7f 1797 // { 1798 // new SimpleInstruction(InstructionConstants.OP_SIPUSH, 128), 1799 // new SimpleInstruction(InstructionConstants.OP_IREM), 1800 // },{ 1801 // new SimpleInstruction(InstructionConstants.OP_BIPUSH, 0x7f), 1802 // new SimpleInstruction(InstructionConstants.OP_IAND), 1803 // }, 1804 // }, 1805 // { // ... % 256 = ... & 0x00ff 1806 // { 1807 // new SimpleInstruction(InstructionConstants.OP_SIPUSH, 256), 1808 // new SimpleInstruction(InstructionConstants.OP_IREM), 1809 // },{ 1810 // new SimpleInstruction(InstructionConstants.OP_SIPUSH, 0x00ff), 1811 // new SimpleInstruction(InstructionConstants.OP_IAND), 1812 // }, 1813 // }, 1814 // { // ... % 512 = ... & 0x01ff 1815 // { 1816 // new SimpleInstruction(InstructionConstants.OP_SIPUSH, 512), 1817 // new SimpleInstruction(InstructionConstants.OP_IREM), 1818 // },{ 1819 // new SimpleInstruction(InstructionConstants.OP_SIPUSH, 0x01ff), 1820 // new SimpleInstruction(InstructionConstants.OP_IAND), 1821 // }, 1822 // }, 1823 // { // ... % 1024 = ... & 0x03ff 1824 // { 1825 // new SimpleInstruction(InstructionConstants.OP_SIPUSH, 1024), 1826 // new SimpleInstruction(InstructionConstants.OP_IREM), 1827 // },{ 1828 // new SimpleInstruction(InstructionConstants.OP_SIPUSH, 0x03ff), 1829 // new SimpleInstruction(InstructionConstants.OP_IAND), 1830 // }, 1831 // }, 1832 // { // ... % 2048 = ... & 0x07ff 1833 // { 1834 // new SimpleInstruction(InstructionConstants.OP_SIPUSH, 2048), 1835 // new SimpleInstruction(InstructionConstants.OP_IREM), 1836 // },{ 1837 // new SimpleInstruction(InstructionConstants.OP_SIPUSH, 0x07ff), 1838 // new SimpleInstruction(InstructionConstants.OP_IAND), 1839 // }, 1840 // }, 1841 // { // ... % 4096 = ... & 0x0fff 1842 // { 1843 // new SimpleInstruction(InstructionConstants.OP_SIPUSH, 4096), 1844 // new SimpleInstruction(InstructionConstants.OP_IREM), 1845 // },{ 1846 // new SimpleInstruction(InstructionConstants.OP_SIPUSH, 0x0fff), 1847 // new SimpleInstruction(InstructionConstants.OP_IAND), 1848 // }, 1849 // }, 1850 // { // ... % 8192 = ... & 0x1fff 1851 // { 1852 // new SimpleInstruction(InstructionConstants.OP_SIPUSH, 8192), 1853 // new SimpleInstruction(InstructionConstants.OP_IREM), 1854 // },{ 1855 // new SimpleInstruction(InstructionConstants.OP_SIPUSH, 0x1fff), 1856 // new SimpleInstruction(InstructionConstants.OP_IAND), 1857 // }, 1858 // }, 1859 // { // ... % 16384 = ... & 0x3fff 1860 // { 1861 // new SimpleInstruction(InstructionConstants.OP_SIPUSH, 16384), 1862 // new SimpleInstruction(InstructionConstants.OP_IREM), 1863 // },{ 1864 // new SimpleInstruction(InstructionConstants.OP_SIPUSH, 0x3fff), 1865 // new SimpleInstruction(InstructionConstants.OP_IAND), 1866 // }, 1867 // }, 1868 { // ... % 1L = 0L 1869 { 1870 new SimpleInstruction(InstructionConstants.OP_LCONST_1), 1871 new SimpleInstruction(InstructionConstants.OP_LREM), 1872 },{ 1873 new SimpleInstruction(InstructionConstants.OP_POP2), 1874 new SimpleInstruction(InstructionConstants.OP_LCONST_0), 1875 }, 1876 }, 1877 // { // ... % 1f = 0f 1878 // { 1879 // new SimpleInstruction(InstructionConstants.OP_FCONST_1), 1880 // new SimpleInstruction(InstructionConstants.OP_FREM), 1881 // },{ 1882 // new SimpleInstruction(InstructionConstants.OP_POP), 1883 // new SimpleInstruction(InstructionConstants.OP_FCONST_0), 1884 // }, 1885 // }, 1886 // { // ... % 1d = 0d 1887 // { 1888 // new SimpleInstruction(InstructionConstants.OP_DCONST_1), 1889 // new SimpleInstruction(InstructionConstants.OP_DREM), 1890 // },{ 1891 // new SimpleInstruction(InstructionConstants.OP_POP2), 1892 // new SimpleInstruction(InstructionConstants.OP_DCONST_0), 1893 // }, 1894 // }, 1895 { // -(-...) = ... 1896 { 1897 new SimpleInstruction(InstructionConstants.OP_INEG), 1898 new SimpleInstruction(InstructionConstants.OP_INEG), 1899 },{ 1900 // Nothing. 1901 }, 1902 }, 1903 { // -(-...) = ... 1904 { 1905 new SimpleInstruction(InstructionConstants.OP_LNEG), 1906 new SimpleInstruction(InstructionConstants.OP_LNEG), 1907 },{ 1908 // Nothing. 1909 }, 1910 }, 1911 { // -(-...) = ... 1912 { 1913 new SimpleInstruction(InstructionConstants.OP_FNEG), 1914 new SimpleInstruction(InstructionConstants.OP_FNEG), 1915 },{ 1916 // Nothing. 1917 }, 1918 }, 1919 { // -(-...) = ... 1920 { 1921 new SimpleInstruction(InstructionConstants.OP_DNEG), 1922 new SimpleInstruction(InstructionConstants.OP_DNEG), 1923 },{ 1924 // Nothing. 1925 }, 1926 }, 1927 { // +(-...) = -... 1928 { 1929 new SimpleInstruction(InstructionConstants.OP_INEG), 1930 new SimpleInstruction(InstructionConstants.OP_IADD), 1931 },{ 1932 new SimpleInstruction(InstructionConstants.OP_ISUB), 1933 }, 1934 }, 1935 { // +(-...) = -... 1936 { 1937 new SimpleInstruction(InstructionConstants.OP_LNEG), 1938 new SimpleInstruction(InstructionConstants.OP_LADD), 1939 },{ 1940 new SimpleInstruction(InstructionConstants.OP_LSUB), 1941 }, 1942 }, 1943 { // +(-...) = -... 1944 { 1945 new SimpleInstruction(InstructionConstants.OP_FNEG), 1946 new SimpleInstruction(InstructionConstants.OP_FADD), 1947 },{ 1948 new SimpleInstruction(InstructionConstants.OP_FSUB), 1949 }, 1950 }, 1951 { // +(-...) = -... 1952 { 1953 new SimpleInstruction(InstructionConstants.OP_DNEG), 1954 new SimpleInstruction(InstructionConstants.OP_DADD), 1955 },{ 1956 new SimpleInstruction(InstructionConstants.OP_DSUB), 1957 }, 1958 }, 1959 { // ... << 0 = ... 1960 { 1961 new SimpleInstruction(InstructionConstants.OP_ICONST_0), 1962 new SimpleInstruction(InstructionConstants.OP_ISHL), 1963 },{ 1964 // Nothing. 1965 }, 1966 }, 1967 { // ... << 0 = ... 1968 { 1969 new SimpleInstruction(InstructionConstants.OP_ICONST_0), 1970 new SimpleInstruction(InstructionConstants.OP_LSHL), 1971 },{ 1972 // Nothing. 1973 }, 1974 }, 1975 { // ... >> 0 = ... 1976 { 1977 new SimpleInstruction(InstructionConstants.OP_ICONST_0), 1978 new SimpleInstruction(InstructionConstants.OP_ISHR), 1979 },{ 1980 // Nothing. 1981 }, 1982 }, 1983 { // ... >> 0 = ... 1984 { 1985 new SimpleInstruction(InstructionConstants.OP_ICONST_0), 1986 new SimpleInstruction(InstructionConstants.OP_LSHR), 1987 },{ 1988 // Nothing. 1989 }, 1990 }, 1991 { // ... >>> 0 = ... 1992 { 1993 new SimpleInstruction(InstructionConstants.OP_ICONST_0), 1994 new SimpleInstruction(InstructionConstants.OP_IUSHR), 1995 },{ 1996 // Nothing. 1997 }, 1998 }, 1999 { // ... >>> 0 = ... 2000 { 2001 new SimpleInstruction(InstructionConstants.OP_ICONST_0), 2002 new SimpleInstruction(InstructionConstants.OP_LUSHR), 2003 },{ 2004 // Nothing. 2005 }, 2006 }, 2007 { // ... & -1 = ... 2008 { 2009 new SimpleInstruction(InstructionConstants.OP_ICONST_M1), 2010 new SimpleInstruction(InstructionConstants.OP_IAND), 2011 },{ 2012 // Nothing. 2013 }, 2014 }, 2015 { // ... & 0 = 0 2016 { 2017 new SimpleInstruction(InstructionConstants.OP_ICONST_0), 2018 new SimpleInstruction(InstructionConstants.OP_IAND), 2019 },{ 2020 new SimpleInstruction(InstructionConstants.OP_POP), 2021 new SimpleInstruction(InstructionConstants.OP_ICONST_0), 2022 }, 2023 }, 2024 { // ... & -1L = ... 2025 { 2026 new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_M1), 2027 new SimpleInstruction(InstructionConstants.OP_LAND), 2028 },{ 2029 // Nothing. 2030 }, 2031 }, 2032 { // ... & 0L = 0L 2033 { 2034 new SimpleInstruction(InstructionConstants.OP_LCONST_0), 2035 new SimpleInstruction(InstructionConstants.OP_LAND), 2036 },{ 2037 new SimpleInstruction(InstructionConstants.OP_POP2), 2038 new SimpleInstruction(InstructionConstants.OP_LCONST_0), 2039 }, 2040 }, 2041 { // ... | -1 = -1 2042 { 2043 new SimpleInstruction(InstructionConstants.OP_ICONST_M1), 2044 new SimpleInstruction(InstructionConstants.OP_IOR), 2045 },{ 2046 new SimpleInstruction(InstructionConstants.OP_POP), 2047 new SimpleInstruction(InstructionConstants.OP_ICONST_M1), 2048 }, 2049 }, 2050 { // ... | 0 = ... 2051 { 2052 new SimpleInstruction(InstructionConstants.OP_ICONST_0), 2053 new SimpleInstruction(InstructionConstants.OP_IOR), 2054 },{ 2055 // Nothing. 2056 }, 2057 }, 2058 { // ... | -1L = -1L 2059 { 2060 new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_M1), 2061 new SimpleInstruction(InstructionConstants.OP_LAND), 2062 },{ 2063 new SimpleInstruction(InstructionConstants.OP_POP2), 2064 new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_M1), 2065 }, 2066 }, 2067 { // ... | 0L = ... 2068 { 2069 new SimpleInstruction(InstructionConstants.OP_LCONST_0), 2070 new SimpleInstruction(InstructionConstants.OP_LOR), 2071 },{ 2072 // Nothing. 2073 }, 2074 }, 2075 { // ... ^ 0 = ... 2076 { 2077 new SimpleInstruction(InstructionConstants.OP_ICONST_0), 2078 new SimpleInstruction(InstructionConstants.OP_IXOR), 2079 },{ 2080 // Nothing. 2081 }, 2082 }, 2083 { // ... ^ 0L = ... 2084 { 2085 new SimpleInstruction(InstructionConstants.OP_LCONST_0), 2086 new SimpleInstruction(InstructionConstants.OP_LXOR), 2087 },{ 2088 // Nothing. 2089 }, 2090 }, 2091 { // (... & 0x0000ff00) >> 8 = (... >> 8) & 0xff 2092 { 2093 new ConstantInstruction(InstructionConstants.OP_LDC, I_0x0000ff00), 2094 new SimpleInstruction(InstructionConstants.OP_IAND), 2095 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 8), 2096 new SimpleInstruction(InstructionConstants.OP_ISHR), 2097 },{ 2098 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 8), 2099 new SimpleInstruction(InstructionConstants.OP_ISHR), 2100 new SimpleInstruction(InstructionConstants.OP_SIPUSH, 0xff), 2101 new SimpleInstruction(InstructionConstants.OP_IAND), 2102 }, 2103 }, 2104 { // (... & 0x0000ff00) >>> 8 = (... >>> 8) & 0xff 2105 { 2106 new ConstantInstruction(InstructionConstants.OP_LDC, I_0x0000ff00), 2107 new SimpleInstruction(InstructionConstants.OP_IAND), 2108 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 8), 2109 new SimpleInstruction(InstructionConstants.OP_IUSHR), 2110 },{ 2111 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 8), 2112 new SimpleInstruction(InstructionConstants.OP_IUSHR), 2113 new SimpleInstruction(InstructionConstants.OP_SIPUSH, 0xff), 2114 new SimpleInstruction(InstructionConstants.OP_IAND), 2115 }, 2116 }, 2117 { // (... & 0x00ff0000) >> 16 = (... >> 16) & 0xff 2118 { 2119 new ConstantInstruction(InstructionConstants.OP_LDC, I_0x00ff0000), 2120 new SimpleInstruction(InstructionConstants.OP_IAND), 2121 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 16), 2122 new SimpleInstruction(InstructionConstants.OP_ISHR), 2123 },{ 2124 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 16), 2125 new SimpleInstruction(InstructionConstants.OP_ISHR), 2126 new SimpleInstruction(InstructionConstants.OP_SIPUSH, 0xff), 2127 new SimpleInstruction(InstructionConstants.OP_IAND), 2128 }, 2129 }, 2130 { // (... & 0x00ff0000) >>> 16 = (... >>> 16) & 0xff 2131 { 2132 new ConstantInstruction(InstructionConstants.OP_LDC, I_0x00ff0000), 2133 new SimpleInstruction(InstructionConstants.OP_IAND), 2134 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 16), 2135 new SimpleInstruction(InstructionConstants.OP_IUSHR), 2136 },{ 2137 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 16), 2138 new SimpleInstruction(InstructionConstants.OP_IUSHR), 2139 new SimpleInstruction(InstructionConstants.OP_SIPUSH, 0xff), 2140 new SimpleInstruction(InstructionConstants.OP_IAND), 2141 }, 2142 }, 2143 { // (... & 0xff000000) >> 24 = ... >> 24 2144 { 2145 new ConstantInstruction(InstructionConstants.OP_LDC, I_0xff000000), 2146 new SimpleInstruction(InstructionConstants.OP_IAND), 2147 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 24), 2148 new SimpleInstruction(InstructionConstants.OP_ISHR), 2149 },{ 2150 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 24), 2151 new SimpleInstruction(InstructionConstants.OP_ISHR), 2152 }, 2153 }, 2154 { // (... & 0xffff0000) >> 16 = ... >> 16 2155 { 2156 new ConstantInstruction(InstructionConstants.OP_LDC, I_0xffff0000), 2157 new SimpleInstruction(InstructionConstants.OP_IAND), 2158 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 16), 2159 new SimpleInstruction(InstructionConstants.OP_ISHR), 2160 },{ 2161 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 16), 2162 new SimpleInstruction(InstructionConstants.OP_ISHR), 2163 }, 2164 }, 2165 { // (... & 0xffff0000) >>> 16 = ... >>> 16 2166 { 2167 new ConstantInstruction(InstructionConstants.OP_LDC, I_0xffff0000), 2168 new SimpleInstruction(InstructionConstants.OP_IAND), 2169 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 16), 2170 new SimpleInstruction(InstructionConstants.OP_IUSHR), 2171 },{ 2172 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 16), 2173 new SimpleInstruction(InstructionConstants.OP_IUSHR), 2174 }, 2175 }, 2176 { // (... >> 24) & 0xff = ... >>> 24 2177 { 2178 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 24), 2179 new SimpleInstruction(InstructionConstants.OP_ISHR), 2180 new SimpleInstruction(InstructionConstants.OP_SIPUSH, 0xff), 2181 new SimpleInstruction(InstructionConstants.OP_IAND), 2182 },{ 2183 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 24), 2184 new SimpleInstruction(InstructionConstants.OP_IUSHR), 2185 }, 2186 }, 2187 { // (... >>> 24) & 0xff = ... >>> 24 2188 { 2189 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 24), 2190 new SimpleInstruction(InstructionConstants.OP_IUSHR), 2191 new SimpleInstruction(InstructionConstants.OP_SIPUSH, 0xff), 2192 new SimpleInstruction(InstructionConstants.OP_IAND), 2193 },{ 2194 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 24), 2195 new SimpleInstruction(InstructionConstants.OP_IUSHR), 2196 }, 2197 }, 2198 { // (byte)(... & 0x000000ff) = (byte)... 2199 { 2200 new SimpleInstruction(InstructionConstants.OP_SIPUSH, 0xff), 2201 new SimpleInstruction(InstructionConstants.OP_IAND), 2202 new SimpleInstruction(InstructionConstants.OP_I2B), 2203 },{ 2204 new SimpleInstruction(InstructionConstants.OP_I2B), 2205 }, 2206 }, 2207 { // (char)(... & 0x0000ffff) = (char)... 2208 { 2209 new ConstantInstruction(InstructionConstants.OP_LDC, I_0x0000ffff), 2210 new SimpleInstruction(InstructionConstants.OP_IAND), 2211 new SimpleInstruction(InstructionConstants.OP_I2C), 2212 },{ 2213 new SimpleInstruction(InstructionConstants.OP_I2C), 2214 }, 2215 }, 2216 { // (short)(... & 0x0000ffff) = (short)... 2217 { 2218 new ConstantInstruction(InstructionConstants.OP_LDC, I_0x0000ffff), 2219 new SimpleInstruction(InstructionConstants.OP_IAND), 2220 new SimpleInstruction(InstructionConstants.OP_I2S), 2221 },{ 2222 new SimpleInstruction(InstructionConstants.OP_I2S), 2223 }, 2224 }, 2225 { // (byte)(... >> 24) = ... >> 24 2226 { 2227 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 24), 2228 new SimpleInstruction(InstructionConstants.OP_ISHR), 2229 new SimpleInstruction(InstructionConstants.OP_I2B), 2230 },{ 2231 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 24), 2232 new SimpleInstruction(InstructionConstants.OP_ISHR), 2233 }, 2234 }, 2235 { // (byte)(... >>> 24) = ... >> 24 2236 { 2237 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 24), 2238 new SimpleInstruction(InstructionConstants.OP_IUSHR), 2239 new SimpleInstruction(InstructionConstants.OP_I2B), 2240 },{ 2241 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 24), 2242 new SimpleInstruction(InstructionConstants.OP_ISHR), 2243 }, 2244 }, 2245 { // (char)(... >> 16) = ... >>> 16 2246 { 2247 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 16), 2248 new SimpleInstruction(InstructionConstants.OP_ISHR), 2249 new SimpleInstruction(InstructionConstants.OP_I2C), 2250 },{ 2251 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 16), 2252 new SimpleInstruction(InstructionConstants.OP_IUSHR), 2253 }, 2254 }, 2255 { // (char)(... >>> 16) = ... >>> 16 2256 { 2257 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 16), 2258 new SimpleInstruction(InstructionConstants.OP_IUSHR), 2259 new SimpleInstruction(InstructionConstants.OP_I2C), 2260 },{ 2261 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 16), 2262 new SimpleInstruction(InstructionConstants.OP_IUSHR), 2263 }, 2264 }, 2265 { // (short)(... >> 16) = ... >> 16 2266 { 2267 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 16), 2268 new SimpleInstruction(InstructionConstants.OP_ISHR), 2269 new SimpleInstruction(InstructionConstants.OP_I2S), 2270 },{ 2271 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 16), 2272 new SimpleInstruction(InstructionConstants.OP_ISHR), 2273 }, 2274 }, 2275 { // (short)(... >>> 16) = ... >> 16 2276 { 2277 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 16), 2278 new SimpleInstruction(InstructionConstants.OP_IUSHR), 2279 new SimpleInstruction(InstructionConstants.OP_I2S), 2280 },{ 2281 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 16), 2282 new SimpleInstruction(InstructionConstants.OP_ISHR), 2283 }, 2284 }, 2285 { // ... << 24 >> 24 = (byte)... 2286 { 2287 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 24), 2288 new SimpleInstruction(InstructionConstants.OP_ISHL), 2289 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 24), 2290 new SimpleInstruction(InstructionConstants.OP_ISHR), 2291 },{ 2292 new SimpleInstruction(InstructionConstants.OP_I2B), 2293 }, 2294 }, 2295 { // ... << 16 >>> 16 = (char)... 2296 { 2297 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 16), 2298 new SimpleInstruction(InstructionConstants.OP_ISHL), 2299 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 16), 2300 new SimpleInstruction(InstructionConstants.OP_IUSHR), 2301 },{ 2302 new SimpleInstruction(InstructionConstants.OP_I2C), 2303 }, 2304 }, 2305 { // ... << 16 >> 16 = (short)... 2306 { 2307 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 16), 2308 new SimpleInstruction(InstructionConstants.OP_ISHL), 2309 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 16), 2310 new SimpleInstruction(InstructionConstants.OP_ISHR), 2311 },{ 2312 new SimpleInstruction(InstructionConstants.OP_I2S), 2313 }, 2314 }, 2315 { // ... << 32 >> 32 = (long)(int)... 2316 { 2317 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 32), 2318 new SimpleInstruction(InstructionConstants.OP_LSHL), 2319 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 32), 2320 new SimpleInstruction(InstructionConstants.OP_LSHR), 2321 },{ 2322 new SimpleInstruction(InstructionConstants.OP_L2I), 2323 new SimpleInstruction(InstructionConstants.OP_I2L), 2324 }, 2325 }, 2326 { // (int)(... & 0x00000000ffffffffL) = (int)... 2327 { 2328 new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_0x00000000ffffffff), 2329 new SimpleInstruction(InstructionConstants.OP_LAND), 2330 new SimpleInstruction(InstructionConstants.OP_L2I), 2331 },{ 2332 new SimpleInstruction(InstructionConstants.OP_L2I), 2333 }, 2334 }, 2335 { // (... & 0xffffffff00000000L) >> 32 = ... >> 32 2336 { 2337 new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_0xffffffff00000000), 2338 new SimpleInstruction(InstructionConstants.OP_LAND), 2339 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 32), 2340 new SimpleInstruction(InstructionConstants.OP_LSHR), 2341 },{ 2342 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 32), 2343 new SimpleInstruction(InstructionConstants.OP_LSHR), 2344 }, 2345 }, 2346 { // (... & 0xffffffff00000000L) >>> 32 = ... >>> 32 2347 { 2348 new ConstantInstruction(InstructionConstants.OP_LDC2_W, L_0xffffffff00000000), 2349 new SimpleInstruction(InstructionConstants.OP_LAND), 2350 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 32), 2351 new SimpleInstruction(InstructionConstants.OP_LUSHR), 2352 },{ 2353 new SimpleInstruction(InstructionConstants.OP_BIPUSH, 32), 2354 new SimpleInstruction(InstructionConstants.OP_LUSHR), 2355 }, 2356 }, 2357 { // ... += 0 = nothing 2358 { 2359 new VariableInstruction(InstructionConstants.OP_IINC, X, 0), 2360 },{ 2361 // Nothing. 2362 }, 2363 }, 2364 }; 2365 2366 public static final Instruction[][][] FIELD = new Instruction[][][] 2367 { 2368 { // getfield/putfield = nothing 2369 { 2370 new VariableInstruction(InstructionConstants.OP_ALOAD, X), 2371 new VariableInstruction(InstructionConstants.OP_ALOAD, X), 2372 new ConstantInstruction(InstructionConstants.OP_GETFIELD, Y), 2373 new ConstantInstruction(InstructionConstants.OP_PUTFIELD, Y), 2374 },{ 2375 // Nothing. 2376 }, 2377 }, 2378 // { // putfield_L/putfield_L = pop2_x1/putfield 2379 // { 2380 // new VariableInstruction(InstructionConstants.OP_ALOAD, X), 2381 // // ... 2382 // new ConstantInstruction(InstructionConstants.OP_PUTFIELD, FIELD_L), 2383 // new VariableInstruction(InstructionConstants.OP_ALOAD, X), 2384 // // ... 2385 // new ConstantInstruction(InstructionConstants.OP_PUTFIELD, FIELD_L), 2386 // },{ 2387 // new VariableInstruction(InstructionConstants.OP_ALOAD, X), 2388 // // ... 2389 // new SimpleInstruction(InstructionConstants.OP_POP2), 2390 // // ... 2391 // new ConstantInstruction(InstructionConstants.OP_PUTFIELD, FIELD_L), 2392 // }, 2393 // }, 2394 // { // putfield_D/putfield_D = pop2_x1/putfield 2395 // { 2396 // new VariableInstruction(InstructionConstants.OP_ALOAD, X), 2397 // // ... 2398 // new ConstantInstruction(InstructionConstants.OP_PUTFIELD, FIELD_D), 2399 // new VariableInstruction(InstructionConstants.OP_ALOAD, X), 2400 // // ... 2401 // new ConstantInstruction(InstructionConstants.OP_PUTFIELD, FIELD_D), 2402 // },{ 2403 // new VariableInstruction(InstructionConstants.OP_ALOAD, X), 2404 // // ... 2405 // new SimpleInstruction(InstructionConstants.OP_POP2), 2406 // // ... 2407 // new ConstantInstruction(InstructionConstants.OP_PUTFIELD, FIELD_D), 2408 // }, 2409 // }, 2410 // { // putfield/putfield = pop_x1/putfield 2411 // { 2412 // new VariableInstruction(InstructionConstants.OP_ALOAD, X), 2413 // // ... 2414 // new ConstantInstruction(InstructionConstants.OP_PUTFIELD, Y), 2415 // new VariableInstruction(InstructionConstants.OP_ALOAD, X), 2416 // // ... 2417 // new ConstantInstruction(InstructionConstants.OP_PUTFIELD, Y), 2418 // },{ 2419 // new VariableInstruction(InstructionConstants.OP_ALOAD, X), 2420 // // ... 2421 // new SimpleInstruction(InstructionConstants.OP_POP), 2422 // // ... 2423 // new ConstantInstruction(InstructionConstants.OP_PUTFIELD, Y), 2424 // }, 2425 // }, 2426 // { // putfield_L/getfield_L = dup2_x1/putfield 2427 // { 2428 // new VariableInstruction(InstructionConstants.OP_ALOAD, X), 2429 // // ... 2430 // new ConstantInstruction(InstructionConstants.OP_PUTFIELD, FIELD_L), 2431 // new VariableInstruction(InstructionConstants.OP_ALOAD, X), 2432 // new ConstantInstruction(InstructionConstants.OP_GETFIELD, FIELD_L), 2433 // },{ 2434 // new VariableInstruction(InstructionConstants.OP_ALOAD, X), 2435 // // ... 2436 // new SimpleInstruction(InstructionConstants.OP_DUP2_X1), 2437 // new ConstantInstruction(InstructionConstants.OP_PUTFIELD, FIELD_L), 2438 // }, 2439 // }, 2440 // { // putfield_D/getfield_D = dup2_x1/putfield 2441 // { 2442 // new VariableInstruction(InstructionConstants.OP_ALOAD, X), 2443 // // ... 2444 // new ConstantInstruction(InstructionConstants.OP_PUTFIELD, FIELD_D), 2445 // new VariableInstruction(InstructionConstants.OP_ALOAD, X), 2446 // new ConstantInstruction(InstructionConstants.OP_GETFIELD, FIELD_D), 2447 // },{ 2448 // new VariableInstruction(InstructionConstants.OP_ALOAD, X), 2449 // // ... 2450 // new SimpleInstruction(InstructionConstants.OP_DUP2_X1), 2451 // new ConstantInstruction(InstructionConstants.OP_PUTFIELD, FIELD_D), 2452 // }, 2453 // }, 2454 // { // putfield/getfield = dup_x1/putfield 2455 // { 2456 // new VariableInstruction(InstructionConstants.OP_ALOAD, X), 2457 // // ... 2458 // new ConstantInstruction(InstructionConstants.OP_PUTFIELD, Y), 2459 // new VariableInstruction(InstructionConstants.OP_ALOAD, X), 2460 // new ConstantInstruction(InstructionConstants.OP_GETFIELD, Y), 2461 // },{ 2462 // new VariableInstruction(InstructionConstants.OP_ALOAD, X), 2463 // // ... 2464 // new SimpleInstruction(InstructionConstants.OP_DUP_X1), 2465 // new ConstantInstruction(InstructionConstants.OP_PUTFIELD, Y), 2466 // }, 2467 // }, 2468 { // getstatic/putstatic = nothing 2469 { 2470 new ConstantInstruction(InstructionConstants.OP_GETSTATIC, X), 2471 new ConstantInstruction(InstructionConstants.OP_PUTSTATIC, X), 2472 },{ 2473 // Nothing. 2474 }, 2475 }, 2476 { // putstatic_L/putstatic_L = pop2/putstatic 2477 { 2478 new ConstantInstruction(InstructionConstants.OP_PUTSTATIC, FIELD_L), 2479 new ConstantInstruction(InstructionConstants.OP_PUTSTATIC, FIELD_L), 2480 },{ 2481 new SimpleInstruction(InstructionConstants.OP_POP2), 2482 new ConstantInstruction(InstructionConstants.OP_PUTSTATIC, FIELD_L), 2483 }, 2484 }, 2485 { // putstatic_D/putstatic_D = pop2/putstatic 2486 { 2487 new ConstantInstruction(InstructionConstants.OP_PUTSTATIC, FIELD_D), 2488 new ConstantInstruction(InstructionConstants.OP_PUTSTATIC, FIELD_D), 2489 },{ 2490 new SimpleInstruction(InstructionConstants.OP_POP2), 2491 new ConstantInstruction(InstructionConstants.OP_PUTSTATIC, FIELD_D), 2492 }, 2493 }, 2494 { // putstatic/putstatic = pop/putstatic 2495 { 2496 new ConstantInstruction(InstructionConstants.OP_PUTSTATIC, X), 2497 new ConstantInstruction(InstructionConstants.OP_PUTSTATIC, X), 2498 },{ 2499 new SimpleInstruction(InstructionConstants.OP_POP), 2500 new ConstantInstruction(InstructionConstants.OP_PUTSTATIC, X), 2501 }, 2502 }, 2503 { // putstatic_L/getstatic_L = dup2/putstatic 2504 { 2505 new ConstantInstruction(InstructionConstants.OP_PUTSTATIC, FIELD_L), 2506 new ConstantInstruction(InstructionConstants.OP_GETSTATIC, FIELD_L), 2507 },{ 2508 new SimpleInstruction(InstructionConstants.OP_DUP2), 2509 new ConstantInstruction(InstructionConstants.OP_PUTSTATIC, FIELD_L), 2510 }, 2511 }, 2512 { // putstatic_D/getstatic_D = dup2/putstatic 2513 { 2514 new ConstantInstruction(InstructionConstants.OP_PUTSTATIC, FIELD_D), 2515 new ConstantInstruction(InstructionConstants.OP_GETSTATIC, FIELD_D), 2516 },{ 2517 new SimpleInstruction(InstructionConstants.OP_DUP2), 2518 new ConstantInstruction(InstructionConstants.OP_PUTSTATIC, FIELD_D), 2519 }, 2520 }, 2521 { // putstatic/getstatic = dup/putstatic 2522 { 2523 new ConstantInstruction(InstructionConstants.OP_PUTSTATIC, X), 2524 new ConstantInstruction(InstructionConstants.OP_GETSTATIC, X), 2525 },{ 2526 new SimpleInstruction(InstructionConstants.OP_DUP), 2527 new ConstantInstruction(InstructionConstants.OP_PUTSTATIC, X), 2528 }, 2529 }, 2530 }; 2531 2532 public static final Instruction[][][] CAST = new Instruction[][][] 2533 { 2534 { // (byte)(byte)... = (byte)... 2535 { 2536 new SimpleInstruction(InstructionConstants.OP_I2B), 2537 new SimpleInstruction(InstructionConstants.OP_I2B), 2538 },{ 2539 new SimpleInstruction(InstructionConstants.OP_I2B), 2540 }, 2541 }, 2542 { // (byte)(char)... = (byte)... 2543 { 2544 new SimpleInstruction(InstructionConstants.OP_I2C), 2545 new SimpleInstruction(InstructionConstants.OP_I2B), 2546 },{ 2547 new SimpleInstruction(InstructionConstants.OP_I2B), 2548 }, 2549 }, 2550 { // (byte)(short)... = (byte)... 2551 { 2552 new SimpleInstruction(InstructionConstants.OP_I2S), 2553 new SimpleInstruction(InstructionConstants.OP_I2B), 2554 },{ 2555 new SimpleInstruction(InstructionConstants.OP_I2B), 2556 }, 2557 }, 2558 { // (char)(char)... = (char)... 2559 { 2560 new SimpleInstruction(InstructionConstants.OP_I2C), 2561 new SimpleInstruction(InstructionConstants.OP_I2C), 2562 },{ 2563 new SimpleInstruction(InstructionConstants.OP_I2C), 2564 }, 2565 }, 2566 { // (char)(short)... = (char)... 2567 { 2568 new SimpleInstruction(InstructionConstants.OP_I2S), 2569 new SimpleInstruction(InstructionConstants.OP_I2C), 2570 },{ 2571 new SimpleInstruction(InstructionConstants.OP_I2C), 2572 }, 2573 }, 2574 { // (short)(byte)... = (byte)... 2575 { 2576 new SimpleInstruction(InstructionConstants.OP_I2B), 2577 new SimpleInstruction(InstructionConstants.OP_I2S), 2578 },{ 2579 new SimpleInstruction(InstructionConstants.OP_I2B), 2580 }, 2581 }, 2582 { // (short)(char)... = (short)... 2583 { 2584 new SimpleInstruction(InstructionConstants.OP_I2C), 2585 new SimpleInstruction(InstructionConstants.OP_I2S), 2586 },{ 2587 new SimpleInstruction(InstructionConstants.OP_I2S), 2588 }, 2589 }, 2590 { // (short)(short)... = (short)... 2591 { 2592 new SimpleInstruction(InstructionConstants.OP_I2S), 2593 new SimpleInstruction(InstructionConstants.OP_I2S), 2594 },{ 2595 new SimpleInstruction(InstructionConstants.OP_I2S), 2596 }, 2597 }, 2598 { // (int)(long)... = ... 2599 { 2600 new SimpleInstruction(InstructionConstants.OP_I2L), 2601 new SimpleInstruction(InstructionConstants.OP_L2I), 2602 },{ 2603 // Nothing. 2604 }, 2605 }, 2606 { // (X)(X)... = (X)... 2607 { 2608 new ConstantInstruction(InstructionConstants.OP_CHECKCAST, X), 2609 new ConstantInstruction(InstructionConstants.OP_CHECKCAST, X), 2610 },{ 2611 new ConstantInstruction(InstructionConstants.OP_CHECKCAST, X), 2612 }, 2613 }, 2614 // Not handled correctly in all cases by VMs prior to Java 6... 2615 // { // (byte)bytes[...] = bytes[...] 2616 // { 2617 // new SimpleInstruction(InstructionConstants.OP_BALOAD), 2618 // new SimpleInstruction(InstructionConstants.OP_I2B), 2619 // },{ 2620 // new SimpleInstruction(InstructionConstants.OP_BALOAD), 2621 // }, 2622 // }, 2623 // { // (short)bytes[...] = bytes[...] 2624 // { 2625 // new SimpleInstruction(InstructionConstants.OP_BALOAD), 2626 // new SimpleInstruction(InstructionConstants.OP_I2S), 2627 // },{ 2628 // new SimpleInstruction(InstructionConstants.OP_BALOAD), 2629 // }, 2630 // }, 2631 // { // (char)chars[...] = chars[...] 2632 // { 2633 // new SimpleInstruction(InstructionConstants.OP_CALOAD), 2634 // new SimpleInstruction(InstructionConstants.OP_I2C), 2635 // },{ 2636 // new SimpleInstruction(InstructionConstants.OP_CALOAD), 2637 // }, 2638 // }, 2639 // { // (short)shorts[...] = shorts[...] 2640 // { 2641 // new SimpleInstruction(InstructionConstants.OP_SALOAD), 2642 // new SimpleInstruction(InstructionConstants.OP_I2S), 2643 // },{ 2644 // new SimpleInstruction(InstructionConstants.OP_SALOAD), 2645 // }, 2646 // }, 2647 // { // bytes[...] = (byte)... = bytes[...] = ... 2648 // { 2649 // new SimpleInstruction(InstructionConstants.OP_I2B), 2650 // new SimpleInstruction(InstructionConstants.OP_BASTORE), 2651 // },{ 2652 // new SimpleInstruction(InstructionConstants.OP_BASTORE), 2653 // }, 2654 // }, 2655 // { // chars[...] = (char)... = chars[...] = ... 2656 // { 2657 // new SimpleInstruction(InstructionConstants.OP_I2C), 2658 // new SimpleInstruction(InstructionConstants.OP_CASTORE), 2659 // },{ 2660 // new SimpleInstruction(InstructionConstants.OP_CASTORE), 2661 // }, 2662 // }, 2663 // { // shorts[...] = (short)... = shorts[...] = ... 2664 // { 2665 // new SimpleInstruction(InstructionConstants.OP_I2S), 2666 // new SimpleInstruction(InstructionConstants.OP_SASTORE), 2667 // },{ 2668 // new SimpleInstruction(InstructionConstants.OP_SASTORE), 2669 // }, 2670 // }, 2671 }; 2672 2673 public static final Instruction[][][] BRANCH = new Instruction[][][] 2674 { 2675 { // goto +3 = nothing 2676 { 2677 new BranchInstruction(InstructionConstants.OP_GOTO, 3), 2678 },{ 2679 // Nothing. 2680 }, 2681 }, 2682 { // ifeq +3 = pop 2683 { 2684 new BranchInstruction(InstructionConstants.OP_IFEQ, 3), 2685 },{ 2686 new SimpleInstruction(InstructionConstants.OP_POP), 2687 }, 2688 }, 2689 { // ifne +3 = pop 2690 { 2691 new BranchInstruction(InstructionConstants.OP_IFNE, 3), 2692 },{ 2693 new SimpleInstruction(InstructionConstants.OP_POP), 2694 }, 2695 }, 2696 { // iflt +3 = pop 2697 { 2698 new BranchInstruction(InstructionConstants.OP_IFLT, 3), 2699 },{ 2700 new SimpleInstruction(InstructionConstants.OP_POP), 2701 }, 2702 }, 2703 { // ifge +3 = pop 2704 { 2705 new BranchInstruction(InstructionConstants.OP_IFGE, 3), 2706 },{ 2707 new SimpleInstruction(InstructionConstants.OP_POP), 2708 }, 2709 }, 2710 { // ifgt +3 = pop 2711 { 2712 new BranchInstruction(InstructionConstants.OP_IFGT, 3), 2713 },{ 2714 new SimpleInstruction(InstructionConstants.OP_POP), 2715 }, 2716 }, 2717 { // ifle +3 = pop 2718 { 2719 new BranchInstruction(InstructionConstants.OP_IFLE, 3), 2720 },{ 2721 new SimpleInstruction(InstructionConstants.OP_POP), 2722 }, 2723 }, 2724 { // ificmpeq +3 = pop2 2725 { 2726 new BranchInstruction(InstructionConstants.OP_IFICMPEQ, 3), 2727 },{ 2728 new SimpleInstruction(InstructionConstants.OP_POP2), 2729 }, 2730 }, 2731 { // ificmpne +3 = pop2 2732 { 2733 new BranchInstruction(InstructionConstants.OP_IFICMPNE, 3), 2734 },{ 2735 new SimpleInstruction(InstructionConstants.OP_POP2), 2736 }, 2737 }, 2738 { // ificmplt +3 = pop2 2739 { 2740 new BranchInstruction(InstructionConstants.OP_IFICMPLT, 3), 2741 },{ 2742 new SimpleInstruction(InstructionConstants.OP_POP2), 2743 }, 2744 }, 2745 { // ificmpge +3 = pop2 2746 { 2747 new BranchInstruction(InstructionConstants.OP_IFICMPGE, 3), 2748 },{ 2749 new SimpleInstruction(InstructionConstants.OP_POP2), 2750 }, 2751 }, 2752 { // ificmpgt +3 = pop2 2753 { 2754 new BranchInstruction(InstructionConstants.OP_IFICMPGT, 3), 2755 },{ 2756 new SimpleInstruction(InstructionConstants.OP_POP2), 2757 }, 2758 }, 2759 { // ificmple +3 = pop2 2760 { 2761 new BranchInstruction(InstructionConstants.OP_IFICMPLE, 3), 2762 },{ 2763 new SimpleInstruction(InstructionConstants.OP_POP2), 2764 }, 2765 }, 2766 { // ifacmpeq +3 = pop2 2767 { 2768 new BranchInstruction(InstructionConstants.OP_IFACMPEQ, 3), 2769 },{ 2770 new SimpleInstruction(InstructionConstants.OP_POP2), 2771 }, 2772 }, 2773 { // ifacmpne +3 = pop2 2774 { 2775 new BranchInstruction(InstructionConstants.OP_IFACMPNE, 3), 2776 },{ 2777 new SimpleInstruction(InstructionConstants.OP_POP2), 2778 }, 2779 }, 2780 { // ifnull +3 = pop 2781 { 2782 new BranchInstruction(InstructionConstants.OP_IFNULL, 3), 2783 },{ 2784 new SimpleInstruction(InstructionConstants.OP_POP), 2785 }, 2786 }, 2787 { // ifnonnull +3 = pop 2788 { 2789 new BranchInstruction(InstructionConstants.OP_IFNONNULL, 3), 2790 },{ 2791 new SimpleInstruction(InstructionConstants.OP_POP), 2792 }, 2793 }, 2794 { // if (... == 0) = ifeq 2795 { 2796 new SimpleInstruction(InstructionConstants.OP_ICONST_0), 2797 new BranchInstruction(InstructionConstants.OP_IFICMPEQ, X), 2798 },{ 2799 new BranchInstruction(InstructionConstants.OP_IFEQ, X), 2800 }, 2801 }, 2802 { // if (0 == i) = iload/ifeq 2803 { 2804 new SimpleInstruction(InstructionConstants.OP_ICONST_0), 2805 new VariableInstruction(InstructionConstants.OP_ILOAD, Y), 2806 new BranchInstruction(InstructionConstants.OP_IFICMPEQ, X), 2807 },{ 2808 new VariableInstruction(InstructionConstants.OP_ILOAD, Y), 2809 new BranchInstruction(InstructionConstants.OP_IFEQ, X), 2810 }, 2811 }, 2812 { // if (0 == i) = getstatic/ifeq 2813 { 2814 new SimpleInstruction(InstructionConstants.OP_ICONST_0), 2815 new ConstantInstruction(InstructionConstants.OP_GETSTATIC, Y), 2816 new BranchInstruction(InstructionConstants.OP_IFICMPEQ, X), 2817 },{ 2818 new ConstantInstruction(InstructionConstants.OP_GETSTATIC, Y), 2819 new BranchInstruction(InstructionConstants.OP_IFEQ, X), 2820 }, 2821 }, 2822 { // if (0 == i) = getfield/ifeq 2823 { 2824 new SimpleInstruction(InstructionConstants.OP_ICONST_0), 2825 new VariableInstruction(InstructionConstants.OP_ALOAD, Y), 2826 new ConstantInstruction(InstructionConstants.OP_GETFIELD, Z), 2827 new BranchInstruction(InstructionConstants.OP_IFICMPEQ, X), 2828 },{ 2829 new VariableInstruction(InstructionConstants.OP_ALOAD, Y), 2830 new ConstantInstruction(InstructionConstants.OP_GETFIELD, Z), 2831 new BranchInstruction(InstructionConstants.OP_IFEQ, X), 2832 }, 2833 }, 2834 { // if (... != 0) = ifne 2835 { 2836 new SimpleInstruction(InstructionConstants.OP_ICONST_0), 2837 new BranchInstruction(InstructionConstants.OP_IFICMPNE, X), 2838 },{ 2839 new BranchInstruction(InstructionConstants.OP_IFNE, X), 2840 }, 2841 }, 2842 { // if (0 != i) = iload/ifeq 2843 { 2844 new SimpleInstruction(InstructionConstants.OP_ICONST_0), 2845 new VariableInstruction(InstructionConstants.OP_ILOAD, Y), 2846 new BranchInstruction(InstructionConstants.OP_IFICMPNE, X), 2847 },{ 2848 new VariableInstruction(InstructionConstants.OP_ILOAD, Y), 2849 new BranchInstruction(InstructionConstants.OP_IFNE, X), 2850 }, 2851 }, 2852 { // if (0 != i) = getstatic/ifeq 2853 { 2854 new SimpleInstruction(InstructionConstants.OP_ICONST_0), 2855 new ConstantInstruction(InstructionConstants.OP_GETSTATIC, Y), 2856 new BranchInstruction(InstructionConstants.OP_IFICMPNE, X), 2857 },{ 2858 new ConstantInstruction(InstructionConstants.OP_GETSTATIC, Y), 2859 new BranchInstruction(InstructionConstants.OP_IFNE, X), 2860 }, 2861 }, 2862 { // if (0 != i) = getfield/ifeq 2863 { 2864 new SimpleInstruction(InstructionConstants.OP_ICONST_0), 2865 new VariableInstruction(InstructionConstants.OP_ALOAD, Y), 2866 new ConstantInstruction(InstructionConstants.OP_GETFIELD, Z), 2867 new BranchInstruction(InstructionConstants.OP_IFICMPNE, X), 2868 },{ 2869 new VariableInstruction(InstructionConstants.OP_ALOAD, Y), 2870 new ConstantInstruction(InstructionConstants.OP_GETFIELD, Z), 2871 new BranchInstruction(InstructionConstants.OP_IFNE, X), 2872 }, 2873 }, 2874 { // if (... < 0) = iflt 2875 { 2876 new SimpleInstruction(InstructionConstants.OP_ICONST_0), 2877 new BranchInstruction(InstructionConstants.OP_IFICMPLT, X), 2878 },{ 2879 new BranchInstruction(InstructionConstants.OP_IFLT, X), 2880 }, 2881 }, 2882 { // if (... < 1) = ifle 2883 { 2884 new SimpleInstruction(InstructionConstants.OP_ICONST_1), 2885 new BranchInstruction(InstructionConstants.OP_IFICMPLT, X), 2886 },{ 2887 new BranchInstruction(InstructionConstants.OP_IFLE, X), 2888 }, 2889 }, 2890 { // if (0 > i) = iload/iflt 2891 { 2892 new SimpleInstruction(InstructionConstants.OP_ICONST_0), 2893 new VariableInstruction(InstructionConstants.OP_ILOAD, Y), 2894 new BranchInstruction(InstructionConstants.OP_IFICMPGT, X), 2895 },{ 2896 new VariableInstruction(InstructionConstants.OP_ILOAD, Y), 2897 new BranchInstruction(InstructionConstants.OP_IFLT, X), 2898 }, 2899 }, 2900 { // if (1 > i) = iload/ifle 2901 { 2902 new SimpleInstruction(InstructionConstants.OP_ICONST_1), 2903 new VariableInstruction(InstructionConstants.OP_ILOAD, Y), 2904 new BranchInstruction(InstructionConstants.OP_IFICMPGT, X), 2905 },{ 2906 new VariableInstruction(InstructionConstants.OP_ILOAD, Y), 2907 new BranchInstruction(InstructionConstants.OP_IFLE, X), 2908 }, 2909 }, 2910 { // if (0 > i) = getstatic/iflt 2911 { 2912 new SimpleInstruction(InstructionConstants.OP_ICONST_0), 2913 new ConstantInstruction(InstructionConstants.OP_GETSTATIC, Y), 2914 new BranchInstruction(InstructionConstants.OP_IFICMPGT, X), 2915 },{ 2916 new ConstantInstruction(InstructionConstants.OP_GETSTATIC, Y), 2917 new BranchInstruction(InstructionConstants.OP_IFLT, X), 2918 }, 2919 }, 2920 { // if (1 > i) = getstatic/ifle 2921 { 2922 new SimpleInstruction(InstructionConstants.OP_ICONST_1), 2923 new ConstantInstruction(InstructionConstants.OP_GETSTATIC, Y), 2924 new BranchInstruction(InstructionConstants.OP_IFICMPGT, X), 2925 },{ 2926 new ConstantInstruction(InstructionConstants.OP_GETSTATIC, Y), 2927 new BranchInstruction(InstructionConstants.OP_IFLE, X), 2928 }, 2929 }, 2930 { // if (0 > i) = getfield/iflt 2931 { 2932 new SimpleInstruction(InstructionConstants.OP_ICONST_0), 2933 new VariableInstruction(InstructionConstants.OP_ALOAD, Y), 2934 new ConstantInstruction(InstructionConstants.OP_GETFIELD, Z), 2935 new BranchInstruction(InstructionConstants.OP_IFICMPGT, X), 2936 },{ 2937 new VariableInstruction(InstructionConstants.OP_ALOAD, Y), 2938 new ConstantInstruction(InstructionConstants.OP_GETFIELD, Z), 2939 new BranchInstruction(InstructionConstants.OP_IFLT, X), 2940 }, 2941 }, 2942 { // if (1 > i) = getfield/ifle 2943 { 2944 new SimpleInstruction(InstructionConstants.OP_ICONST_1), 2945 new VariableInstruction(InstructionConstants.OP_ALOAD, Y), 2946 new ConstantInstruction(InstructionConstants.OP_GETFIELD, Z), 2947 new BranchInstruction(InstructionConstants.OP_IFICMPGT, X), 2948 },{ 2949 new VariableInstruction(InstructionConstants.OP_ALOAD, Y), 2950 new ConstantInstruction(InstructionConstants.OP_GETFIELD, Z), 2951 new BranchInstruction(InstructionConstants.OP_IFLE, X), 2952 }, 2953 }, 2954 { // if (... >= 0) = ifge 2955 { 2956 new SimpleInstruction(InstructionConstants.OP_ICONST_0), 2957 new BranchInstruction(InstructionConstants.OP_IFICMPGE, X), 2958 },{ 2959 new BranchInstruction(InstructionConstants.OP_IFGE, X), 2960 }, 2961 }, 2962 { // if (... >= 1) = ifgt 2963 { 2964 new SimpleInstruction(InstructionConstants.OP_ICONST_1), 2965 new BranchInstruction(InstructionConstants.OP_IFICMPGE, X), 2966 },{ 2967 new BranchInstruction(InstructionConstants.OP_IFGT, X), 2968 }, 2969 }, 2970 { // if (0 <= i) = iload/ifge 2971 { 2972 new SimpleInstruction(InstructionConstants.OP_ICONST_0), 2973 new VariableInstruction(InstructionConstants.OP_ILOAD, Y), 2974 new BranchInstruction(InstructionConstants.OP_IFICMPLE, X), 2975 },{ 2976 new VariableInstruction(InstructionConstants.OP_ILOAD, Y), 2977 new BranchInstruction(InstructionConstants.OP_IFGE, X), 2978 }, 2979 }, 2980 { // if (1 <= i) = iload/ifgt 2981 { 2982 new SimpleInstruction(InstructionConstants.OP_ICONST_1), 2983 new VariableInstruction(InstructionConstants.OP_ILOAD, Y), 2984 new BranchInstruction(InstructionConstants.OP_IFICMPLE, X), 2985 },{ 2986 new VariableInstruction(InstructionConstants.OP_ILOAD, Y), 2987 new BranchInstruction(InstructionConstants.OP_IFGT, X), 2988 }, 2989 }, 2990 { // if (0 <= i) = getstatic/ifge 2991 { 2992 new SimpleInstruction(InstructionConstants.OP_ICONST_0), 2993 new ConstantInstruction(InstructionConstants.OP_GETSTATIC, Y), 2994 new BranchInstruction(InstructionConstants.OP_IFICMPLE, X), 2995 },{ 2996 new ConstantInstruction(InstructionConstants.OP_GETSTATIC, Y), 2997 new BranchInstruction(InstructionConstants.OP_IFGE, X), 2998 }, 2999 }, 3000 { // if (1 <= i) = getstatic/ifgt 3001 { 3002 new SimpleInstruction(InstructionConstants.OP_ICONST_1), 3003 new ConstantInstruction(InstructionConstants.OP_GETSTATIC, Y), 3004 new BranchInstruction(InstructionConstants.OP_IFICMPLE, X), 3005 },{ 3006 new ConstantInstruction(InstructionConstants.OP_GETSTATIC, Y), 3007 new BranchInstruction(InstructionConstants.OP_IFGT, X), 3008 }, 3009 }, 3010 { // if (0 <= i) = getfield/ifge 3011 { 3012 new SimpleInstruction(InstructionConstants.OP_ICONST_0), 3013 new VariableInstruction(InstructionConstants.OP_ALOAD, Y), 3014 new ConstantInstruction(InstructionConstants.OP_GETFIELD, Z), 3015 new BranchInstruction(InstructionConstants.OP_IFICMPLE, X), 3016 },{ 3017 new VariableInstruction(InstructionConstants.OP_ALOAD, Y), 3018 new ConstantInstruction(InstructionConstants.OP_GETFIELD, Z), 3019 new BranchInstruction(InstructionConstants.OP_IFGE, X), 3020 }, 3021 }, 3022 { // if (1 <= i) = getfield/ifgt 3023 { 3024 new SimpleInstruction(InstructionConstants.OP_ICONST_1), 3025 new VariableInstruction(InstructionConstants.OP_ALOAD, Y), 3026 new ConstantInstruction(InstructionConstants.OP_GETFIELD, Z), 3027 new BranchInstruction(InstructionConstants.OP_IFICMPLE, X), 3028 },{ 3029 new VariableInstruction(InstructionConstants.OP_ALOAD, Y), 3030 new ConstantInstruction(InstructionConstants.OP_GETFIELD, Z), 3031 new BranchInstruction(InstructionConstants.OP_IFGT, X), 3032 }, 3033 }, 3034 { // if (... > 0) = ifgt 3035 { 3036 new SimpleInstruction(InstructionConstants.OP_ICONST_0), 3037 new BranchInstruction(InstructionConstants.OP_IFICMPGT, X), 3038 },{ 3039 new BranchInstruction(InstructionConstants.OP_IFGT, X), 3040 }, 3041 }, 3042 { // if (... > -1) = ifge 3043 { 3044 new SimpleInstruction(InstructionConstants.OP_ICONST_M1), 3045 new BranchInstruction(InstructionConstants.OP_IFICMPGT, X), 3046 },{ 3047 new BranchInstruction(InstructionConstants.OP_IFGE, X), 3048 }, 3049 }, 3050 { // if (0 < i) = iload/ifgt 3051 { 3052 new SimpleInstruction(InstructionConstants.OP_ICONST_0), 3053 new VariableInstruction(InstructionConstants.OP_ILOAD, Y), 3054 new BranchInstruction(InstructionConstants.OP_IFICMPLT, X), 3055 },{ 3056 new VariableInstruction(InstructionConstants.OP_ILOAD, Y), 3057 new BranchInstruction(InstructionConstants.OP_IFGT, X), 3058 }, 3059 }, 3060 { // if (-1 < i) = iload/ifge 3061 { 3062 new SimpleInstruction(InstructionConstants.OP_ICONST_M1), 3063 new VariableInstruction(InstructionConstants.OP_ILOAD, Y), 3064 new BranchInstruction(InstructionConstants.OP_IFICMPLT, X), 3065 },{ 3066 new VariableInstruction(InstructionConstants.OP_ILOAD, Y), 3067 new BranchInstruction(InstructionConstants.OP_IFGE, X), 3068 }, 3069 }, 3070 { // if (0 < i) = getstatic/ifgt 3071 { 3072 new SimpleInstruction(InstructionConstants.OP_ICONST_0), 3073 new ConstantInstruction(InstructionConstants.OP_GETSTATIC, Y), 3074 new BranchInstruction(InstructionConstants.OP_IFICMPLT, X), 3075 },{ 3076 new ConstantInstruction(InstructionConstants.OP_GETSTATIC, Y), 3077 new BranchInstruction(InstructionConstants.OP_IFGT, X), 3078 }, 3079 }, 3080 { // if (-1 < i) = getstatic/ifge 3081 { 3082 new SimpleInstruction(InstructionConstants.OP_ICONST_M1), 3083 new ConstantInstruction(InstructionConstants.OP_GETSTATIC, Y), 3084 new BranchInstruction(InstructionConstants.OP_IFICMPLT, X), 3085 },{ 3086 new ConstantInstruction(InstructionConstants.OP_GETSTATIC, Y), 3087 new BranchInstruction(InstructionConstants.OP_IFGE, X), 3088 }, 3089 }, 3090 { // if (0 < i) = getfield/ifgt 3091 { 3092 new SimpleInstruction(InstructionConstants.OP_ICONST_0), 3093 new VariableInstruction(InstructionConstants.OP_ALOAD, Y), 3094 new ConstantInstruction(InstructionConstants.OP_GETFIELD, Z), 3095 new BranchInstruction(InstructionConstants.OP_IFICMPLT, X), 3096 },{ 3097 new VariableInstruction(InstructionConstants.OP_ALOAD, Y), 3098 new ConstantInstruction(InstructionConstants.OP_GETFIELD, Z), 3099 new BranchInstruction(InstructionConstants.OP_IFGT, X), 3100 }, 3101 }, 3102 { // if (-1 < i) = getfield/ifge 3103 { 3104 new SimpleInstruction(InstructionConstants.OP_ICONST_M1), 3105 new VariableInstruction(InstructionConstants.OP_ALOAD, Y), 3106 new ConstantInstruction(InstructionConstants.OP_GETFIELD, Z), 3107 new BranchInstruction(InstructionConstants.OP_IFICMPLT, X), 3108 },{ 3109 new VariableInstruction(InstructionConstants.OP_ALOAD, Y), 3110 new ConstantInstruction(InstructionConstants.OP_GETFIELD, Z), 3111 new BranchInstruction(InstructionConstants.OP_IFGE, X), 3112 }, 3113 }, 3114 { // if (... <= 0) = ifle 3115 { 3116 new SimpleInstruction(InstructionConstants.OP_ICONST_0), 3117 new BranchInstruction(InstructionConstants.OP_IFICMPLE, X), 3118 },{ 3119 new BranchInstruction(InstructionConstants.OP_IFLE, X), 3120 }, 3121 }, 3122 { // if (... <= -1) = iflt 3123 { 3124 new SimpleInstruction(InstructionConstants.OP_ICONST_M1), 3125 new BranchInstruction(InstructionConstants.OP_IFICMPLE, X), 3126 },{ 3127 new BranchInstruction(InstructionConstants.OP_IFLT, X), 3128 }, 3129 }, 3130 { // if (0 >= i) = iload/ifle 3131 { 3132 new SimpleInstruction(InstructionConstants.OP_ICONST_0), 3133 new VariableInstruction(InstructionConstants.OP_ILOAD, Y), 3134 new BranchInstruction(InstructionConstants.OP_IFICMPGE, X), 3135 },{ 3136 new VariableInstruction(InstructionConstants.OP_ILOAD, Y), 3137 new BranchInstruction(InstructionConstants.OP_IFLE, X), 3138 }, 3139 }, 3140 { // if (-1 >= i) = iload/iflt 3141 { 3142 new SimpleInstruction(InstructionConstants.OP_ICONST_M1), 3143 new VariableInstruction(InstructionConstants.OP_ILOAD, Y), 3144 new BranchInstruction(InstructionConstants.OP_IFICMPGE, X), 3145 },{ 3146 new VariableInstruction(InstructionConstants.OP_ILOAD, Y), 3147 new BranchInstruction(InstructionConstants.OP_IFLT, X), 3148 }, 3149 }, 3150 { // if (0 >= i) = getstatic/ifle 3151 { 3152 new SimpleInstruction(InstructionConstants.OP_ICONST_0), 3153 new ConstantInstruction(InstructionConstants.OP_GETSTATIC, Y), 3154 new BranchInstruction(InstructionConstants.OP_IFICMPGE, X), 3155 },{ 3156 new ConstantInstruction(InstructionConstants.OP_GETSTATIC, Y), 3157 new BranchInstruction(InstructionConstants.OP_IFLE, X), 3158 }, 3159 }, 3160 { // if (-1 >= i) = getstatic/iflt 3161 { 3162 new SimpleInstruction(InstructionConstants.OP_ICONST_M1), 3163 new ConstantInstruction(InstructionConstants.OP_GETSTATIC, Y), 3164 new BranchInstruction(InstructionConstants.OP_IFICMPGE, X), 3165 },{ 3166 new ConstantInstruction(InstructionConstants.OP_GETSTATIC, Y), 3167 new BranchInstruction(InstructionConstants.OP_IFLT, X), 3168 }, 3169 }, 3170 { // if (0 >= i) = getfield/ifle 3171 { 3172 new SimpleInstruction(InstructionConstants.OP_ICONST_0), 3173 new VariableInstruction(InstructionConstants.OP_ALOAD, Y), 3174 new ConstantInstruction(InstructionConstants.OP_GETFIELD, Z), 3175 new BranchInstruction(InstructionConstants.OP_IFICMPGE, X), 3176 },{ 3177 new VariableInstruction(InstructionConstants.OP_ALOAD, Y), 3178 new ConstantInstruction(InstructionConstants.OP_GETFIELD, Z), 3179 new BranchInstruction(InstructionConstants.OP_IFLE, X), 3180 }, 3181 }, 3182 { // if (-1 >= i) = getfield/iflt 3183 { 3184 new SimpleInstruction(InstructionConstants.OP_ICONST_M1), 3185 new VariableInstruction(InstructionConstants.OP_ALOAD, Y), 3186 new ConstantInstruction(InstructionConstants.OP_GETFIELD, Z), 3187 new BranchInstruction(InstructionConstants.OP_IFICMPGE, X), 3188 },{ 3189 new VariableInstruction(InstructionConstants.OP_ALOAD, Y), 3190 new ConstantInstruction(InstructionConstants.OP_GETFIELD, Z), 3191 new BranchInstruction(InstructionConstants.OP_IFLT, X), 3192 }, 3193 }, 3194 { // if (... == null) = ifnull 3195 { 3196 new SimpleInstruction(InstructionConstants.OP_ACONST_NULL), 3197 new BranchInstruction(InstructionConstants.OP_IFACMPEQ, X), 3198 },{ 3199 new BranchInstruction(InstructionConstants.OP_IFNULL, X), 3200 }, 3201 }, 3202 { // if (null == a) = aload/ifnull 3203 { 3204 new SimpleInstruction(InstructionConstants.OP_ACONST_NULL), 3205 new VariableInstruction(InstructionConstants.OP_ALOAD, Y), 3206 new BranchInstruction(InstructionConstants.OP_IFACMPEQ, X), 3207 },{ 3208 new VariableInstruction(InstructionConstants.OP_ALOAD, Y), 3209 new BranchInstruction(InstructionConstants.OP_IFNULL, X), 3210 }, 3211 }, 3212 { // if (null == a) = getstatic/ifnull 3213 { 3214 new SimpleInstruction(InstructionConstants.OP_ACONST_NULL), 3215 new ConstantInstruction(InstructionConstants.OP_GETSTATIC, Y), 3216 new BranchInstruction(InstructionConstants.OP_IFACMPEQ, X), 3217 },{ 3218 new ConstantInstruction(InstructionConstants.OP_GETSTATIC, Y), 3219 new BranchInstruction(InstructionConstants.OP_IFNULL, X), 3220 }, 3221 }, 3222 { // if (null == a) = getfield/ifnull 3223 { 3224 new SimpleInstruction(InstructionConstants.OP_ACONST_NULL), 3225 new VariableInstruction(InstructionConstants.OP_ALOAD, Y), 3226 new ConstantInstruction(InstructionConstants.OP_GETFIELD, Z), 3227 new BranchInstruction(InstructionConstants.OP_IFACMPEQ, X), 3228 },{ 3229 new VariableInstruction(InstructionConstants.OP_ALOAD, Y), 3230 new ConstantInstruction(InstructionConstants.OP_GETFIELD, Z), 3231 new BranchInstruction(InstructionConstants.OP_IFNULL, X), 3232 }, 3233 }, 3234 { // if (... != null) = ifnonnull 3235 { 3236 new SimpleInstruction(InstructionConstants.OP_ACONST_NULL), 3237 new BranchInstruction(InstructionConstants.OP_IFACMPNE, X), 3238 },{ 3239 new BranchInstruction(InstructionConstants.OP_IFNONNULL, X), 3240 }, 3241 }, 3242 { // if (null != a) = aload/ifnonnull 3243 { 3244 new SimpleInstruction(InstructionConstants.OP_ACONST_NULL), 3245 new VariableInstruction(InstructionConstants.OP_ALOAD, Y), 3246 new BranchInstruction(InstructionConstants.OP_IFACMPNE, X), 3247 },{ 3248 new VariableInstruction(InstructionConstants.OP_ALOAD, Y), 3249 new BranchInstruction(InstructionConstants.OP_IFNONNULL, X), 3250 }, 3251 }, 3252 { // if (null != a) = getstatic/ifnonnull 3253 { 3254 new SimpleInstruction(InstructionConstants.OP_ACONST_NULL), 3255 new ConstantInstruction(InstructionConstants.OP_GETSTATIC, Y), 3256 new BranchInstruction(InstructionConstants.OP_IFACMPNE, X), 3257 },{ 3258 new ConstantInstruction(InstructionConstants.OP_GETSTATIC, Y), 3259 new BranchInstruction(InstructionConstants.OP_IFNONNULL, X), 3260 }, 3261 }, 3262 { // if (null != a) = getfield/ifnonnull 3263 { 3264 new SimpleInstruction(InstructionConstants.OP_ACONST_NULL), 3265 new VariableInstruction(InstructionConstants.OP_ALOAD, Y), 3266 new ConstantInstruction(InstructionConstants.OP_GETFIELD, Z), 3267 new BranchInstruction(InstructionConstants.OP_IFACMPNE, X), 3268 },{ 3269 new VariableInstruction(InstructionConstants.OP_ALOAD, Y), 3270 new ConstantInstruction(InstructionConstants.OP_GETFIELD, Z), 3271 new BranchInstruction(InstructionConstants.OP_IFNONNULL, X), 3272 }, 3273 }, 3274 { // iconst_0/ifeq = goto 3275 { 3276 new SimpleInstruction(InstructionConstants.OP_ICONST_0), 3277 new BranchInstruction(InstructionConstants.OP_IFEQ, X), 3278 },{ 3279 new BranchInstruction(InstructionConstants.OP_GOTO, X), 3280 }, 3281 }, 3282 { // iconst/ifeq = nothing 3283 { 3284 new SimpleInstruction(InstructionConstants.OP_ICONST_0, A), 3285 new BranchInstruction(InstructionConstants.OP_IFEQ, X), 3286 },{ 3287 // Nothing. 3288 }, 3289 }, 3290 { // bipush/ifeq = nothing 3291 { 3292 new SimpleInstruction(InstructionConstants.OP_BIPUSH, A), 3293 new BranchInstruction(InstructionConstants.OP_IFEQ, X), 3294 },{ 3295 // Nothing. 3296 }, 3297 }, 3298 { // sipush/ifeq = nothing 3299 { 3300 new SimpleInstruction(InstructionConstants.OP_SIPUSH, A), 3301 new BranchInstruction(InstructionConstants.OP_IFEQ, X), 3302 },{ 3303 // Nothing. 3304 }, 3305 }, 3306 { // iconst_0/ifne = nothing 3307 { 3308 new SimpleInstruction(InstructionConstants.OP_ICONST_0), 3309 new BranchInstruction(InstructionConstants.OP_IFNE, X), 3310 },{ 3311 // Nothing. 3312 }, 3313 }, 3314 { // iconst/ifne = goto 3315 { 3316 new SimpleInstruction(InstructionConstants.OP_ICONST_0, A), 3317 new BranchInstruction(InstructionConstants.OP_IFNE, X), 3318 },{ 3319 new BranchInstruction(InstructionConstants.OP_GOTO, X), 3320 }, 3321 }, 3322 { // bipush/ifne = goto 3323 { 3324 new SimpleInstruction(InstructionConstants.OP_BIPUSH, A), 3325 new BranchInstruction(InstructionConstants.OP_IFNE, X), 3326 },{ 3327 new BranchInstruction(InstructionConstants.OP_GOTO, X), 3328 }, 3329 }, 3330 { // sipush/ifne = goto 3331 { 3332 new SimpleInstruction(InstructionConstants.OP_SIPUSH, A), 3333 new BranchInstruction(InstructionConstants.OP_IFNE, X), 3334 },{ 3335 new BranchInstruction(InstructionConstants.OP_GOTO, X), 3336 }, 3337 }, 3338 { // iconst_0/iflt = nothing 3339 { 3340 new SimpleInstruction(InstructionConstants.OP_ICONST_0), 3341 new BranchInstruction(InstructionConstants.OP_IFLT, X), 3342 },{ 3343 // Nothing. 3344 }, 3345 }, 3346 { // iconst_0/ifge = goto 3347 { 3348 new SimpleInstruction(InstructionConstants.OP_ICONST_0), 3349 new BranchInstruction(InstructionConstants.OP_IFGE, X), 3350 },{ 3351 new BranchInstruction(InstructionConstants.OP_GOTO, X), 3352 }, 3353 }, 3354 { // iconst_0/ifgt = nothing 3355 { 3356 new SimpleInstruction(InstructionConstants.OP_ICONST_0), 3357 new BranchInstruction(InstructionConstants.OP_IFGT, X), 3358 },{ 3359 // Nothing. 3360 }, 3361 }, 3362 { // iconst_0/ifle = goto 3363 { 3364 new SimpleInstruction(InstructionConstants.OP_ICONST_0), 3365 new BranchInstruction(InstructionConstants.OP_IFLE, X), 3366 },{ 3367 new BranchInstruction(InstructionConstants.OP_GOTO, X), 3368 }, 3369 }, 3370 { // aconst_null/ifnull = goto 3371 { 3372 new SimpleInstruction(InstructionConstants.OP_ACONST_NULL), 3373 new BranchInstruction(InstructionConstants.OP_IFNULL, X), 3374 },{ 3375 new BranchInstruction(InstructionConstants.OP_GOTO, X), 3376 }, 3377 }, 3378 { // aconst_null/ifnonnul = nothing 3379 { 3380 new SimpleInstruction(InstructionConstants.OP_ACONST_NULL), 3381 new BranchInstruction(InstructionConstants.OP_IFNONNULL, X), 3382 },{ 3383 // Nothing. 3384 }, 3385 }, 3386 { // ifeq/goto = ifne 3387 { 3388 new BranchInstruction(InstructionConstants.OP_IFEQ, 6), 3389 new BranchInstruction(InstructionConstants.OP_GOTO, X), 3390 },{ 3391 new BranchInstruction(InstructionConstants.OP_IFNE, X), 3392 }, 3393 }, 3394 { // ifne/goto = ifeq 3395 { 3396 new BranchInstruction(InstructionConstants.OP_IFNE, 6), 3397 new BranchInstruction(InstructionConstants.OP_GOTO, X), 3398 },{ 3399 new BranchInstruction(InstructionConstants.OP_IFEQ, X), 3400 }, 3401 }, 3402 { // iflt/goto = ifge 3403 { 3404 new BranchInstruction(InstructionConstants.OP_IFLT, 6), 3405 new BranchInstruction(InstructionConstants.OP_GOTO, X), 3406 },{ 3407 new BranchInstruction(InstructionConstants.OP_IFGE, X), 3408 }, 3409 }, 3410 { // ifge/goto = iflt 3411 { 3412 new BranchInstruction(InstructionConstants.OP_IFGE, 6), 3413 new BranchInstruction(InstructionConstants.OP_GOTO, X), 3414 },{ 3415 new BranchInstruction(InstructionConstants.OP_IFLT, X), 3416 }, 3417 }, 3418 { // ifgt/goto = ifle 3419 { 3420 new BranchInstruction(InstructionConstants.OP_IFGT, 6), 3421 new BranchInstruction(InstructionConstants.OP_GOTO, X), 3422 },{ 3423 new BranchInstruction(InstructionConstants.OP_IFLE, X), 3424 }, 3425 }, 3426 { // ifle/goto = ifgt 3427 { 3428 new BranchInstruction(InstructionConstants.OP_IFLE, 6), 3429 new BranchInstruction(InstructionConstants.OP_GOTO, X), 3430 },{ 3431 new BranchInstruction(InstructionConstants.OP_IFGT, X), 3432 }, 3433 }, 3434 { // ificmpeq/goto = ificmpne 3435 { 3436 new BranchInstruction(InstructionConstants.OP_IFICMPEQ, 6), 3437 new BranchInstruction(InstructionConstants.OP_GOTO, X), 3438 },{ 3439 new BranchInstruction(InstructionConstants.OP_IFICMPNE, X), 3440 }, 3441 }, 3442 { // ificmpne/goto = ificmpeq 3443 { 3444 new BranchInstruction(InstructionConstants.OP_IFICMPNE, 6), 3445 new BranchInstruction(InstructionConstants.OP_GOTO, X), 3446 },{ 3447 new BranchInstruction(InstructionConstants.OP_IFICMPEQ, X), 3448 }, 3449 }, 3450 { // ificmplt/goto = ificmpge 3451 { 3452 new BranchInstruction(InstructionConstants.OP_IFICMPLT, 6), 3453 new BranchInstruction(InstructionConstants.OP_GOTO, X), 3454 },{ 3455 new BranchInstruction(InstructionConstants.OP_IFICMPGE, X), 3456 }, 3457 }, 3458 { // ificmpge/goto = ificmplt 3459 { 3460 new BranchInstruction(InstructionConstants.OP_IFICMPGE, 6), 3461 new BranchInstruction(InstructionConstants.OP_GOTO, X), 3462 },{ 3463 new BranchInstruction(InstructionConstants.OP_IFICMPLT, X), 3464 }, 3465 }, 3466 { // ificmpgt/goto = ificmple 3467 { 3468 new BranchInstruction(InstructionConstants.OP_IFICMPGT, 6), 3469 new BranchInstruction(InstructionConstants.OP_GOTO, X), 3470 },{ 3471 new BranchInstruction(InstructionConstants.OP_IFICMPLE, X), 3472 }, 3473 }, 3474 { // ificmple/goto = ificmpgt 3475 { 3476 new BranchInstruction(InstructionConstants.OP_IFICMPLE, 6), 3477 new BranchInstruction(InstructionConstants.OP_GOTO, X), 3478 },{ 3479 new BranchInstruction(InstructionConstants.OP_IFICMPGT, X), 3480 }, 3481 }, 3482 { // ifacmpeq/goto = ifacmpne 3483 { 3484 new BranchInstruction(InstructionConstants.OP_IFACMPEQ, 6), 3485 new BranchInstruction(InstructionConstants.OP_GOTO, X), 3486 },{ 3487 new BranchInstruction(InstructionConstants.OP_IFACMPNE, X), 3488 }, 3489 }, 3490 { // ifacmpne/goto = ifacmpeq 3491 { 3492 new BranchInstruction(InstructionConstants.OP_IFACMPNE, 6), 3493 new BranchInstruction(InstructionConstants.OP_GOTO, X), 3494 },{ 3495 new BranchInstruction(InstructionConstants.OP_IFACMPEQ, X), 3496 }, 3497 }, 3498 { // ifnull/goto = ifnonnull 3499 { 3500 new BranchInstruction(InstructionConstants.OP_IFNULL, 6), 3501 new BranchInstruction(InstructionConstants.OP_GOTO, X), 3502 },{ 3503 new BranchInstruction(InstructionConstants.OP_IFNONNULL, X), 3504 }, 3505 }, 3506 { // ifnonnull/goto = ifnull 3507 { 3508 new BranchInstruction(InstructionConstants.OP_IFNONNULL, 6), 3509 new BranchInstruction(InstructionConstants.OP_GOTO, X), 3510 },{ 3511 new BranchInstruction(InstructionConstants.OP_IFNULL, X), 3512 }, 3513 }, 3514 // { // switch (...) { default: ... } = pop/goto ... 3515 // { 3516 // new TableSwitchInstruction(InstructionConstants.OP_TABLESWITCH, A, X, Y, 0, new int[0]), 3517 // },{ 3518 // new SimpleInstruction(InstructionConstants.OP_POP), 3519 // new BranchInstruction(InstructionConstants.OP_GOTO, A), 3520 // }, 3521 // }, 3522 // { // switch (...) { default: ... } = pop/goto ... 3523 // { 3524 // new LookUpSwitchInstruction(InstructionConstants.OP_LOOKUPSWITCH, A, 0, new int[0], new int[0]), 3525 // },{ 3526 // new SimpleInstruction(InstructionConstants.OP_POP), 3527 // new BranchInstruction(InstructionConstants.OP_GOTO, A), 3528 // }, 3529 // }, 3530 { // switch (...) { case/case/default: ... } = switch (...) { case/default: ... } 3531 { 3532 new LookUpSwitchInstruction(InstructionConstants.OP_LOOKUPSWITCH, A, new int[] { X, Y }, new int[] { A, B }), 3533 },{ 3534 new LookUpSwitchInstruction(InstructionConstants.OP_LOOKUPSWITCH, A, new int[] { Y }, new int[] { B }), 3535 }, 3536 }, 3537 { // switch (...) { case/case/default: ... } = switch (...) { case/default: ... } 3538 { 3539 new LookUpSwitchInstruction(InstructionConstants.OP_LOOKUPSWITCH, B, new int[] { X, Y }, new int[] { A, B }), 3540 },{ 3541 new LookUpSwitchInstruction(InstructionConstants.OP_LOOKUPSWITCH, B, new int[] { X }, new int[] { A }), 3542 }, 3543 }, 3544 { // switch (...) { case/case/case/default: ... } = switch (...) { case/case/default: ... } 3545 { 3546 new LookUpSwitchInstruction(InstructionConstants.OP_LOOKUPSWITCH, A, new int[] { X, Y, Z }, new int[] { A, B, C }), 3547 },{ 3548 new LookUpSwitchInstruction(InstructionConstants.OP_LOOKUPSWITCH, A, new int[] { Y, Z }, new int[] { B, C }), 3549 }, 3550 }, 3551 { // switch (...) { case/case/case/default: ... } = switch (...) { case/case/default: ... } 3552 { 3553 new LookUpSwitchInstruction(InstructionConstants.OP_LOOKUPSWITCH, B, new int[] { X, Y, Z }, new int[] { A, B, C }), 3554 },{ 3555 new LookUpSwitchInstruction(InstructionConstants.OP_LOOKUPSWITCH, B, new int[] { X, Z }, new int[] { A, C }), 3556 }, 3557 }, 3558 { // switch (...) { case/case/case/default: ... } = switch (...) { case/case/default: ... } 3559 { 3560 new LookUpSwitchInstruction(InstructionConstants.OP_LOOKUPSWITCH, C, new int[] { X, Y, Z }, new int[] { A, B, C }), 3561 },{ 3562 new LookUpSwitchInstruction(InstructionConstants.OP_LOOKUPSWITCH, C, new int[] { X, Y }, new int[] { A, B }), 3563 }, 3564 }, 3565 // { // switch (...) { case ...: ... default: ... } 3566 // // = if (... == ...) ... else ... 3567 // { 3568 // new TableSwitchInstruction(InstructionConstants.OP_TABLESWITCH, A, X, Y, 1, new int[] { B }), 3569 // },{ 3570 // new SimpleInstruction(InstructionConstants.OP_SIPUSH, X), 3571 // new BranchInstruction(InstructionConstants.OP_IFICMPNE, A), 3572 // new BranchInstruction(InstructionConstants.OP_GOTO, B), 3573 // }, 3574 // }, 3575 // { // switch (...) { case ...: ... default: ... } 3576 // // = if (... == ...) ... else ... 3577 // { 3578 // new LookUpSwitchInstruction(InstructionConstants.OP_LOOKUPSWITCH, A, 1, new int[] { X }, new int[] { B }), 3579 // },{ 3580 // new SimpleInstruction(InstructionConstants.OP_SIPUSH, X), 3581 // new BranchInstruction(InstructionConstants.OP_IFICMPNE, A), 3582 // new BranchInstruction(InstructionConstants.OP_GOTO, B), 3583 // }, 3584 // } 3585 }; 3586 3587 public static final Instruction[][][] STRING = new Instruction[][][] 3588 { 3589 { // "...".equals("...") = true 3590 { 3591 new ConstantInstruction(InstructionConstants.OP_LDC, A), 3592 new ConstantInstruction(InstructionConstants.OP_LDC, A), 3593 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRING_EQUALS), 3594 },{ 3595 new SimpleInstruction(InstructionConstants.OP_ICONST_1), 3596 }, 3597 }, 3598 { // "...".length() = ... 3599 { 3600 new ConstantInstruction(InstructionConstants.OP_LDC, A), 3601 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRING_LENGTH), 3602 },{ 3603 new SimpleInstruction(InstructionConstants.OP_SIPUSH, STRING_A_LENGTH), 3604 }, 3605 }, 3606 { // String.valueOf(Z) = ".... 3607 { 3608 new SimpleInstruction(InstructionConstants.OP_ICONST_0, A), 3609 new ConstantInstruction(InstructionConstants.OP_INVOKESTATIC, METHOD_STRING_VALUEOF_Z), 3610 },{ 3611 new ConstantInstruction(InstructionConstants.OP_LDC, BOOLEAN_A_STRING), 3612 }, 3613 }, 3614 { // String.valueOf(C) = "...." 3615 { 3616 new SimpleInstruction(InstructionConstants.OP_ICONST_0, A), 3617 new ConstantInstruction(InstructionConstants.OP_INVOKESTATIC, METHOD_STRING_VALUEOF_C), 3618 },{ 3619 new ConstantInstruction(InstructionConstants.OP_LDC, CHAR_A_STRING), 3620 }, 3621 }, 3622 { // String.valueOf(Cc) = "...." 3623 { 3624 new ConstantInstruction(InstructionConstants.OP_LDC, A), 3625 new ConstantInstruction(InstructionConstants.OP_INVOKESTATIC, METHOD_STRING_VALUEOF_C), 3626 },{ 3627 new ConstantInstruction(InstructionConstants.OP_LDC, CHAR_A_STRING), 3628 }, 3629 }, 3630 { // String.valueOf(I) = "...." 3631 { 3632 new SimpleInstruction(InstructionConstants.OP_ICONST_0, A), 3633 new ConstantInstruction(InstructionConstants.OP_INVOKESTATIC, METHOD_STRING_VALUEOF_I), 3634 },{ 3635 new ConstantInstruction(InstructionConstants.OP_LDC, INT_A_STRING), 3636 }, 3637 }, 3638 { // String.valueOf(Ic) = "...." 3639 { 3640 new ConstantInstruction(InstructionConstants.OP_LDC, A), 3641 new ConstantInstruction(InstructionConstants.OP_INVOKESTATIC, METHOD_STRING_VALUEOF_I), 3642 },{ 3643 new ConstantInstruction(InstructionConstants.OP_LDC, INT_A_STRING), 3644 }, 3645 }, 3646 { // String.valueOf(J) = "...." 3647 { 3648 new SimpleInstruction(InstructionConstants.OP_LCONST_0, A), 3649 new ConstantInstruction(InstructionConstants.OP_INVOKESTATIC, METHOD_STRING_VALUEOF_J), 3650 },{ 3651 new ConstantInstruction(InstructionConstants.OP_LDC, LONG_A_STRING), 3652 }, 3653 }, 3654 { // String.valueOf(Jc) = "...." 3655 { 3656 new ConstantInstruction(InstructionConstants.OP_LDC2_W, A), 3657 new ConstantInstruction(InstructionConstants.OP_INVOKESTATIC, METHOD_STRING_VALUEOF_J), 3658 },{ 3659 new ConstantInstruction(InstructionConstants.OP_LDC, LONG_A_STRING), 3660 }, 3661 }, 3662 { // String.valueOf(F) = "...." 3663 { 3664 new SimpleInstruction(InstructionConstants.OP_FCONST_0, A), 3665 new ConstantInstruction(InstructionConstants.OP_INVOKESTATIC, METHOD_STRING_VALUEOF_F), 3666 },{ 3667 new ConstantInstruction(InstructionConstants.OP_LDC, FLOAT_A_STRING), 3668 }, 3669 }, 3670 { // String.valueOf(Fc) = "...." 3671 { 3672 new ConstantInstruction(InstructionConstants.OP_LDC, A), 3673 new ConstantInstruction(InstructionConstants.OP_INVOKESTATIC, METHOD_STRING_VALUEOF_F), 3674 },{ 3675 new ConstantInstruction(InstructionConstants.OP_LDC, FLOAT_A_STRING), 3676 }, 3677 }, 3678 { // String.valueOf(D) = "...." 3679 { 3680 new SimpleInstruction(InstructionConstants.OP_DCONST_0, A), 3681 new ConstantInstruction(InstructionConstants.OP_INVOKESTATIC, METHOD_STRING_VALUEOF_D), 3682 },{ 3683 new ConstantInstruction(InstructionConstants.OP_LDC, DOUBLE_A_STRING), 3684 }, 3685 }, 3686 { // String.valueOf(Dc) = "...." 3687 { 3688 new ConstantInstruction(InstructionConstants.OP_LDC2_W, A), 3689 new ConstantInstruction(InstructionConstants.OP_INVOKESTATIC, METHOD_STRING_VALUEOF_D), 3690 },{ 3691 new ConstantInstruction(InstructionConstants.OP_LDC, DOUBLE_A_STRING), 3692 }, 3693 }, 3694 3695 { // new StringBuffer("...").toString() = "..." (ignoring identity) 3696 { 3697 new ConstantInstruction(InstructionConstants.OP_NEW, CLASS_STRINGBUFFER), 3698 new SimpleInstruction(InstructionConstants.OP_DUP), 3699 new ConstantInstruction(InstructionConstants.OP_LDC, A), 3700 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING), 3701 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_TOSTRING), 3702 },{ 3703 new ConstantInstruction(InstructionConstants.OP_LDC, A), 3704 }, 3705 }, 3706 { // new StringBuffer(string).toString() = string (ignoring identity) 3707 { 3708 new ConstantInstruction(InstructionConstants.OP_NEW, CLASS_STRINGBUFFER), 3709 new SimpleInstruction(InstructionConstants.OP_DUP), 3710 new VariableInstruction(InstructionConstants.OP_ALOAD, A), 3711 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING), 3712 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_TOSTRING), 3713 },{ 3714 new VariableInstruction(InstructionConstants.OP_ALOAD, A), 3715 }, 3716 }, 3717 { // new StringBuffer("...").length() = length 3718 { 3719 new ConstantInstruction(InstructionConstants.OP_NEW, CLASS_STRINGBUFFER), 3720 new SimpleInstruction(InstructionConstants.OP_DUP), 3721 new ConstantInstruction(InstructionConstants.OP_LDC, A), 3722 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING), 3723 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_LENGTH), 3724 },{ 3725 new SimpleInstruction(InstructionConstants.OP_SIPUSH, STRING_A_LENGTH), 3726 }, 3727 }, 3728 { // new StringBuffer() (without dup) = nothing 3729 { 3730 new ConstantInstruction(InstructionConstants.OP_NEW, CLASS_STRINGBUFFER), 3731 new ConstantInstruction(InstructionConstants.OP_LDC, A), 3732 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT), 3733 },{ 3734 // Nothing. 3735 }, 3736 }, 3737 { // new StringBuffer("...") (without dup) = nothing 3738 { 3739 new ConstantInstruction(InstructionConstants.OP_NEW, CLASS_STRINGBUFFER), 3740 new ConstantInstruction(InstructionConstants.OP_LDC, A), 3741 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING), 3742 },{ 3743 // Nothing. 3744 }, 3745 }, 3746 { // new StringBuffer()/pop = nothing 3747 { 3748 new ConstantInstruction(InstructionConstants.OP_NEW, CLASS_STRINGBUFFER), 3749 new SimpleInstruction(InstructionConstants.OP_DUP), 3750 new ConstantInstruction(InstructionConstants.OP_LDC, A), 3751 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT), 3752 new SimpleInstruction(InstructionConstants.OP_POP), 3753 },{ 3754 // Nothing. 3755 }, 3756 }, 3757 { // new StringBuffer("...")/pop = nothing 3758 { 3759 new ConstantInstruction(InstructionConstants.OP_NEW, CLASS_STRINGBUFFER), 3760 new SimpleInstruction(InstructionConstants.OP_DUP), 3761 new ConstantInstruction(InstructionConstants.OP_LDC, A), 3762 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING), 3763 new SimpleInstruction(InstructionConstants.OP_POP), 3764 },{ 3765 // Nothing. 3766 }, 3767 }, 3768 { // new StringBuffer("...").append(z)/pop = nothing 3769 { 3770 new ConstantInstruction(InstructionConstants.OP_NEW, CLASS_STRINGBUFFER), 3771 new SimpleInstruction(InstructionConstants.OP_DUP), 3772 new ConstantInstruction(InstructionConstants.OP_LDC, A), 3773 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING), 3774 new VariableInstruction(InstructionConstants.OP_ILOAD, B), 3775 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_Z), 3776 new SimpleInstruction(InstructionConstants.OP_POP), 3777 },{ 3778 // Nothing. 3779 }, 3780 }, 3781 { // new StringBuffer("...").append(c)/pop = nothing 3782 { 3783 new ConstantInstruction(InstructionConstants.OP_NEW, CLASS_STRINGBUFFER), 3784 new SimpleInstruction(InstructionConstants.OP_DUP), 3785 new ConstantInstruction(InstructionConstants.OP_LDC, A), 3786 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING), 3787 new VariableInstruction(InstructionConstants.OP_ILOAD, B), 3788 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_C), 3789 new SimpleInstruction(InstructionConstants.OP_POP), 3790 },{ 3791 // Nothing. 3792 }, 3793 }, 3794 { // new StringBuffer("...").append(i)/pop = nothing 3795 { 3796 new ConstantInstruction(InstructionConstants.OP_NEW, CLASS_STRINGBUFFER), 3797 new SimpleInstruction(InstructionConstants.OP_DUP), 3798 new ConstantInstruction(InstructionConstants.OP_LDC, A), 3799 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING), 3800 new VariableInstruction(InstructionConstants.OP_ILOAD, B), 3801 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_I), 3802 new SimpleInstruction(InstructionConstants.OP_POP), 3803 },{ 3804 // Nothing. 3805 }, 3806 }, 3807 { // new StringBuffer("...").append(l)/pop = nothing 3808 { 3809 new ConstantInstruction(InstructionConstants.OP_NEW, CLASS_STRINGBUFFER), 3810 new SimpleInstruction(InstructionConstants.OP_DUP), 3811 new ConstantInstruction(InstructionConstants.OP_LDC, A), 3812 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING), 3813 new VariableInstruction(InstructionConstants.OP_LLOAD, B), 3814 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_J), 3815 new SimpleInstruction(InstructionConstants.OP_POP), 3816 },{ 3817 // Nothing. 3818 }, 3819 }, 3820 { // new StringBuffer("...").append(f)/pop = nothing 3821 { 3822 new ConstantInstruction(InstructionConstants.OP_NEW, CLASS_STRINGBUFFER), 3823 new SimpleInstruction(InstructionConstants.OP_DUP), 3824 new ConstantInstruction(InstructionConstants.OP_LDC, A), 3825 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING), 3826 new VariableInstruction(InstructionConstants.OP_FLOAD, B), 3827 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_F), 3828 new SimpleInstruction(InstructionConstants.OP_POP), 3829 },{ 3830 // Nothing. 3831 }, 3832 }, 3833 { // new StringBuffer("...").append(d)/pop = nothing 3834 { 3835 new ConstantInstruction(InstructionConstants.OP_NEW, CLASS_STRINGBUFFER), 3836 new SimpleInstruction(InstructionConstants.OP_DUP), 3837 new ConstantInstruction(InstructionConstants.OP_LDC, A), 3838 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING), 3839 new VariableInstruction(InstructionConstants.OP_DLOAD, B), 3840 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_D), 3841 new SimpleInstruction(InstructionConstants.OP_POP), 3842 },{ 3843 // Nothing. 3844 }, 3845 }, 3846 { // new StringBuffer("...").append(s)/pop = nothing 3847 { 3848 new ConstantInstruction(InstructionConstants.OP_NEW, CLASS_STRINGBUFFER), 3849 new SimpleInstruction(InstructionConstants.OP_DUP), 3850 new ConstantInstruction(InstructionConstants.OP_LDC, A), 3851 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING), 3852 new VariableInstruction(InstructionConstants.OP_ALOAD, B), 3853 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_STRING), 3854 new SimpleInstruction(InstructionConstants.OP_POP), 3855 },{ 3856 // Nothing. 3857 }, 3858 }, 3859 { // StringBuffer#toString()/pop = pop 3860 { 3861 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_TOSTRING), 3862 new SimpleInstruction(InstructionConstants.OP_POP), 3863 },{ 3864 new SimpleInstruction(InstructionConstants.OP_POP), 3865 }, 3866 }, 3867 { // StringBuffer#append("") = nothing 3868 { 3869 new ConstantInstruction(InstructionConstants.OP_LDC, STRING_EMPTY), 3870 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_STRING), 3871 },{ 3872 // Nothing. 3873 }, 3874 }, 3875 { // new StringBuffer().append(Z) = new StringBuffer("....") 3876 { 3877 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT), 3878 new SimpleInstruction(InstructionConstants.OP_ICONST_0, A), 3879 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_Z), 3880 },{ 3881 new ConstantInstruction(InstructionConstants.OP_LDC, BOOLEAN_A_STRING), 3882 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING), 3883 }, 3884 }, 3885 { // new StringBuffer().append(C) = new StringBuffer("....") 3886 { 3887 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT), 3888 new SimpleInstruction(InstructionConstants.OP_ICONST_0, A), 3889 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_C), 3890 },{ 3891 new ConstantInstruction(InstructionConstants.OP_LDC, CHAR_A_STRING), 3892 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING), 3893 }, 3894 }, 3895 { // new StringBuffer().append(Cc) = new StringBuffer("....") 3896 { 3897 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT), 3898 new ConstantInstruction(InstructionConstants.OP_LDC, A), 3899 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_C), 3900 },{ 3901 new ConstantInstruction(InstructionConstants.OP_LDC, CHAR_A_STRING), 3902 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING), 3903 }, 3904 }, 3905 { // new StringBuffer().append(I) = new StringBuffer("....") 3906 { 3907 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT), 3908 new SimpleInstruction(InstructionConstants.OP_ICONST_0, A), 3909 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_I), 3910 },{ 3911 new ConstantInstruction(InstructionConstants.OP_LDC, INT_A_STRING), 3912 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING), 3913 }, 3914 }, 3915 { // new StringBuffer().append(Ic) = new StringBuffer("....") 3916 { 3917 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT), 3918 new ConstantInstruction(InstructionConstants.OP_LDC, A), 3919 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_I), 3920 },{ 3921 new ConstantInstruction(InstructionConstants.OP_LDC, INT_A_STRING), 3922 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING), 3923 }, 3924 }, 3925 { // new StringBuffer().append(J) = new StringBuffer("....") 3926 { 3927 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT), 3928 new SimpleInstruction(InstructionConstants.OP_LCONST_0, A), 3929 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_J), 3930 },{ 3931 new ConstantInstruction(InstructionConstants.OP_LDC, LONG_A_STRING), 3932 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING), 3933 }, 3934 }, 3935 { // new StringBuffer().append(Jc) = new StringBuffer("....") 3936 { 3937 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT), 3938 new ConstantInstruction(InstructionConstants.OP_LDC2_W, A), 3939 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_J), 3940 },{ 3941 new ConstantInstruction(InstructionConstants.OP_LDC, LONG_A_STRING), 3942 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING), 3943 }, 3944 }, 3945 { // new StringBuffer().append(F) = new StringBuffer("....") 3946 { 3947 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT), 3948 new SimpleInstruction(InstructionConstants.OP_FCONST_0, A), 3949 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_F), 3950 },{ 3951 new ConstantInstruction(InstructionConstants.OP_LDC, FLOAT_A_STRING), 3952 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING), 3953 }, 3954 }, 3955 { // new StringBuffer().append(Fc) = new StringBuffer("....") 3956 { 3957 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT), 3958 new ConstantInstruction(InstructionConstants.OP_LDC, A), 3959 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_F), 3960 },{ 3961 new ConstantInstruction(InstructionConstants.OP_LDC, FLOAT_A_STRING), 3962 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING), 3963 }, 3964 }, 3965 { // new StringBuffer().append(D) = new StringBuffer("....") 3966 { 3967 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT), 3968 new SimpleInstruction(InstructionConstants.OP_DCONST_0, A), 3969 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_D), 3970 },{ 3971 new ConstantInstruction(InstructionConstants.OP_LDC, DOUBLE_A_STRING), 3972 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING), 3973 }, 3974 }, 3975 { // new StringBuffer().append(Dc) = new StringBuffer("....") 3976 { 3977 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT), 3978 new ConstantInstruction(InstructionConstants.OP_LDC2_W, A), 3979 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_D), 3980 },{ 3981 new ConstantInstruction(InstructionConstants.OP_LDC, DOUBLE_A_STRING), 3982 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING), 3983 }, 3984 }, 3985 { // new StringBuffer().append("...") = new StringBuffer("...") 3986 { 3987 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT), 3988 new ConstantInstruction(InstructionConstants.OP_LDC, A), 3989 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_STRING), 3990 },{ 3991 new ConstantInstruction(InstructionConstants.OP_LDC, A), 3992 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING), 3993 }, 3994 }, 3995 { // new StringBuffer("...").append(Z) = new StringBuffer("....") 3996 { 3997 new ConstantInstruction(InstructionConstants.OP_LDC, A), 3998 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING), 3999 new SimpleInstruction(InstructionConstants.OP_ICONST_0, B), 4000 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_Z), 4001 },{ 4002 new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | BOOLEAN_B_STRING), 4003 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING), 4004 }, 4005 }, 4006 { // new StringBuffer("...").append(C) = new StringBuffer("....") 4007 { 4008 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4009 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING), 4010 new SimpleInstruction(InstructionConstants.OP_ICONST_0, B), 4011 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_C), 4012 },{ 4013 new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | CHAR_B_STRING), 4014 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING), 4015 }, 4016 }, 4017 { // new StringBuffer("...").append(Cc) = new StringBuffer("....") 4018 { 4019 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4020 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING), 4021 new ConstantInstruction(InstructionConstants.OP_LDC, B), 4022 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_C), 4023 },{ 4024 new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | CHAR_B_STRING), 4025 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING), 4026 }, 4027 }, 4028 { // new StringBuffer("...").append(I) = new StringBuffer("....") 4029 { 4030 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4031 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING), 4032 new SimpleInstruction(InstructionConstants.OP_ICONST_0, B), 4033 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_I), 4034 },{ 4035 new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | INT_B_STRING), 4036 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING), 4037 }, 4038 }, 4039 { // new StringBuffer("...").append(Ic) = new StringBuffer("....") 4040 { 4041 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4042 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING), 4043 new ConstantInstruction(InstructionConstants.OP_LDC, B), 4044 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_I), 4045 },{ 4046 new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | INT_B_STRING), 4047 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING), 4048 }, 4049 }, 4050 { // new StringBuffer("...").append(J) = new StringBuffer("....") 4051 { 4052 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4053 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING), 4054 new SimpleInstruction(InstructionConstants.OP_LCONST_0, B), 4055 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_J), 4056 },{ 4057 new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | LONG_B_STRING), 4058 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING), 4059 }, 4060 }, 4061 { // new StringBuffer("...").append(Jc) = new StringBuffer("....") 4062 { 4063 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4064 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING), 4065 new ConstantInstruction(InstructionConstants.OP_LDC2_W, B), 4066 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_J), 4067 },{ 4068 new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | LONG_B_STRING), 4069 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING), 4070 }, 4071 }, 4072 { // new StringBuffer("...").append(F) = new StringBuffer("....") 4073 { 4074 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4075 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING), 4076 new SimpleInstruction(InstructionConstants.OP_FCONST_0, B), 4077 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_F), 4078 },{ 4079 new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | FLOAT_B_STRING), 4080 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING), 4081 }, 4082 }, 4083 { // new StringBuffer("...").append(Fc) = new StringBuffer("....") 4084 { 4085 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4086 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING), 4087 new ConstantInstruction(InstructionConstants.OP_LDC, B), 4088 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_F), 4089 },{ 4090 new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | FLOAT_B_STRING), 4091 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING), 4092 }, 4093 }, 4094 { // new StringBuffer("...").append(D) = new StringBuffer("....") 4095 { 4096 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4097 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING), 4098 new SimpleInstruction(InstructionConstants.OP_DCONST_0, B), 4099 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_D), 4100 },{ 4101 new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | DOUBLE_B_STRING), 4102 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING), 4103 }, 4104 }, 4105 { // new StringBuffer("...").append(Dc) = new StringBuffer("....") 4106 { 4107 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4108 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING), 4109 new ConstantInstruction(InstructionConstants.OP_LDC2_W, B), 4110 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_D), 4111 },{ 4112 new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | DOUBLE_B_STRING), 4113 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING), 4114 }, 4115 }, 4116 { // new StringBuffer("...").append("...") = new StringBuffer("......") 4117 { 4118 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4119 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING), 4120 new ConstantInstruction(InstructionConstants.OP_LDC, B), 4121 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_STRING), 4122 },{ 4123 new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | STRING_B_STRING), 4124 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT_STRING), 4125 }, 4126 }, 4127 { // StringBuffer#append("...").append(Z) = StringBuffer#append("....") 4128 { 4129 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4130 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_STRING), 4131 new SimpleInstruction(InstructionConstants.OP_ICONST_0, B), 4132 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_Z), 4133 },{ 4134 new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | BOOLEAN_B_STRING), 4135 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_STRING), 4136 }, 4137 }, 4138 { // StringBuffer#append("...").append(C) = StringBuffer#append("....") 4139 { 4140 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4141 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_STRING), 4142 new SimpleInstruction(InstructionConstants.OP_ICONST_0, B), 4143 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_C), 4144 },{ 4145 new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | CHAR_B_STRING), 4146 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_STRING), 4147 }, 4148 }, 4149 { // StringBuffer#append("...").append(Cc) = StringBuffer#append("....") 4150 { 4151 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4152 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_STRING), 4153 new ConstantInstruction(InstructionConstants.OP_LDC, B), 4154 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_C), 4155 },{ 4156 new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | CHAR_B_STRING), 4157 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_STRING), 4158 }, 4159 }, 4160 { // StringBuffer#append("...").append(I) = StringBuffer#append("....") 4161 { 4162 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4163 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_STRING), 4164 new SimpleInstruction(InstructionConstants.OP_ICONST_0, B), 4165 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_I), 4166 },{ 4167 new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | INT_B_STRING), 4168 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_STRING), 4169 }, 4170 }, 4171 { // StringBuffer#append("...").append(Ic) = StringBuffer#append("....") 4172 { 4173 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4174 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_STRING), 4175 new ConstantInstruction(InstructionConstants.OP_LDC, B), 4176 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_I), 4177 },{ 4178 new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | INT_B_STRING), 4179 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_STRING), 4180 }, 4181 }, 4182 { // StringBuffer#append("...").append(J) = StringBuffer#append("....") 4183 { 4184 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4185 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_STRING), 4186 new SimpleInstruction(InstructionConstants.OP_LCONST_0, B), 4187 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_J), 4188 },{ 4189 new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | LONG_B_STRING), 4190 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_STRING), 4191 }, 4192 }, 4193 { // StringBuffer#append("...").append(Jc) = StringBuffer#append("....") 4194 { 4195 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4196 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_STRING), 4197 new ConstantInstruction(InstructionConstants.OP_LDC2_W, B), 4198 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_J), 4199 },{ 4200 new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | LONG_B_STRING), 4201 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_STRING), 4202 }, 4203 }, 4204 { // StringBuffer#append("...").append(F) = StringBuffer#append("....") 4205 { 4206 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4207 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_STRING), 4208 new SimpleInstruction(InstructionConstants.OP_FCONST_0, B), 4209 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_F), 4210 },{ 4211 new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | FLOAT_B_STRING), 4212 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_STRING), 4213 }, 4214 }, 4215 { // StringBuffer#append("...").append(Fc) = StringBuffer#append("....") 4216 { 4217 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4218 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_STRING), 4219 new ConstantInstruction(InstructionConstants.OP_LDC, B), 4220 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_F), 4221 },{ 4222 new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | FLOAT_B_STRING), 4223 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_STRING), 4224 }, 4225 }, 4226 { // StringBuffer#append("...").append(D) = StringBuffer#append("....") 4227 { 4228 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4229 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_STRING), 4230 new SimpleInstruction(InstructionConstants.OP_DCONST_0, B), 4231 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_D), 4232 },{ 4233 new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | DOUBLE_B_STRING), 4234 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_STRING), 4235 }, 4236 }, 4237 { // StringBuffer#append("...").append(Dc) = StringBuffer#append("....") 4238 { 4239 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4240 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_STRING), 4241 new ConstantInstruction(InstructionConstants.OP_LDC2_W, B), 4242 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_D), 4243 },{ 4244 new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | DOUBLE_B_STRING), 4245 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_STRING), 4246 }, 4247 }, 4248 { // StringBuffer#append("...").append("...") = StringBuffer#append("......") 4249 { 4250 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4251 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_STRING), 4252 new ConstantInstruction(InstructionConstants.OP_LDC, B), 4253 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_STRING), 4254 },{ 4255 new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | STRING_B_STRING), 4256 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_STRING), 4257 }, 4258 }, 4259 { // new StringBuffer().append(z).toString() = String.valueOf(z) 4260 { 4261 new ConstantInstruction(InstructionConstants.OP_NEW, CLASS_STRINGBUFFER), 4262 new SimpleInstruction(InstructionConstants.OP_DUP), 4263 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT), 4264 new VariableInstruction(InstructionConstants.OP_ILOAD, A), 4265 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_Z), 4266 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_TOSTRING), 4267 },{ 4268 new VariableInstruction(InstructionConstants.OP_ILOAD, A), 4269 new ConstantInstruction(InstructionConstants.OP_INVOKESTATIC, METHOD_STRING_VALUEOF_Z), 4270 }, 4271 }, 4272 { // new StringBuffer().append(c).toString() = String.valueOf(c) 4273 { 4274 new ConstantInstruction(InstructionConstants.OP_NEW, CLASS_STRINGBUFFER), 4275 new SimpleInstruction(InstructionConstants.OP_DUP), 4276 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT), 4277 new VariableInstruction(InstructionConstants.OP_ILOAD, A), 4278 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_C), 4279 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_TOSTRING), 4280 },{ 4281 new VariableInstruction(InstructionConstants.OP_ILOAD, A), 4282 new ConstantInstruction(InstructionConstants.OP_INVOKESTATIC, METHOD_STRING_VALUEOF_C), 4283 }, 4284 }, 4285 { // new StringBuffer().append(i).toString() = String.valueOf(i) 4286 { 4287 new ConstantInstruction(InstructionConstants.OP_NEW, CLASS_STRINGBUFFER), 4288 new SimpleInstruction(InstructionConstants.OP_DUP), 4289 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT), 4290 new VariableInstruction(InstructionConstants.OP_ILOAD, A), 4291 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_I), 4292 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_TOSTRING), 4293 },{ 4294 new VariableInstruction(InstructionConstants.OP_ILOAD, A), 4295 new ConstantInstruction(InstructionConstants.OP_INVOKESTATIC, METHOD_STRING_VALUEOF_I), 4296 }, 4297 }, 4298 { // new StringBuffer().append(j).toString() = String.valueOf(j) 4299 { 4300 new ConstantInstruction(InstructionConstants.OP_NEW, CLASS_STRINGBUFFER), 4301 new SimpleInstruction(InstructionConstants.OP_DUP), 4302 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT), 4303 new VariableInstruction(InstructionConstants.OP_LLOAD, A), 4304 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_J), 4305 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_TOSTRING), 4306 },{ 4307 new VariableInstruction(InstructionConstants.OP_LLOAD, A), 4308 new ConstantInstruction(InstructionConstants.OP_INVOKESTATIC, METHOD_STRING_VALUEOF_J), 4309 }, 4310 }, 4311 { // new StringBuffer().append(f).toString() = String.valueOf(f) 4312 { 4313 new ConstantInstruction(InstructionConstants.OP_NEW, CLASS_STRINGBUFFER), 4314 new SimpleInstruction(InstructionConstants.OP_DUP), 4315 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT), 4316 new VariableInstruction(InstructionConstants.OP_FLOAD, A), 4317 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_F), 4318 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_TOSTRING), 4319 },{ 4320 new VariableInstruction(InstructionConstants.OP_FLOAD, A), 4321 new ConstantInstruction(InstructionConstants.OP_INVOKESTATIC, METHOD_STRING_VALUEOF_F), 4322 }, 4323 }, 4324 { // new StringBuffer().append(d).toString() = String.valueOf(d) 4325 { 4326 new ConstantInstruction(InstructionConstants.OP_NEW, CLASS_STRINGBUFFER), 4327 new SimpleInstruction(InstructionConstants.OP_DUP), 4328 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT), 4329 new VariableInstruction(InstructionConstants.OP_DLOAD, A), 4330 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_D), 4331 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_TOSTRING), 4332 },{ 4333 new VariableInstruction(InstructionConstants.OP_DLOAD, A), 4334 new ConstantInstruction(InstructionConstants.OP_INVOKESTATIC, METHOD_STRING_VALUEOF_D), 4335 }, 4336 }, 4337 { // new StringBuffer().append(string).toString() = string 4338 { 4339 new ConstantInstruction(InstructionConstants.OP_NEW, CLASS_STRINGBUFFER), 4340 new SimpleInstruction(InstructionConstants.OP_DUP), 4341 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT), 4342 new VariableInstruction(InstructionConstants.OP_ALOAD, A), 4343 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_STRING), 4344 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_TOSTRING), 4345 },{ 4346 new VariableInstruction(InstructionConstants.OP_ALOAD, A), 4347 }, 4348 }, 4349 { // new StringBuffer().append(object).toString() = String.valueOf(object) 4350 { 4351 new ConstantInstruction(InstructionConstants.OP_NEW, CLASS_STRINGBUFFER), 4352 new SimpleInstruction(InstructionConstants.OP_DUP), 4353 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUFFER_INIT), 4354 new VariableInstruction(InstructionConstants.OP_ALOAD, A), 4355 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_APPEND_OBJECT), 4356 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUFFER_TOSTRING), 4357 },{ 4358 new VariableInstruction(InstructionConstants.OP_ALOAD, A), 4359 new ConstantInstruction(InstructionConstants.OP_INVOKESTATIC, METHOD_STRING_VALUEOF_OBJECT), 4360 }, 4361 }, 4362 4363 { // new StringBuilder("...").toString() = "..." (ignoring identity) 4364 { 4365 new ConstantInstruction(InstructionConstants.OP_NEW, CLASS_STRINGBUILDER), 4366 new SimpleInstruction(InstructionConstants.OP_DUP), 4367 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4368 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING), 4369 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_TOSTRING), 4370 },{ 4371 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4372 }, 4373 }, 4374 { // new StringBuilder(string).toString() = string (ignoring identity) 4375 { 4376 new ConstantInstruction(InstructionConstants.OP_NEW, CLASS_STRINGBUILDER), 4377 new SimpleInstruction(InstructionConstants.OP_DUP), 4378 new VariableInstruction(InstructionConstants.OP_ALOAD, A), 4379 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING), 4380 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_TOSTRING), 4381 },{ 4382 new VariableInstruction(InstructionConstants.OP_ALOAD, A), 4383 }, 4384 }, 4385 { // new StringBuilder("...").length() = length 4386 { 4387 new ConstantInstruction(InstructionConstants.OP_NEW, CLASS_STRINGBUILDER), 4388 new SimpleInstruction(InstructionConstants.OP_DUP), 4389 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4390 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING), 4391 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_LENGTH), 4392 },{ 4393 new SimpleInstruction(InstructionConstants.OP_SIPUSH, STRING_A_LENGTH), 4394 }, 4395 }, 4396 { // new StringBuilder() (without dup) = nothing 4397 { 4398 new ConstantInstruction(InstructionConstants.OP_NEW, CLASS_STRINGBUILDER), 4399 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4400 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT), 4401 },{ 4402 // Nothing. 4403 }, 4404 }, 4405 { // new StringBuilder("...") (without dup) = nothing 4406 { 4407 new ConstantInstruction(InstructionConstants.OP_NEW, CLASS_STRINGBUILDER), 4408 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4409 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING), 4410 },{ 4411 // Nothing. 4412 }, 4413 }, 4414 { // new StringBuilder()/pop = nothing 4415 { 4416 new ConstantInstruction(InstructionConstants.OP_NEW, CLASS_STRINGBUILDER), 4417 new SimpleInstruction(InstructionConstants.OP_DUP), 4418 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4419 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT), 4420 new SimpleInstruction(InstructionConstants.OP_POP), 4421 },{ 4422 // Nothing. 4423 }, 4424 }, 4425 { // new StringBuilder("...")/pop = nothing 4426 { 4427 new ConstantInstruction(InstructionConstants.OP_NEW, CLASS_STRINGBUILDER), 4428 new SimpleInstruction(InstructionConstants.OP_DUP), 4429 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4430 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING), 4431 new SimpleInstruction(InstructionConstants.OP_POP), 4432 },{ 4433 // Nothing. 4434 }, 4435 }, 4436 { // new StringBuilder("...").append(z)/pop = nothing 4437 { 4438 new ConstantInstruction(InstructionConstants.OP_NEW, CLASS_STRINGBUILDER), 4439 new SimpleInstruction(InstructionConstants.OP_DUP), 4440 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4441 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING), 4442 new VariableInstruction(InstructionConstants.OP_ILOAD, B), 4443 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_Z), 4444 new SimpleInstruction(InstructionConstants.OP_POP), 4445 },{ 4446 // Nothing. 4447 }, 4448 }, 4449 { // new StringBuilder("...").append(c)/pop = nothing 4450 { 4451 new ConstantInstruction(InstructionConstants.OP_NEW, CLASS_STRINGBUILDER), 4452 new SimpleInstruction(InstructionConstants.OP_DUP), 4453 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4454 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING), 4455 new VariableInstruction(InstructionConstants.OP_ILOAD, B), 4456 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_C), 4457 new SimpleInstruction(InstructionConstants.OP_POP), 4458 },{ 4459 // Nothing. 4460 }, 4461 }, 4462 { // new StringBuilder("...").append(i)/pop = nothing 4463 { 4464 new ConstantInstruction(InstructionConstants.OP_NEW, CLASS_STRINGBUILDER), 4465 new SimpleInstruction(InstructionConstants.OP_DUP), 4466 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4467 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING), 4468 new VariableInstruction(InstructionConstants.OP_ILOAD, B), 4469 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_I), 4470 new SimpleInstruction(InstructionConstants.OP_POP), 4471 },{ 4472 // Nothing. 4473 }, 4474 }, 4475 { // new StringBuilder("...").append(l)/pop = nothing 4476 { 4477 new ConstantInstruction(InstructionConstants.OP_NEW, CLASS_STRINGBUILDER), 4478 new SimpleInstruction(InstructionConstants.OP_DUP), 4479 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4480 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING), 4481 new VariableInstruction(InstructionConstants.OP_LLOAD, B), 4482 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_J), 4483 new SimpleInstruction(InstructionConstants.OP_POP), 4484 },{ 4485 // Nothing. 4486 }, 4487 }, 4488 { // new StringBuilder("...").append(f)/pop = nothing 4489 { 4490 new ConstantInstruction(InstructionConstants.OP_NEW, CLASS_STRINGBUILDER), 4491 new SimpleInstruction(InstructionConstants.OP_DUP), 4492 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4493 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING), 4494 new VariableInstruction(InstructionConstants.OP_FLOAD, B), 4495 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_F), 4496 new SimpleInstruction(InstructionConstants.OP_POP), 4497 },{ 4498 // Nothing. 4499 }, 4500 }, 4501 { // new StringBuilder("...").append(d)/pop = nothing 4502 { 4503 new ConstantInstruction(InstructionConstants.OP_NEW, CLASS_STRINGBUILDER), 4504 new SimpleInstruction(InstructionConstants.OP_DUP), 4505 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4506 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING), 4507 new VariableInstruction(InstructionConstants.OP_DLOAD, B), 4508 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_D), 4509 new SimpleInstruction(InstructionConstants.OP_POP), 4510 },{ 4511 // Nothing. 4512 }, 4513 }, 4514 { // new StringBuilder("...").append(s)/pop = nothing 4515 { 4516 new ConstantInstruction(InstructionConstants.OP_NEW, CLASS_STRINGBUILDER), 4517 new SimpleInstruction(InstructionConstants.OP_DUP), 4518 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4519 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING), 4520 new VariableInstruction(InstructionConstants.OP_ALOAD, B), 4521 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_STRING), 4522 new SimpleInstruction(InstructionConstants.OP_POP), 4523 },{ 4524 // Nothing. 4525 }, 4526 }, 4527 { // StringBuilder#toString()/pop = pop 4528 { 4529 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_TOSTRING), 4530 new SimpleInstruction(InstructionConstants.OP_POP), 4531 },{ 4532 new SimpleInstruction(InstructionConstants.OP_POP), 4533 }, 4534 }, 4535 { // StringBuilder#append("") = nothing 4536 { 4537 new ConstantInstruction(InstructionConstants.OP_LDC, STRING_EMPTY), 4538 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_STRING), 4539 },{ 4540 // Nothing. 4541 }, 4542 }, 4543 { // new StringBuilder().append(Z) = new StringBuilder("....") 4544 { 4545 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT), 4546 new SimpleInstruction(InstructionConstants.OP_ICONST_0, A), 4547 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_Z), 4548 },{ 4549 new ConstantInstruction(InstructionConstants.OP_LDC, BOOLEAN_A_STRING), 4550 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING), 4551 }, 4552 }, 4553 { // new StringBuilder().append(C) = new StringBuilder("....") 4554 { 4555 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT), 4556 new SimpleInstruction(InstructionConstants.OP_ICONST_0, A), 4557 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_C), 4558 },{ 4559 new ConstantInstruction(InstructionConstants.OP_LDC, CHAR_A_STRING), 4560 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING), 4561 }, 4562 }, 4563 { // new StringBuilder().append(Cc) = new StringBuilder("....") 4564 { 4565 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT), 4566 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4567 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_C), 4568 },{ 4569 new ConstantInstruction(InstructionConstants.OP_LDC, CHAR_A_STRING), 4570 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING), 4571 }, 4572 }, 4573 { // new StringBuilder().append(I) = new StringBuilder("....") 4574 { 4575 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT), 4576 new SimpleInstruction(InstructionConstants.OP_ICONST_0, A), 4577 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_I), 4578 },{ 4579 new ConstantInstruction(InstructionConstants.OP_LDC, INT_A_STRING), 4580 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING), 4581 }, 4582 }, 4583 { // new StringBuilder().append(Ic) = new StringBuilder("....") 4584 { 4585 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT), 4586 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4587 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_I), 4588 },{ 4589 new ConstantInstruction(InstructionConstants.OP_LDC, INT_A_STRING), 4590 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING), 4591 }, 4592 }, 4593 { // new StringBuilder().append(J) = new StringBuilder("....") 4594 { 4595 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT), 4596 new SimpleInstruction(InstructionConstants.OP_LCONST_0, A), 4597 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_J), 4598 },{ 4599 new ConstantInstruction(InstructionConstants.OP_LDC, LONG_A_STRING), 4600 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING), 4601 }, 4602 }, 4603 { // new StringBuilder().append(Jc) = new StringBuilder("....") 4604 { 4605 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT), 4606 new ConstantInstruction(InstructionConstants.OP_LDC2_W, A), 4607 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_J), 4608 },{ 4609 new ConstantInstruction(InstructionConstants.OP_LDC, LONG_A_STRING), 4610 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING), 4611 }, 4612 }, 4613 { // new StringBuilder().append(F) = new StringBuilder("....") 4614 { 4615 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT), 4616 new SimpleInstruction(InstructionConstants.OP_FCONST_0, A), 4617 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_F), 4618 },{ 4619 new ConstantInstruction(InstructionConstants.OP_LDC, FLOAT_A_STRING), 4620 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING), 4621 }, 4622 }, 4623 { // new StringBuilder().append(Fc) = new StringBuilder("....") 4624 { 4625 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT), 4626 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4627 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_F), 4628 },{ 4629 new ConstantInstruction(InstructionConstants.OP_LDC, FLOAT_A_STRING), 4630 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING), 4631 }, 4632 }, 4633 { // new StringBuilder().append(D) = new StringBuilder("....") 4634 { 4635 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT), 4636 new SimpleInstruction(InstructionConstants.OP_DCONST_0, A), 4637 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_D), 4638 },{ 4639 new ConstantInstruction(InstructionConstants.OP_LDC, DOUBLE_A_STRING), 4640 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING), 4641 }, 4642 }, 4643 { // new StringBuilder().append(Dc) = new StringBuilder("....") 4644 { 4645 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT), 4646 new ConstantInstruction(InstructionConstants.OP_LDC2_W, A), 4647 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_D), 4648 },{ 4649 new ConstantInstruction(InstructionConstants.OP_LDC, DOUBLE_A_STRING), 4650 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING), 4651 }, 4652 }, 4653 { // new StringBuilder().append("...") = new StringBuilder("...") 4654 { 4655 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT), 4656 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4657 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_STRING), 4658 },{ 4659 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4660 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING), 4661 }, 4662 }, 4663 { // new StringBuilder("...").append(Z) = new StringBuilder("....") 4664 { 4665 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4666 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING), 4667 new SimpleInstruction(InstructionConstants.OP_ICONST_0, B), 4668 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_Z), 4669 },{ 4670 new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | BOOLEAN_B_STRING), 4671 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING), 4672 }, 4673 }, 4674 { // new StringBuilder("...").append(C) = new StringBuilder("....") 4675 { 4676 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4677 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING), 4678 new SimpleInstruction(InstructionConstants.OP_ICONST_0, B), 4679 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_C), 4680 },{ 4681 new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | CHAR_B_STRING), 4682 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING), 4683 }, 4684 }, 4685 { // new StringBuilder("...").append(Cc) = new StringBuilder("....") 4686 { 4687 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4688 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING), 4689 new ConstantInstruction(InstructionConstants.OP_LDC, B), 4690 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_C), 4691 },{ 4692 new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | CHAR_B_STRING), 4693 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING), 4694 }, 4695 }, 4696 { // new StringBuilder("...").append(I) = new StringBuilder("....") 4697 { 4698 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4699 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING), 4700 new SimpleInstruction(InstructionConstants.OP_ICONST_0, B), 4701 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_I), 4702 },{ 4703 new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | INT_B_STRING), 4704 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING), 4705 }, 4706 }, 4707 { // new StringBuilder("...").append(Ic) = new StringBuilder("....") 4708 { 4709 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4710 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING), 4711 new ConstantInstruction(InstructionConstants.OP_LDC, B), 4712 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_I), 4713 },{ 4714 new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | INT_B_STRING), 4715 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING), 4716 }, 4717 }, 4718 { // new StringBuilder("...").append(J) = new StringBuilder("....") 4719 { 4720 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4721 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING), 4722 new SimpleInstruction(InstructionConstants.OP_LCONST_0, B), 4723 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_J), 4724 },{ 4725 new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | LONG_B_STRING), 4726 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING), 4727 }, 4728 }, 4729 { // new StringBuilder("...").append(Jc) = new StringBuilder("....") 4730 { 4731 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4732 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING), 4733 new ConstantInstruction(InstructionConstants.OP_LDC2_W, B), 4734 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_J), 4735 },{ 4736 new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | LONG_B_STRING), 4737 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING), 4738 }, 4739 }, 4740 { // new StringBuilder("...").append(F) = new StringBuilder("....") 4741 { 4742 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4743 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING), 4744 new SimpleInstruction(InstructionConstants.OP_FCONST_0, B), 4745 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_F), 4746 },{ 4747 new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | FLOAT_B_STRING), 4748 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING), 4749 }, 4750 }, 4751 { // new StringBuilder("...").append(Fc) = new StringBuilder("....") 4752 { 4753 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4754 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING), 4755 new ConstantInstruction(InstructionConstants.OP_LDC, B), 4756 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_F), 4757 },{ 4758 new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | FLOAT_B_STRING), 4759 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING), 4760 }, 4761 }, 4762 { // new StringBuilder("...").append(D) = new StringBuilder("....") 4763 { 4764 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4765 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING), 4766 new SimpleInstruction(InstructionConstants.OP_DCONST_0, B), 4767 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_D), 4768 },{ 4769 new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | DOUBLE_B_STRING), 4770 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING), 4771 }, 4772 }, 4773 { // new StringBuilder("...").append(Dc) = new StringBuilder("....") 4774 { 4775 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4776 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING), 4777 new ConstantInstruction(InstructionConstants.OP_LDC2_W, B), 4778 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_D), 4779 },{ 4780 new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | DOUBLE_B_STRING), 4781 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING), 4782 }, 4783 }, 4784 { // new StringBuilder("...").append("...") = new StringBuilder("......") 4785 { 4786 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4787 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING), 4788 new ConstantInstruction(InstructionConstants.OP_LDC, B), 4789 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_STRING), 4790 },{ 4791 new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | STRING_B_STRING), 4792 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT_STRING), 4793 }, 4794 }, 4795 { // StringBuilder#append("...").append(Z) = StringBuilder#append("....") 4796 { 4797 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4798 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_STRING), 4799 new SimpleInstruction(InstructionConstants.OP_ICONST_0, B), 4800 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_Z), 4801 },{ 4802 new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | BOOLEAN_B_STRING), 4803 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_STRING), 4804 }, 4805 }, 4806 { // StringBuilder#append("...").append(C) = StringBuilder#append("....") 4807 { 4808 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4809 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_STRING), 4810 new SimpleInstruction(InstructionConstants.OP_ICONST_0, B), 4811 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_C), 4812 },{ 4813 new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | CHAR_B_STRING), 4814 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_STRING), 4815 }, 4816 }, 4817 { // StringBuilder#append("...").append(Cc) = StringBuilder#append("....") 4818 { 4819 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4820 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_STRING), 4821 new ConstantInstruction(InstructionConstants.OP_LDC, B), 4822 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_C), 4823 },{ 4824 new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | CHAR_B_STRING), 4825 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_STRING), 4826 }, 4827 }, 4828 { // StringBuilder#append("...").append(I) = StringBuilder#append("....") 4829 { 4830 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4831 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_STRING), 4832 new SimpleInstruction(InstructionConstants.OP_ICONST_0, B), 4833 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_I), 4834 },{ 4835 new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | INT_B_STRING), 4836 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_STRING), 4837 }, 4838 }, 4839 { // StringBuilder#append("...").append(Ic) = StringBuilder#append("....") 4840 { 4841 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4842 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_STRING), 4843 new ConstantInstruction(InstructionConstants.OP_LDC, B), 4844 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_I), 4845 },{ 4846 new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | INT_B_STRING), 4847 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_STRING), 4848 }, 4849 }, 4850 { // StringBuilder#append("...").append(J) = StringBuilder#append("....") 4851 { 4852 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4853 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_STRING), 4854 new SimpleInstruction(InstructionConstants.OP_LCONST_0, B), 4855 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_J), 4856 },{ 4857 new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | LONG_B_STRING), 4858 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_STRING), 4859 }, 4860 }, 4861 { // StringBuilder#append("...").append(Jc) = StringBuilder#append("....") 4862 { 4863 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4864 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_STRING), 4865 new ConstantInstruction(InstructionConstants.OP_LDC2_W, B), 4866 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_J), 4867 },{ 4868 new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | LONG_B_STRING), 4869 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_STRING), 4870 }, 4871 }, 4872 { // StringBuilder#append("...").append(F) = StringBuilder#append("....") 4873 { 4874 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4875 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_STRING), 4876 new SimpleInstruction(InstructionConstants.OP_FCONST_0, B), 4877 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_F), 4878 },{ 4879 new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | FLOAT_B_STRING), 4880 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_STRING), 4881 }, 4882 }, 4883 { // StringBuilder#append("...").append(Fc) = StringBuilder#append("....") 4884 { 4885 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4886 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_STRING), 4887 new ConstantInstruction(InstructionConstants.OP_LDC, B), 4888 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_F), 4889 },{ 4890 new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | FLOAT_B_STRING), 4891 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_STRING), 4892 }, 4893 }, 4894 { // StringBuilder#append("...").append(D) = StringBuilder#append("....") 4895 { 4896 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4897 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_STRING), 4898 new SimpleInstruction(InstructionConstants.OP_DCONST_0, B), 4899 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_D), 4900 },{ 4901 new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | DOUBLE_B_STRING), 4902 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_STRING), 4903 }, 4904 }, 4905 { // StringBuilder#append("...").append(Dc) = StringBuilder#append("....") 4906 { 4907 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4908 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_STRING), 4909 new ConstantInstruction(InstructionConstants.OP_LDC2_W, B), 4910 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_D), 4911 },{ 4912 new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | DOUBLE_B_STRING), 4913 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_STRING), 4914 }, 4915 }, 4916 { // StringBuilder#append("...").append("...") = StringBuilder#append("......") 4917 { 4918 new ConstantInstruction(InstructionConstants.OP_LDC, A), 4919 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_STRING), 4920 new ConstantInstruction(InstructionConstants.OP_LDC, B), 4921 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_STRING), 4922 },{ 4923 new ConstantInstruction(InstructionConstants.OP_LDC, STRING_A_STRING | STRING_B_STRING), 4924 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_STRING), 4925 }, 4926 }, 4927 { // new StringBuilder().append(z).toString() = String.valueOf(z) 4928 { 4929 new ConstantInstruction(InstructionConstants.OP_NEW, CLASS_STRINGBUILDER), 4930 new SimpleInstruction(InstructionConstants.OP_DUP), 4931 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT), 4932 new VariableInstruction(InstructionConstants.OP_ILOAD, A), 4933 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_Z), 4934 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_TOSTRING), 4935 },{ 4936 new VariableInstruction(InstructionConstants.OP_ILOAD, A), 4937 new ConstantInstruction(InstructionConstants.OP_INVOKESTATIC, METHOD_STRING_VALUEOF_Z), 4938 }, 4939 }, 4940 { // new StringBuilder().append(c).toString() = String.valueOf(c) 4941 { 4942 new ConstantInstruction(InstructionConstants.OP_NEW, CLASS_STRINGBUILDER), 4943 new SimpleInstruction(InstructionConstants.OP_DUP), 4944 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT), 4945 new VariableInstruction(InstructionConstants.OP_ILOAD, A), 4946 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_C), 4947 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_TOSTRING), 4948 },{ 4949 new VariableInstruction(InstructionConstants.OP_ILOAD, A), 4950 new ConstantInstruction(InstructionConstants.OP_INVOKESTATIC, METHOD_STRING_VALUEOF_C), 4951 }, 4952 }, 4953 { // new StringBuilder().append(i).toString() = String.valueOf(i) 4954 { 4955 new ConstantInstruction(InstructionConstants.OP_NEW, CLASS_STRINGBUILDER), 4956 new SimpleInstruction(InstructionConstants.OP_DUP), 4957 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT), 4958 new VariableInstruction(InstructionConstants.OP_ILOAD, A), 4959 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_I), 4960 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_TOSTRING), 4961 },{ 4962 new VariableInstruction(InstructionConstants.OP_ILOAD, A), 4963 new ConstantInstruction(InstructionConstants.OP_INVOKESTATIC, METHOD_STRING_VALUEOF_I), 4964 }, 4965 }, 4966 { // new StringBuilder().append(j).toString() = String.valueOf(j) 4967 { 4968 new ConstantInstruction(InstructionConstants.OP_NEW, CLASS_STRINGBUILDER), 4969 new SimpleInstruction(InstructionConstants.OP_DUP), 4970 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT), 4971 new VariableInstruction(InstructionConstants.OP_LLOAD, A), 4972 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_J), 4973 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_TOSTRING), 4974 },{ 4975 new VariableInstruction(InstructionConstants.OP_LLOAD, A), 4976 new ConstantInstruction(InstructionConstants.OP_INVOKESTATIC, METHOD_STRING_VALUEOF_J), 4977 }, 4978 }, 4979 { // new StringBuilder().append(f).toString() = String.valueOf(f) 4980 { 4981 new ConstantInstruction(InstructionConstants.OP_NEW, CLASS_STRINGBUILDER), 4982 new SimpleInstruction(InstructionConstants.OP_DUP), 4983 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT), 4984 new VariableInstruction(InstructionConstants.OP_FLOAD, A), 4985 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_F), 4986 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_TOSTRING), 4987 },{ 4988 new VariableInstruction(InstructionConstants.OP_FLOAD, A), 4989 new ConstantInstruction(InstructionConstants.OP_INVOKESTATIC, METHOD_STRING_VALUEOF_F), 4990 }, 4991 }, 4992 { // new StringBuilder().append(d).toString() = String.valueOf(d) 4993 { 4994 new ConstantInstruction(InstructionConstants.OP_NEW, CLASS_STRINGBUILDER), 4995 new SimpleInstruction(InstructionConstants.OP_DUP), 4996 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT), 4997 new VariableInstruction(InstructionConstants.OP_DLOAD, A), 4998 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_D), 4999 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_TOSTRING), 5000 },{ 5001 new VariableInstruction(InstructionConstants.OP_DLOAD, A), 5002 new ConstantInstruction(InstructionConstants.OP_INVOKESTATIC, METHOD_STRING_VALUEOF_D), 5003 }, 5004 }, 5005 { // new StringBuilder().append(string).toString() = string 5006 { 5007 new ConstantInstruction(InstructionConstants.OP_NEW, CLASS_STRINGBUILDER), 5008 new SimpleInstruction(InstructionConstants.OP_DUP), 5009 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT), 5010 new VariableInstruction(InstructionConstants.OP_ALOAD, A), 5011 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_STRING), 5012 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_TOSTRING), 5013 },{ 5014 new VariableInstruction(InstructionConstants.OP_ALOAD, A), 5015 }, 5016 }, 5017 { // new StringBuilder().append(object).toString() = String.valueOf(object) 5018 { 5019 new ConstantInstruction(InstructionConstants.OP_NEW, CLASS_STRINGBUILDER), 5020 new SimpleInstruction(InstructionConstants.OP_DUP), 5021 new ConstantInstruction(InstructionConstants.OP_INVOKESPECIAL, METHOD_STRINGBUILDER_INIT), 5022 new VariableInstruction(InstructionConstants.OP_ALOAD, A), 5023 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_APPEND_OBJECT), 5024 new ConstantInstruction(InstructionConstants.OP_INVOKEVIRTUAL, METHOD_STRINGBUILDER_TOSTRING), 5025 },{ 5026 new VariableInstruction(InstructionConstants.OP_ALOAD, A), 5027 new ConstantInstruction(InstructionConstants.OP_INVOKESTATIC, METHOD_STRING_VALUEOF_OBJECT), 5028 }, 5029 }, 5030 }; 5031 5032 5033 /** 5034 * Prints out the constants and the instruction sequences. 5035 */ main(String[] args)5036 public static void main(String[] args) 5037 { 5038 ProgramClass clazz = new ProgramClass(); 5039 clazz.constantPool = CONSTANTS; 5040 5041 ClassPrinter printer = new ClassPrinter(); 5042 5043 for (int index = 0; index < CONSTANTS.length; index++) 5044 { 5045 System.out.print("["+index+"] "); 5046 try 5047 { 5048 CONSTANTS[index].accept(clazz, printer); 5049 } 5050 catch (Exception e) 5051 { 5052 System.out.println("("+e.getClass().getName()+")"); 5053 } 5054 } 5055 5056 if (CONSTANTS.length != SENTINEL) 5057 { 5058 throw new IllegalStateException("Constants length ["+CONSTANTS.length+"] different from number of constant names ["+SENTINEL+"]"); 5059 } 5060 5061 Instruction[][][] sequences = STRING; 5062 5063 for (int sequence = 0; sequence < sequences.length; sequence++) 5064 { 5065 System.out.println(); 5066 Instruction[] instructions = sequences[sequence][0]; 5067 for (int index = 0; index < instructions.length; index++) 5068 { 5069 Instruction instruction = instructions[index]; 5070 try 5071 { 5072 instruction.accept(clazz, null, null, index, new ClassPrinter()); 5073 } 5074 catch (Exception e) {} 5075 } 5076 5077 System.out.println("=>"); 5078 instructions = sequences[sequence][1]; 5079 for (int index = 0; index < instructions.length; index++) 5080 { 5081 Instruction instruction = instructions[index]; 5082 try 5083 { 5084 instruction.accept(clazz, null, null, index, new ClassPrinter()); 5085 } 5086 catch (Exception e) {} 5087 } 5088 } 5089 } 5090 } 5091