/** * Attempts to fit the given instruction into a specific opcode, * returning the opcode whose format that the instruction fits * into or {@code null} to indicate that the instruction will need * to be expanded. This fitting process starts with the given * opcode as a first "best guess" and then pessimizes from there * if necessary. * * @param insn {@code non-null;} the instruction in question * @param guess {@code null-ok;} the current guess as to the best * opcode; {@code null} means that no simple opcode fits * @return {@code null-ok;} a possibly-different opcode; either a * {@code non-null} good fit or {@code null} to indicate that no * simple opcode fits */ private Dop findOpcodeForInsn(DalvInsn insn, Dop guess) { /* * Note: The initial guess might be null, meaning that an * earlier call to this method already determined that there * was no possible simple opcode fit. */ while (guess != null) { if (guess.getFormat().isCompatible(insn)) { break; } guess = Dops.getNextOrNull(guess, dexOptions); } return guess; }
/** * Attempts to fit the given instruction into a specific opcode, * returning the opcode whose format that the instruction fits * into or {@code null} to indicate that the instruction will need * to be expanded. This fitting process starts with the given * opcode as a first "best guess" and then pessimizes from there * if necessary. * * @param insn {@code non-null;} the instruction in question * @param guess {@code null-ok;} the current guess as to the best * opcode; {@code null} means that no simple opcode fits * @return {@code null-ok;} a possibly-different opcode; either a * {@code non-null} good fit or {@code null} to indicate that no * simple opcode fits */ private Dop findOpcodeForInsn(DalvInsn insn, Dop guess) { /* * Note: The initial guess might be null, meaning that an * earlier call to this method already determined that there * was no possible simple opcode fit. */ while (guess != null) { if (guess.getFormat().isCompatible(insn)) { break; } guess = Dops.getNextOrNull(guess, dexOptions); } return guess; }
/** * Attempts to fit the given instruction into a specific opcode, * returning the opcode whose format that the instruction fits * into or {@code null} to indicate that the instruction will need * to be expanded. This fitting process starts with the given * opcode as a first "best guess" and then pessimizes from there * if necessary. * * @param insn {@code non-null;} the instruction in question * @param guess {@code null-ok;} the current guess as to the best * opcode; {@code null} means that no simple opcode fits * @return {@code null-ok;} a possibly-different opcode; either a * {@code non-null} good fit or {@code null} to indicate that no * simple opcode fits */ private Dop findOpcodeForInsn(DalvInsn insn, Dop guess) { /* * Note: The initial guess might be null, meaning that an * earlier call to this method already determined that there * was no possible simple opcode fit. */ while (guess != null) { if (guess.getFormat().isCompatible(insn)) { break; } guess = Dops.getNextOrNull(guess, dexOptions); } return guess; }
guess = Dops.getNextOrNull(guess, dexOptions);
guess = Dops.getNextOrNull(guess, dexOptions);
guess = Dops.getNextOrNull(guess, dexOptions);
guess = Dops.getNextOrNull(guess, dexOptions);