Returns the "initialized" abstract type corresponding to the given abstract type. @param symbolTable the type table to use to lookup and store type Symbol. @param abstractType an abstract type. @return the REFERENCE_KIND abstract type corresponding to abstractType if it is UNINITIALIZED
(final SymbolTable symbolTable, final int abstractType)
| 632 | * constructor is invoked in the basic block. Otherwise returns abstractType. |
| 633 | */ |
| 634 | private int getInitializedType(final SymbolTable symbolTable, final int abstractType) { |
| 635 | if (abstractType == UNINITIALIZED_THIS |
| 636 | || (abstractType & (DIM_MASK | KIND_MASK)) == UNINITIALIZED_KIND) { |
| 637 | for (int i = 0; i < initializationCount; ++i) { |
| 638 | int initializedType = initializations[i]; |
| 639 | int dim = initializedType & DIM_MASK; |
| 640 | int kind = initializedType & KIND_MASK; |
| 641 | int value = initializedType & VALUE_MASK; |
| 642 | if (kind == LOCAL_KIND) { |
| 643 | initializedType = dim + inputLocals[value]; |
| 644 | } else if (kind == STACK_KIND) { |
| 645 | initializedType = dim + inputStack[inputStack.length - value]; |
| 646 | } |
| 647 | if (abstractType == initializedType) { |
| 648 | if (abstractType == UNINITIALIZED_THIS) { |
| 649 | return REFERENCE_KIND | symbolTable.addType(symbolTable.getClassName()); |
| 650 | } else { |
| 651 | return REFERENCE_KIND |
| 652 | | symbolTable.addType(symbolTable.getType(abstractType & VALUE_MASK).value); |
| 653 | } |
| 654 | } |
| 655 | } |
| 656 | } |
| 657 | return abstractType; |
| 658 | } |
| 659 | |
| 660 | // ----------------------------------------------------------------------------------------------- |
| 661 | // Main method, to simulate the execution of each instruction on the output frame |
no test coverage detected