/** Attempt to get or raise a BufferScope in this block. */ private BufferScope getBufferScope(TableBuffer symbol, BufferScope.Strength creating) { // First try to find an existing buffer scope for this symbol. BufferScope buff = findBufferScope(symbol); if (buff != null) return buff; return getBufferScopeSub(symbol, creating); }
/** Attempt to get or raise a BufferScope in this block. */ private BufferScope getBufferScope(TableBuffer symbol, BufferScope.Strength creating) { // First try to find an existing buffer scope for this symbol. BufferScope buff = findBufferScope(symbol); if (buff != null) return buff; return getBufferScopeSub(symbol, creating); }
/** Find nearest BufferScope for a BufferSymbol, if any */ private BufferScope findBufferScope(TableBuffer symbol) { for (BufferScope buff : bufferScopes) { if (buff.getSymbol() != symbol) continue; if (buff.getBlock() == this) return buff; } if (parent != null && symbol.getScope().getRootBlock() != this) return parent.findBufferScope(symbol); return null; }
/** Find nearest BufferScope for a BufferSymbol, if any */ private BufferScope findBufferScope(TableBuffer symbol) { for (BufferScope buff : bufferScopes) { if (buff.getSymbol() != symbol) continue; if (buff.getBlock() == this) return buff; } if (parent != null && symbol.getScope().getRootBlock() != this) return parent.findBufferScope(symbol); return null; }