jif.ast
Class JifMethodDecl_c

java.lang.Object
  extended by polyglot.ast.Node_c
      extended by polyglot.ast.Term_c
          extended by polyglot.ast.MethodDecl_c
              extended by jif.ast.JifMethodDecl_c
All Implemented Interfaces:
java.lang.Cloneable, JifMethodDecl, JifProcedureDecl, polyglot.ast.ClassMember, polyglot.ast.CodeBlock, polyglot.ast.CodeDecl, polyglot.ast.CodeNode, polyglot.ast.JL, polyglot.ast.MethodDecl, polyglot.ast.Node, polyglot.ast.NodeOps, polyglot.ast.ProcedureDecl, polyglot.ast.Term, polyglot.util.Copy

public class JifMethodDecl_c
extends polyglot.ast.MethodDecl_c
implements JifMethodDecl

An implementation of the JifMethod interface.


Field Summary
protected  java.util.List constraints
           
protected  LabelNode returnLabel
           
protected  LabelNode startLabel
           
 
Fields inherited from class polyglot.ast.MethodDecl_c
body, flags, formals, mi, name, returnType, throwTypes
 
Fields inherited from class polyglot.ast.Term_c
exceptions, reachable
 
Fields inherited from class polyglot.ast.Node_c
del, error, ext, position
 
Constructor Summary
JifMethodDecl_c(polyglot.util.Position pos, polyglot.types.Flags flags, polyglot.ast.TypeNode returnType, polyglot.ast.Id name, LabelNode startLabel, java.util.List formals, LabelNode returnLabel, java.util.List throwTypes, java.util.List constraints, polyglot.ast.Block body)
           
 
Method Summary
 java.util.List constraints()
           
 JifMethodDecl constraints(java.util.List constraints)
           
 polyglot.ast.Node disambiguate(polyglot.visit.AmbiguityRemover ar)
           
protected  JifMethodDecl_c reconstruct(polyglot.ast.Id name, polyglot.ast.TypeNode returnType, LabelNode startLabel, java.util.List formals, LabelNode returnLabel, java.util.List throwTypes, java.util.List constraints, polyglot.ast.Block body)
           
 LabelNode returnLabel()
           
 JifMethodDecl returnLabel(LabelNode returnLabel)
           
 LabelNode startLabel()
           
 JifMethodDecl startLabel(LabelNode startLabel)
           
static JifMethodInstance unrenameArgs(JifMethodInstance jmi)
          Rename the arg labels and arg roots.
 polyglot.ast.Node visitChildren(polyglot.visit.NodeVisitor v)
           
 
Methods inherited from class polyglot.ast.MethodDecl_c
acceptCFG, body, body, buildTypes, buildTypesEnter, codeBody, codeInstance, copy, dump, enterScope, exceptionCheckEnter, firstChild, flags, flags, formals, formals, id, id, isDisambiguated, memberInstance, methodInstance, methodInstance, name, name, overrideMethodCheck, prettyPrint, prettyPrintHeader, procedureInstance, reconstruct, returnType, returnType, throwTypes, throwTypes, toString, typeCheck
 
Methods inherited from class polyglot.ast.Term_c
exceptionCheck, exceptions, exceptions, listChild, reachable, reachable
 
Methods inherited from class polyglot.ast.Node_c
addDecls, checkConstants, childExpectedType, copy, copy, del, del, disambiguateEnter, disambiguateOverride, dump, dump, enterChildScope, error, error, ext, ext, ext, ext, init, isTypeChecked, node, position, position, prettyPrint, prettyPrint, print, printBlock, printSubStmt, throwTypes, translate, typeCheckEnter, typeCheckOverride, visit, visitChild, visitEdge, visitList
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface polyglot.ast.ProcedureDecl
procedureInstance
 
Methods inherited from interface polyglot.ast.CodeBlock
body, body
 
Methods inherited from interface polyglot.ast.CodeNode
codeBody, codeInstance
 
Methods inherited from interface polyglot.ast.ClassMember
memberInstance
 
Methods inherited from interface polyglot.ast.MethodDecl
flags, flags, formals, formals, id, id, methodInstance, methodInstance, name, name, returnType, returnType, throwTypes, throwTypes
 
Methods inherited from interface polyglot.ast.ProcedureDecl
procedureInstance
 
Methods inherited from interface polyglot.ast.CodeBlock
body, body
 
Methods inherited from interface polyglot.ast.CodeNode
codeBody, codeInstance
 
Methods inherited from interface polyglot.ast.ClassMember
memberInstance
 

Field Detail

startLabel

protected LabelNode startLabel

returnLabel

protected LabelNode returnLabel

constraints

protected java.util.List constraints
Constructor Detail

JifMethodDecl_c

public JifMethodDecl_c(polyglot.util.Position pos,
                       polyglot.types.Flags flags,
                       polyglot.ast.TypeNode returnType,
                       polyglot.ast.Id name,
                       LabelNode startLabel,
                       java.util.List formals,
                       LabelNode returnLabel,
                       java.util.List throwTypes,
                       java.util.List constraints,
                       polyglot.ast.Block body)
Method Detail

startLabel

public LabelNode startLabel()
Specified by:
startLabel in interface JifProcedureDecl

startLabel

public JifMethodDecl startLabel(LabelNode startLabel)
Specified by:
startLabel in interface JifMethodDecl

returnLabel

public LabelNode returnLabel()
Specified by:
returnLabel in interface JifProcedureDecl

returnLabel

public JifMethodDecl returnLabel(LabelNode returnLabel)
Specified by:
returnLabel in interface JifMethodDecl

constraints

public java.util.List constraints()
Specified by:
constraints in interface JifProcedureDecl

constraints

public JifMethodDecl constraints(java.util.List constraints)
Specified by:
constraints in interface JifMethodDecl

visitChildren

public polyglot.ast.Node visitChildren(polyglot.visit.NodeVisitor v)
Specified by:
visitChildren in interface polyglot.ast.NodeOps
Overrides:
visitChildren in class polyglot.ast.MethodDecl_c

reconstruct

protected JifMethodDecl_c reconstruct(polyglot.ast.Id name,
                                      polyglot.ast.TypeNode returnType,
                                      LabelNode startLabel,
                                      java.util.List formals,
                                      LabelNode returnLabel,
                                      java.util.List throwTypes,
                                      java.util.List constraints,
                                      polyglot.ast.Block body)

disambiguate

public polyglot.ast.Node disambiguate(polyglot.visit.AmbiguityRemover ar)
                               throws polyglot.types.SemanticException
Specified by:
disambiguate in interface polyglot.ast.NodeOps
Overrides:
disambiguate in class polyglot.ast.MethodDecl_c
Throws:
polyglot.types.SemanticException

unrenameArgs

public static JifMethodInstance unrenameArgs(JifMethodInstance jmi)
Rename the arg labels and arg roots. This is needed to make sure that during substitution of args in a recursive method call, we don't confuse the