Java Code Examples for jdk.nashorn.internal.ir.Symbol#isBytecodeLocal()
The following examples show how to use
jdk.nashorn.internal.ir.Symbol#isBytecodeLocal() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LocalVariableTypesCalculator.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
@Override public boolean enterBlock(final Block block) { boolean cloned = false; for(final Symbol symbol: block.getSymbols()) { if(symbol.isBytecodeLocal()) { if (getLocalVariableTypeOrNull(symbol) == null) { if (!cloned) { cloneOrNewLocalVariableTypes(); cloned = true; } localVariableTypes.put(symbol, LvarType.UNDEFINED); } // In case we're repeating analysis of a lexical scope (e.g. it's in a loop), // make sure all symbols lexically scoped by the block become valid again. invalidatedSymbols.remove(symbol); } } return true; }
Example 2
Source File: LocalVariableTypesCalculator.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
@Override public boolean enterBlock(final Block block) { boolean cloned = false; for(final Symbol symbol: block.getSymbols()) { if(symbol.isBytecodeLocal()) { if (getLocalVariableTypeOrNull(symbol) == null) { if (!cloned) { cloneOrNewLocalVariableTypes(); cloned = true; } localVariableTypes.put(symbol, LvarType.UNDEFINED); } // In case we're repeating analysis of a lexical scope (e.g. it's in a loop), // make sure all symbols lexically scoped by the block become valid again. invalidatedSymbols.remove(symbol); } } return true; }
Example 3
Source File: LocalVariableTypesCalculator.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
@Override public boolean enterBlock(final Block block) { boolean cloned = false; for(final Symbol symbol: block.getSymbols()) { if(symbol.isBytecodeLocal()) { if (getLocalVariableTypeOrNull(symbol) == null) { if (!cloned) { cloneOrNewLocalVariableTypes(); cloned = true; } localVariableTypes.put(symbol, LvarType.UNDEFINED); } // In case we're repeating analysis of a lexical scope (e.g. it's in a loop), // make sure all symbols lexically scoped by the block become valid again. invalidatedSymbols.remove(symbol); } } return true; }
Example 4
Source File: LocalVariableTypesCalculator.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
@Override public boolean enterBlock(final Block block) { boolean cloned = false; for(final Symbol symbol: block.getSymbols()) { if(symbol.isBytecodeLocal()) { if (getLocalVariableTypeOrNull(symbol) == null) { if (!cloned) { cloneOrNewLocalVariableTypes(); cloned = true; } localVariableTypes.put(symbol, LvarType.UNDEFINED); } // In case we're repeating analysis of a lexical scope (e.g. it's in a loop), // make sure all symbols lexically scoped by the block become valid again. invalidatedSymbols.remove(symbol); } } return true; }
Example 5
Source File: LocalVariableTypesCalculator.java From jdk8u_nashorn with GNU General Public License v2.0 | 6 votes |
@Override public boolean enterBlock(final Block block) { boolean cloned = false; for(final Symbol symbol: block.getSymbols()) { if(symbol.isBytecodeLocal()) { if (getLocalVariableTypeOrNull(symbol) == null) { if (!cloned) { cloneOrNewLocalVariableTypes(); cloned = true; } localVariableTypes.put(symbol, LvarType.UNDEFINED); } // In case we're repeating analysis of a lexical scope (e.g. it's in a loop), // make sure all symbols lexically scoped by the block become valid again. invalidatedSymbols.remove(symbol); } } return true; }
Example 6
Source File: LocalVariableTypesCalculator.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
@Override public boolean enterIdentNode(final IdentNode identNode) { final Symbol symbol = identNode.getSymbol(); if(symbol.isBytecodeLocal()) { symbolIsUsed(symbol); final LvarType type = getLocalVariableType(symbol); setIdentifierLvarType(identNode, type); typeStack.push(type); } else { pushExpressionType(identNode); } return false; }
Example 7
Source File: LocalVariableTypesCalculator.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
@Override public boolean enterBlock(final Block block) { for(final Symbol symbol: block.getSymbols()) { if(symbol.isBytecodeLocal() && getLocalVariableTypeOrNull(symbol) == null) { setType(symbol, LvarType.UNDEFINED); } } return true; }
Example 8
Source File: LocalVariableTypesCalculator.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
@Override public boolean enterIdentNode(final IdentNode identNode) { final Symbol symbol = identNode.getSymbol(); if(symbol.isBytecodeLocal()) { symbolIsUsed(symbol); final LvarType type = getLocalVariableType(symbol); setIdentifierLvarType(identNode, type); typeStack.push(type); } else { pushExpressionType(identNode); } return false; }
Example 9
Source File: LocalVariableTypesCalculator.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
@Override public boolean enterIdentNode(final IdentNode identNode) { final Symbol symbol = identNode.getSymbol(); if(symbol.isBytecodeLocal()) { symbolIsUsed(symbol); final LvarType type = getLocalVariableType(symbol); setIdentifierLvarType(identNode, type); typeStack.push(type); } else { pushExpressionType(identNode); } return false; }
Example 10
Source File: LocalVariableTypesCalculator.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
@Override public boolean enterIdentNode(final IdentNode identNode) { final Symbol symbol = identNode.getSymbol(); if(symbol.isBytecodeLocal()) { symbolIsUsed(symbol); final LvarType type = getLocalVariableType(symbol); setIdentifierLvarType(identNode, type); typeStack.push(type); } else { pushExpressionType(identNode); } return false; }
Example 11
Source File: LocalVariableTypesCalculator.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
@Override public boolean enterIdentNode(final IdentNode identNode) { final Symbol symbol = identNode.getSymbol(); if(symbol.isBytecodeLocal()) { symbolIsUsed(symbol); final LvarType type = getLocalVariableType(symbol); setIdentifierLvarType(identNode, type); typeStack.push(type); } else { pushExpressionType(identNode); } return false; }
Example 12
Source File: LocalVariableTypesCalculator.java From hottub with GNU General Public License v2.0 | 5 votes |
@Override public boolean enterBlock(final Block block) { for(final Symbol symbol: block.getSymbols()) { if(symbol.isBytecodeLocal() && getLocalVariableTypeOrNull(symbol) == null) { setType(symbol, LvarType.UNDEFINED); } } return true; }
Example 13
Source File: LocalVariableTypesCalculator.java From hottub with GNU General Public License v2.0 | 5 votes |
@Override public boolean enterIdentNode(final IdentNode identNode) { final Symbol symbol = identNode.getSymbol(); if(symbol.isBytecodeLocal()) { symbolIsUsed(symbol); final LvarType type = getLocalVariableType(symbol); setIdentifierLvarType(identNode, type); typeStack.push(type); } else { pushExpressionType(identNode); } return false; }
Example 14
Source File: LocalVariableTypesCalculator.java From jdk8u_nashorn with GNU General Public License v2.0 | 5 votes |
@Override public boolean enterIdentNode(final IdentNode identNode) { final Symbol symbol = identNode.getSymbol(); if(symbol.isBytecodeLocal()) { symbolIsUsed(symbol); final LvarType type = getLocalVariableType(symbol); setIdentifierLvarType(identNode, type); typeStack.push(type); } else { pushExpressionType(identNode); } return false; }