Base implementation of Machine. Note: For the most part, the documentation for this class ignores the distinction between Type and TypeBearer.
| 33 | * TypeBearer}.</p> |
| 34 | */ |
| 35 | public abstract class BaseMachine implements Machine { |
| 36 | /* {@code non-null;} the prototype for the associated method */ |
| 37 | private final Prototype prototype; |
| 38 | |
| 39 | /** {@code non-null;} primary arguments */ |
| 40 | private TypeBearer[] args; |
| 41 | |
| 42 | /** {@code >= 0;} number of primary arguments */ |
| 43 | private int argCount; |
| 44 | |
| 45 | /** {@code null-ok;} type of the operation, if salient */ |
| 46 | private Type auxType; |
| 47 | |
| 48 | /** auxiliary {@code int} argument */ |
| 49 | private int auxInt; |
| 50 | |
| 51 | /** {@code null-ok;} auxiliary constant argument */ |
| 52 | private Constant auxCst; |
| 53 | |
| 54 | /** auxiliary branch target argument */ |
| 55 | private int auxTarget; |
| 56 | |
| 57 | /** {@code null-ok;} auxiliary switch cases argument */ |
| 58 | private SwitchList auxCases; |
| 59 | |
| 60 | /** {@code null-ok;} auxiliary initial value list for newarray */ |
| 61 | private ArrayList<Constant> auxInitValues; |
| 62 | |
| 63 | /** {@code >= -1;} last local accessed */ |
| 64 | private int localIndex; |
| 65 | |
| 66 | /** specifies if local has info in the local variable table */ |
| 67 | private boolean localInfo; |
| 68 | |
| 69 | /** {@code null-ok;} local target spec, if salient and calculated */ |
| 70 | private RegisterSpec localTarget; |
| 71 | |
| 72 | /** {@code non-null;} results */ |
| 73 | private TypeBearer[] results; |
| 74 | |
| 75 | /** |
| 76 | * {@code >= -1;} count of the results, or {@code -1} if no results |
| 77 | * have been set |
| 78 | */ |
| 79 | private int resultCount; |
| 80 | |
| 81 | /** |
| 82 | * Constructs an instance. |
| 83 | * |
| 84 | * @param prototype {@code non-null;} the prototype for the |
| 85 | * associated method |
| 86 | */ |
| 87 | public BaseMachine(Prototype prototype) { |
| 88 | if (prototype == null) { |
| 89 | throw new NullPointerException("prototype == null"); |
| 90 | } |
| 91 | |
| 92 | this.prototype = prototype; |
nothing calls this directly
no outgoing calls
no test coverage detected