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.<p> 020 * 021 * It is very common for us to want to access the value of an 022 * int constant during BURS, so we make it easy to do so by creating 023 * a special kind of node. 024 */ 025 final class BURS_IntConstantTreeNode extends BURS_TreeNode { 026 027 final int value; 028 029 /** 030 * Constructor for interior node. 031 */ 032 BURS_IntConstantTreeNode(int val) { 033 super(Operators.INT_CONSTANT_opcode); 034 value = val; 035 setNumRegisters(0); 036 } 037 038 @Override 039 public String toString() { 040 return "INT_CONSTANT " + value; 041 } 042 }