Lines Matching defs:symbols

51     protected final Map<String, Symbol> symbols;
120 this.symbols = new LinkedHashMap<>();
163 private Block(final Block block, final int finish, final List<Statement> statements, final int flags, final Map<String, Symbol> symbols, final LocalVariableConversion conversion) {
167 this.symbols = new LinkedHashMap<>(symbols); //todo - symbols have no dependencies on any IR node and can as far as we understand it be shallow copied now
183 * Returns true if this block defines any symbols.
184 * @return true if this block defines any symbols.
187 return !symbols.isEmpty();
191 * Replaces symbols defined in this block with different symbols. Used to ensure symbol tables are
193 * symbols in the symbol table, it does not act on any contained AST nodes that might reference the symbols.
197 * @return a new block with replaced symbols, or this block if none of the replacements modified the symbol
201 if (symbols.isEmpty()) {
204 final LinkedHashMap<String, Symbol> newSymbols = new LinkedHashMap<>(symbols);
218 return new Block(this, finish, statements, flags, new LinkedHashMap<>(symbols), conversion);
223 return Node.replaceInLexicalContext(lc, this, new Block(this, finish, statements, flags, symbols, conversion));
242 * Get a copy of the list for all the symbols defined in this block
246 return symbols.isEmpty() ? Collections.emptyList() : Collections.unmodifiableList(new ArrayList<>(symbols.values()));
256 return symbols.get(name);
278 * Print symbols in block in alphabetical order, sorted on name
279 * Used for debugging, see the --print-symbols flag
281 * @param stream print writer to output symbols to
283 * @return true if symbols were found
286 final List<Symbol> values = new ArrayList<>(symbols.values());
345 return Node.replaceInLexicalContext(lc, this, new Block(this, finish, statements, flags, symbols, conversion));
404 return Node.replaceInLexicalContext(lc, this, new Block(this, Math.max(finish, lastFinish), statements, flags, symbols, conversion));
413 symbols.put(symbol.getName(), symbol);
439 return Node.replaceInLexicalContext(lc, this, new Block(this, finish, statements, flags, symbols, conversion));
467 return Node.replaceInLexicalContext(lc, this, new Block(this, finish, statements, flags | NEEDS_SCOPE, symbols, conversion));