Sets the input frame from the given public API frame description. @param symbolTable the type table to use to lookup and store type Symbol. @param nLocal the number of local variables. @param local the local variable types, described using the same format as in {@link MethodVisitor#visi
(
final SymbolTable symbolTable,
final int nLocal,
final Object[] local,
final int nStack,
final Object[] stack)
| 423 | * MethodVisitor#visitFrame}. |
| 424 | */ |
| 425 | final void setInputFrameFromApiFormat( |
| 426 | final SymbolTable symbolTable, |
| 427 | final int nLocal, |
| 428 | final Object[] local, |
| 429 | final int nStack, |
| 430 | final Object[] stack) { |
| 431 | int inputLocalIndex = 0; |
| 432 | for (int i = 0; i < nLocal; ++i) { |
| 433 | inputLocals[inputLocalIndex++] = getAbstractTypeFromApiFormat(symbolTable, local[i]); |
| 434 | if (local[i] == Opcodes.LONG || local[i] == Opcodes.DOUBLE) { |
| 435 | inputLocals[inputLocalIndex++] = TOP; |
| 436 | } |
| 437 | } |
| 438 | while (inputLocalIndex < inputLocals.length) { |
| 439 | inputLocals[inputLocalIndex++] = TOP; |
| 440 | } |
| 441 | int nStackTop = 0; |
| 442 | for (int i = 0; i < nStack; ++i) { |
| 443 | if (stack[i] == Opcodes.LONG || stack[i] == Opcodes.DOUBLE) { |
| 444 | ++nStackTop; |
| 445 | } |
| 446 | } |
| 447 | inputStack = new int[nStack + nStackTop]; |
| 448 | int inputStackIndex = 0; |
| 449 | for (int i = 0; i < nStack; ++i) { |
| 450 | inputStack[inputStackIndex++] = getAbstractTypeFromApiFormat(symbolTable, stack[i]); |
| 451 | if (stack[i] == Opcodes.LONG || stack[i] == Opcodes.DOUBLE) { |
| 452 | inputStack[inputStackIndex++] = TOP; |
| 453 | } |
| 454 | } |
| 455 | outputStackTop = 0; |
| 456 | initializationCount = 0; |
| 457 | } |
| 458 | |
| 459 | final int getInputStackSize() { |
| 460 | return inputStack.length; |
no test coverage detected