/** * Replace the large arrays * with a small array. */ void shrink() { int n = m_opMap.elementAt(MAPINDEX_LENGTH); m_opMap.setToSize(n + 4); m_opMap.setElementAt(0,n); m_opMap.setElementAt(0,n+1); m_opMap.setElementAt(0,n+2); n = m_tokenQueue.size(); m_tokenQueue.setToSize(n + 4); m_tokenQueue.setElementAt(null,n); m_tokenQueue.setElementAt(null,n + 1); m_tokenQueue.setElementAt(null,n + 2); }
/** * Given an operation position, return the current op. * * @param opPos index into op map. * @return the op that corresponds to the opPos argument. */ public int getOp(int opPos) { return m_opMap.elementAt(opPos); }
/** * Set the op at index to the given int. * * @param opPos index into op map. * @param value Value to set */ public void setOp(int opPos, int value) { m_opMap.setElementAt(value,opPos); }
m_compiler.m_opMap = new OpMapVector(initTokQueueSize, OpMap.BLOCKTOKENQUEUESIZE * 5, OpMap.MAPINDEX_LENGTH);
/** * Given an operation position, return the end position, i.e. the * beginning of the next operation. * * @param opPos An op position of an operation for which there is a size * entry following. * @return position of next operation in m_opMap. */ public int getNextOpPos(int opPos) { return opPos + m_opMap.elementAt(opPos + 1); }
/** * Set the op at index to the given int. * * @param opPos index into op map. * @param value Value to set */ public void setOp(int opPos, int value) { m_opMap.setElementAt(value,opPos); }
m_compiler.m_opMap = new OpMapVector(initTokQueueSize, OpMap.BLOCKTOKENQUEUESIZE * 5, OpMap.MAPINDEX_LENGTH);
/** * Replace the large arrays * with a small array. */ void shrink() { int n = m_opMap.elementAt(MAPINDEX_LENGTH); m_opMap.setToSize(n + 4); m_opMap.setElementAt(0,n); m_opMap.setElementAt(0,n+1); m_opMap.setElementAt(0,n+2); n = m_tokenQueue.size(); m_tokenQueue.setToSize(n + 4); m_tokenQueue.setElementAt(null,n); m_tokenQueue.setElementAt(null,n + 1); m_tokenQueue.setElementAt(null,n + 2); }
/** * Given a location step, get the length of that step. * * @param opPos Position of location step in op map. * * @return The length of the step. */ public int getArgLengthOfStep(int opPos) { return m_opMap.elementAt(opPos + MAPINDEX_LENGTH + 1) - 3; }
/** * Set the op at index to the given int. * * @param opPos index into op map. * @param value Value to set */ public void setOp(int opPos, int value) { m_opMap.setElementAt(value,opPos); }
m_compiler.m_opMap = new OpMapVector(initTokQueueSize, OpMap.BLOCKTOKENQUEUESIZE * 5, OpMap.MAPINDEX_LENGTH);
/** * Replace the large arrays * with a small array. */ void shrink() { int n = m_opMap.elementAt(MAPINDEX_LENGTH); m_opMap.setToSize(n + 4); m_opMap.setElementAt(0,n); m_opMap.setElementAt(0,n+1); m_opMap.setElementAt(0,n+2); n = m_tokenQueue.size(); m_tokenQueue.setToSize(n + 4); m_tokenQueue.setElementAt(null,n); m_tokenQueue.setElementAt(null,n + 1); m_tokenQueue.setElementAt(null,n + 2); }
/** * Get the test type of the step, i.e. NODETYPE_XXX value. * * @param opPosOfStep The position of the FROM_XXX step. * * @return NODETYPE_XXX value. */ public int getStepTestType(int opPosOfStep) { return m_opMap.elementAt(opPosOfStep + 3); // skip past op, len, len without predicates }
/** * Set the op at index to the given int. * * @param opPos index into op map. * @param value Value to set */ public void setOp(int opPos, int value) { m_opMap.setElementAt(value,opPos); }
m_compiler.m_opMap = new OpMapVector(initTokQueueSize, OpMap.BLOCKTOKENQUEUESIZE * 5, OpMap.MAPINDEX_LENGTH);
/** * Replace the large arrays * with a small array. */ void shrink() { int n = m_opMap.elementAt(MAPINDEX_LENGTH); m_opMap.setToSize(n + 4); m_opMap.setElementAt(0,n); m_opMap.setElementAt(0,n+1); m_opMap.setElementAt(0,n+2); n = m_tokenQueue.size(); m_tokenQueue.setToSize(n + 4); m_tokenQueue.setElementAt(null,n); m_tokenQueue.setElementAt(null,n + 1); m_tokenQueue.setElementAt(null,n + 2); }
/** * Get the length of an operation. * * @param opPos The position of the operation in the op map. * * @return The size of the operation. */ public int getArgLength(int opPos) { return m_opMap.elementAt(opPos + MAPINDEX_LENGTH); }
/** * Set the op at index to the given int. * * @param opPos index into op map. * @param value Value to set */ public void setOp(int opPos, int value) { m_opMap.setElementAt(value,opPos); }
m_compiler.m_opMap = new OpMapVector(initTokQueueSize, OpMap.BLOCKTOKENQUEUESIZE * 5, OpMap.MAPINDEX_LENGTH);
/** * Replace the large arrays * with a small array. */ void shrink() { int n = m_opMap.elementAt(MAPINDEX_LENGTH); m_opMap.setToSize(n + 4); m_opMap.setElementAt(0,n); m_opMap.setElementAt(0,n+1); m_opMap.setElementAt(0,n+2); n = m_tokenQueue.size(); m_tokenQueue.setToSize(n + 4); m_tokenQueue.setElementAt(null,n); m_tokenQueue.setElementAt(null,n + 1); m_tokenQueue.setElementAt(null,n + 2); }