815N/A * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 553N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 553N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 553N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 553N/A * or visit www.oracle.com if you need additional information or have any 0N/A/** A helper class for code generation. Items are objects 0N/A * that stand for addressable entities in the bytecode. Each item 0N/A * supports a fixed protocol for loading the item on the stack, storing 0N/A * into it, converting it into a jump condition, and several others. 0N/A * There are many individual forms of items, such as local, static, 0N/A * indexed, or instance variables, values on the top of stack, the 0N/A * special values this or super, etc. Individual items are represented as 0N/A * inner classes in class Items. 580N/A * <p><b>This is NOT part of any supported API. 580N/A * If you write code that depends on this, you do so at your own risk. 0N/A * This code and its internal interfaces are subject to change or 0N/A * deletion without notice.</b> 0N/A /** The current constant pool. 0N/A /** The current code buffer. 0N/A /** The current symbol table. 0N/A /** Type utilities. */ 0N/A /** Items that exist only once (flyweight pattern). 0N/A /** Make a void item 0N/A /** Make an item representing `this'. 0N/A /** Make an item representing `super'. 0N/A /** Make an item representing a value on stack. 0N/A * @param type The value's type. 0N/A /** Make an item representing an indexed expression. 0N/A * @param type The expression's type. 0N/A /** Make an item representing a local variable. 0N/A * @param v The represented variable. 0N/A /** Make an item representing a local anonymous variable. 0N/A * @param type The represented variable's type. 0N/A * @param reg The represented variable's register. 0N/A /** Make an item representing a static variable or method. 0N/A * @param member The represented symbol. 0N/A /** Make an item representing an instance variable or method. 0N/A * @param member The represented symbol. 0N/A * @param nonvirtual Is the reference not virtual? (true for constructors 0N/A * and private members). 0N/A /** Make an item representing a literal. 0N/A * @param type The literal's type. 0N/A * @param value The literal's value. 0N/A /** Make an item representing an assignment expression. 0N/A * @param lhs The item representing the assignment's left hand side. 0N/A /** Make an item representing a conditional or unconditional jump. 0N/A * @param opcode The jump's opcode. 0N/A * @param trueJumps A chain encomassing all jumps that can be taken 0N/A * if the condition evaluates to true. 0N/A * @param falseJumps A chain encomassing all jumps that can be taken 0N/A * if the condition evaluates to false. 0N/A /** Make an item representing a conditional or unconditional jump. 0N/A * @param opcode The jump's opcode. 0N/A /** The base class of all items, which implements default behavior. 0N/A /** The type code of values represented by this item. 0N/A /** Generate code to load this item onto stack. 0N/A /** Generate code to store top of stack into this item. 0N/A /** Generate code to invoke method represented by this item. 0N/A /** Generate code to use this item twice. 0N/A /** Generate code to avoid having to use this item. 0N/A /** Generate code to stash a copy of top of stack - of typecode toscode - 0N/A /** Generate code to turn item into a testable condition. 0N/A /** Generate code to coerce item to given type code. 0N/A * @param targetcode The type code to coerce to. 0N/A /** Generate code to coerce item to given type. 0N/A * @param targettype The type to coerce to. 0N/A /** Return the width of this item on stack as a number of words. 0N/A /** An item representing a value on stack. 0N/A /** An item representing an indexed expression. 0N/A /** An item representing `this' or `super'. 0N/A /** Flag which determines whether this item represents `this' or `super'. 0N/A /** An item representing a local variable. 0N/A /** The variable's register. 0N/A /** The variable's type. 0N/A return "localItem(type=" +
type +
"; reg=" +
reg +
")";
0N/A /** An item representing a static variable or method. 0N/A /** The represented symbol. 0N/A /** An item representing an instance variable or method. 0N/A /** The represented symbol. 0N/A /** Flag that determines whether or not access is virtual. 0N/A /** An item representing a literal. 0N/A /** The literal's value. 0N/A /** Return true iff float number is positive 0. 0N/A return x ==
0.0f &&
1.0f / x >
0.0f;
0N/A /** Return true iff double number is positive 0. 0N/A return x ==
0.0d &&
1.0d / x >
0.0d;
0N/A /** An item representing an assignment expressions. 0N/A /** The item representing the assignment's left hand side. 0N/A return "assign(lhs = " +
lhs +
")";
0N/A /** An item representing a conditional or unconditional jump. 0N/A /** A chain encomassing all jumps that can be taken 0N/A * if the condition evaluates to true. 0N/A /** A chain encomassing all jumps that can be taken 0N/A * if the condition evaluates to false. 0N/A /** The jump's opcode. 0N/A * An abstract syntax tree of this item. It is needed 0N/A * for branch entries in 'CharacterRangeTable' attribute. 0N/A // we should proceed further in -Xjcov mode only 0N/A // we should proceed further in -Xjcov mode only 0N/A // a CondItem doesn't have a size on the stack per se.