(Schema schema, int opcode)
| 91 | } |
| 92 | |
| 93 | protected int[] readOperands(Schema schema, int opcode) throws IOException { |
| 94 | // Determine operand layout |
| 95 | Item.Operands layout = schema.getDescriptor(opcode).getOperandLayout(); |
| 96 | int[] operands; |
| 97 | int size; |
| 98 | // Determine number of operands according to layout |
| 99 | switch(layout) { |
| 100 | case MANY: |
| 101 | size = in.read_uv(); |
| 102 | break; |
| 103 | default: |
| 104 | size = layout.ordinal(); |
| 105 | } |
| 106 | // |
| 107 | operands = new int[size]; |
| 108 | // Read operands |
| 109 | for (int i = 0; i != operands.length; ++i) { |
| 110 | operands[i] = in.read_uv(); |
| 111 | } |
| 112 | // |
| 113 | return operands; |
| 114 | } |
| 115 | |
| 116 | protected byte[] readData(Schema schema, int opcode) throws IOException { |
| 117 | // Determine operand layout |
no test coverage detected