001    /*
002     *  This file is part of the Jikes RVM project (http://jikesrvm.org).
003     *
004     *  This file is licensed to You under the Eclipse Public License (EPL);
005     *  You may not use this file except in compliance with the License. You
006     *  may obtain a copy of the License at
007     *
008     *      http://www.opensource.org/licenses/eclipse-1.0.php
009     *
010     *  See the COPYRIGHT.txt file distributed with this work for information
011     *  regarding copyright ownership.
012     */
013    package org.jikesrvm.compilers.opt.lir2mir;
014    
015    import org.jikesrvm.ArchitectureSpecificOpt.BURS_TreeNode;
016    import org.jikesrvm.compilers.opt.ir.Operators;
017    
018    /**
019     * A subclass of BURS_TreeNode for an IntConstantOperand.
020     * It is very common for us to want to access the value of an
021     * int constant during BURS, so we make it easy to do so by creating
022     * a special kind of node.
023     */
024    final class BURS_IntConstantTreeNode extends BURS_TreeNode {
025    
026      final int value;
027    
028      /**
029       * Constructor for interior node.
030       */
031      BURS_IntConstantTreeNode(int val) {
032        super(Operators.INT_CONSTANT_opcode);
033        value = val;
034        setNumRegisters(0);
035      }
036    
037      public String toString() {
038        return "INT_CONSTANT " + value;
039      }
040    }