Class SimpleCloneInfo

java.lang.Object
org.jruby.ir.transformations.inlining.CloneInfo
org.jruby.ir.transformations.inlining.SimpleCloneInfo

public class SimpleCloneInfo extends CloneInfo
Context info for simple cloning operation.
  • Constructor Details

    • SimpleCloneInfo

      public SimpleCloneInfo(IRScope scope, boolean isEnsureBlock, boolean cloneIPC)
    • SimpleCloneInfo

      public SimpleCloneInfo(IRScope scope, boolean isEnsureBlock)
  • Method Details

    • isEnsureBlockCloneMode

      public boolean isEnsureBlockCloneMode()
    • shouldCloneIPC

      public boolean shouldCloneIPC()
    • getRenamedVariable

      public Variable getRenamedVariable(Variable variable)
      Description copied from class: CloneInfo
      Return a new instance of a variable for the newly cloned scope. Maps are maintained because Variables typically share the same instance across a CFG (of the same lexical depth).
      Overrides:
      getRenamedVariable in class CloneInfo
      Parameters:
      variable - to be renamed
      Returns:
      the new Variable
    • getRenamedLabelSimple

      protected Label getRenamedLabelSimple(Label l)
      Specified by:
      getRenamedLabelSimple in class CloneInfo
    • getRenamedSelfVariable

      public Variable getRenamedSelfVariable(Variable self)
      Description copied from class: CloneInfo
      How do we rename %self?
      Specified by:
      getRenamedSelfVariable in class CloneInfo
      Parameters:
      self - to be renamed
      Returns:
      the new self or itself
    • getRenamedVariableSimple

      protected Variable getRenamedVariableSimple(Variable v)
      Description copied from class: CloneInfo
      How are typical variables renamed if they were not yet found in the variable renaming map?
      Specified by:
      getRenamedVariableSimple in class CloneInfo
      Parameters:
      v - to be renamed
      Returns:
      the new variable
    • renameLabel

      public void renameLabel(Label l)