treeproc.java

来自「用Java实现的编译器。把源代码编译成SPARC汇编程序」· Java 代码 · 共 71 行

JAVA
71
字号
// $Id: TreeProc.java,v 1.3 2000/10/21 22:44:33 mdeeds Exp $package java6035.tools.IR;/** * TreeProc represents a procedure. It extends TreeBlock, and has an * additional symbol table field. */public class TreeProc extends TreeBlock{    protected SymbolTable symtab;    /* AUGMENT THIS WITH A SET NAME METHOD. This is for groups that       reduce the block, and then the header. */    /**     * Constructs a TreeProc object.  @param procname may be the name     * of the procedure, or any other descriptive name for this block.     * It may also be the empty string.     *     * @param procname will become the suffix to the label of the     * procedure. The symbol table is initialized to null.     */    public TreeProc(String procname)    {	super(procname);	this.symtab = null;    }    /**     * Constructs a TreeProc object.  @param procname may be the name     * of the procedure, or any other descriptive name for this block.     * It may also be the empty string.     *     * @param procname will become the suffix to the label of the     * procedure. The symbol table is initialized to null.     *     * @param st is used as the Symbol table for this object.     */    public TreeProc(String procname, SymbolTable st)    {	super(procname);	this.symtab = st;    }    protected int tnkind()    {	return TREE_PROC;    }    /**     * Returns the symbol table associated with the TreeProc.     **/    public SymbolTable getSymbolTable()    {	return symtab;    }    /**     * Makes the given symbol table the table associated with this     * procedure.     **/    public void setSymbolTable(SymbolTable st)    {	this.symtab = st;    }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?