Interface Flags<T extends LexicalContextNode>
- Type Parameters:
T- lexical context node that can have flags set during code generation
- All Known Implementing Classes:
Block, FunctionNode
public interface Flags<T extends LexicalContextNode>
Interface implemented by all nodes that have flags in a lexical context. This is needed as we
sometimes have to save the setting of flags in the lexical context until a block is completely
finished and its final version (after multiple copy on writes) is placed in the lexical context
-
Method Summary
Modifier and TypeMethodDescriptionbooleangetFlag(int flag) Check if a flag is set in a lexical context nodeintgetFlags()Get all flags of a LexicalContextNodesetFlag(LexicalContext lc, int flag) Set a flag of a LexicalContextNodesetFlags(LexicalContext lc, int flags) Set all flags of a LexicalContextNode, overwriting previous flags
-
Method Details
-
getFlags
int getFlags()Get all flags of a LexicalContextNode- Returns:
- flags
-
getFlag
boolean getFlag(int flag) Check if a flag is set in a lexical context node- Parameters:
flag- flag to check- Returns:
- flags
-
setFlag
Set a flag of a LexicalContextNode- Parameters:
lc- lexical contextflag- flag to set- Returns:
- the new LexicalContext node if flags were changed, same otherwise
-
setFlags
Set all flags of a LexicalContextNode, overwriting previous flags- Parameters:
lc- lexical contextflags- new flags value- Returns:
- the new LexicalContext node if flags were changed, same otherwise
-