Module xl.compiler

Class MethodScope


public class MethodScope extends BlockScope
  • Field Details

    • consumer

      public Local consumer
    • enclosingInstance

      public Local enclosingInstance
    • ast

      public antlr.collections.AST ast
  • Constructor Details

    • MethodScope

      public MethodScope(MethodScope enclosing)
  • Method Details

    • getDeclaredEntity

      public Member getDeclaredEntity()
      Overrides:
      getDeclaredEntity in class Scope
    • createVMXFrame

      public void createVMXFrame()
    • createLocalForVMX

      public void createLocalForVMX()
    • getLocalForVMX

      public Local getLocalForVMX()
    • createAndDeclareMethod

      public XMethod createAndDeclareMethod(String name, Type returnType)
    • setBlock

      public Expression setBlock(Expression block)
      Overrides:
      setBlock in class BlockScope
    • getMethod

      public XMethod getMethod()
    • isStatic

      public boolean isStatic()
      Description copied from class: Scope
      Checks if this scope appears in a static context. This is defined by the Java Language Specification.
      Overrides:
      isStatic in class Scope
      Returns:
      true iff this scope appears in a static context
    • isInitializer

      public boolean isInitializer()
    • isConstructor

      public boolean isConstructor()
    • isIllegalUseBeforeDeclaration

      public boolean isIllegalUseBeforeDeclaration(Field field)
    • isLocal

      public boolean isLocal()
    • get

      public static MethodScope get(Expression e)
    • get

      public static MethodScope get(Scope scope)
    • getOutmost

      public MethodScope getOutmost()
    • declareException

      public void declareException(Type type)
    • declareParameter

      public Local declareParameter(String name, long mods, Class cls)
    • declareParameter

      public Local declareParameter(String name, long mods, Type type)
    • getParameterForEnclosingLocal

      public Local getParameterForEnclosingLocal(Local enclosing)
    • getResultLocal

      public VMXState.Local getResultLocal()
    • enterLabel

      public boolean enterLabel(String name)
    • enterBreakTarget

      public void enterBreakTarget(String label)
    • enterContinueTarget

      public void enterContinueTarget(String label)
    • leave

      public void leave(BreakTarget e)
    • getTargetId

      public int getTargetId(String name, boolean forContinue)
    • getTargetFor

      public BreakTarget getTargetFor(Break e)
    • createThis

      public Expression createThis()
      Overrides:
      createThis in class BlockScope
    • makeVMXLocal

      public final Local makeVMXLocal(Local local)
    • getParameterTypes

      public Type[] getParameterTypes()
    • getParameter

      public Local getParameter(int index)
    • removeLocal

      public void removeLocal(Local l)
    • complete

      public void complete()
    • dumpLocals

      public void dumpLocals()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • dispose

      public void dispose()