void clear(int n) { if (!(0 <= n && n < itsSize)) badIndex(n); itsBits[n >> 5] &= ~(1 << (n & 31)); }
private void initLiveOnEntrySets(OptFunctionNode fn, Node[] statementNodes) { int listLength = fn.getVarCount(); itsUseBeforeDefSet = new DataFlowBitSet(listLength); itsNotDefSet = new DataFlowBitSet(listLength); itsLiveOnEntrySet = new DataFlowBitSet(listLength); itsLiveOnExitSet = new DataFlowBitSet(listLength); for (int i = itsStartNodeIndex; i <= itsEndNodeIndex; i++) { Node n = statementNodes[i]; lookForVariableAccess(fn, n); } itsNotDefSet.not(); // truth in advertising }
if (child.getType() == Token.GETVAR) { int varIndex = fn.getVarIndex(child); if (!itsNotDefSet.test(varIndex)) itsUseBeforeDefSet.set(varIndex); itsNotDefSet.set(varIndex); Node rhs = lhs.getNext(); lookForVariableAccess(fn, rhs); itsNotDefSet.set(fn.getVarIndex(n)); if (!itsNotDefSet.test(varIndex)) itsUseBeforeDefSet.set(varIndex);
private void markAnyTypeVariables(int[] varTypes) { for (int i = 0; i != varTypes.length; i++) { if (itsLiveOnEntrySet.test(i)) { assignType(varTypes, i, Optimizer.AnyType); } } }
private void initLiveOnEntrySets(OptFunctionNode fn, Node[] statementNodes) { int listLength = fn.getVarCount(); itsUseBeforeDefSet = new DataFlowBitSet(listLength); itsNotDefSet = new DataFlowBitSet(listLength); itsLiveOnEntrySet = new DataFlowBitSet(listLength); itsLiveOnExitSet = new DataFlowBitSet(listLength); for (int i = itsStartNodeIndex; i <= itsEndNodeIndex; i++) { Node n = statementNodes[i]; lookForVariableAccess(fn, n); } itsNotDefSet.not(); // truth in advertising }
if (child.getType() == Token.GETVAR) { int varIndex = fn.getVarIndex(child); if (!itsNotDefSet.test(varIndex)) itsUseBeforeDefSet.set(varIndex); itsNotDefSet.set(varIndex); Node rhs = lhs.getNext(); lookForVariableAccess(fn, rhs); itsNotDefSet.set(fn.getVarIndex(n)); if (!itsNotDefSet.test(varIndex)) itsUseBeforeDefSet.set(varIndex);
private void markAnyTypeVariables(int[] varTypes) { for (int i = 0; i != varTypes.length; i++) { if (itsLiveOnEntrySet.test(i)) { assignType(varTypes, i, Optimizer.AnyType); } } }
void set(int n) { if (!(0 <= n && n < itsSize)) badIndex(n); itsBits[n >> 5] |= 1 << (n & 31); }
void clear(int n) { if (!(0 <= n && n < itsSize)) badIndex(n); itsBits[n >> 5] &= ~(1 << (n & 31)); }
void set(int n) { if (!(0 <= n && n < itsSize)) badIndex(n); itsBits[n >> 5] |= 1 << (n & 31); }
boolean test(int n) { if (!(0 <= n && n < itsSize)) badIndex(n); return ((itsBits[n >> 5] & (1 << (n & 31))) != 0); }
boolean test(int n) { if (!(0 <= n && n < itsSize)) badIndex(n); return ((itsBits[n >> 5] & (1 << (n & 31))) != 0); }