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 Type
    Method
    Description
    boolean
    getFlag(int flag)
    Check if a flag is set in a lexical context node
    int
    Get all flags of a LexicalContextNode
    setFlag(LexicalContext lc, int flag)
    Set a flag of a LexicalContextNode
    setFlags(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

      T setFlag(LexicalContext lc, int flag)
      Set a flag of a LexicalContextNode
      Parameters:
      lc - lexical context
      flag - flag to set
      Returns:
      the new LexicalContext node if flags were changed, same otherwise
    • setFlags

      T setFlags(LexicalContext lc, int flags)
      Set all flags of a LexicalContextNode, overwriting previous flags
      Parameters:
      lc - lexical context
      flags - new flags value
      Returns:
      the new LexicalContext node if flags were changed, same otherwise