|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sun.tools.javac.jvm.Items
public class Items
A helper class for code generation. Items are objects that stand for addressable entities in the bytecode. Each item supports a fixed protocol for loading the item on the stack, storing into it, converting it into a jump condition, and several others. There are many individual forms of items, such as local, static, indexed, or instance variables, values on the top of stack, the special values this or super, etc. Individual items are represented as inner classes in class Items.
This is NOT part of any API supported by Sun Microsystems. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.
| Nested Class Summary | |
|---|---|
(package private) class |
Items.AssignItem
An item representing an assignment expressions. |
(package private) class |
Items.CondItem
An item representing a conditional or unconditional jump. |
(package private) class |
Items.ImmediateItem
An item representing a literal. |
(package private) class |
Items.IndexedItem
An item representing an indexed expression. |
(package private) class |
Items.Item
The base class of all items, which implements default behavior. |
(package private) class |
Items.LocalItem
An item representing a local variable. |
(package private) class |
Items.MemberItem
An item representing an instance variable or method. |
(package private) class |
Items.SelfItem
An item representing `this' or `super'. |
(package private) class |
Items.StackItem
An item representing a value on stack. |
(package private) class |
Items.StaticItem
An item representing a static variable or method. |
| Field Summary | |
|---|---|
(package private) Code |
code
The current code buffer. |
(package private) Pool |
pool
The current constant pool. |
private Items.Item[] |
stackItem
|
private Items.Item |
superItem
|
(package private) Symtab |
syms
The current symbol table. |
private Items.Item |
thisItem
|
(package private) Types |
types
Type utilities. |
private Items.Item |
voidItem
Items that exist only once (flyweight pattern). |
| Constructor Summary | |
|---|---|
Items(Pool pool,
Code code,
Symtab syms,
Types types)
|
|
| Method Summary | |
|---|---|
(package private) Items.Item |
makeAssignItem(Items.Item lhs)
Make an item representing an assignment expression. |
(package private) Items.CondItem |
makeCondItem(int opcode)
Make an item representing a conditional or unconditional jump. |
(package private) Items.CondItem |
makeCondItem(int opcode,
Code.Chain trueJumps,
Code.Chain falseJumps)
Make an item representing a conditional or unconditional jump. |
(package private) Items.Item |
makeImmediateItem(Type type,
java.lang.Object value)
Make an item representing a literal. |
(package private) Items.Item |
makeIndexedItem(Type type)
Make an item representing an indexed expression. |
(package private) Items.LocalItem |
makeLocalItem(Symbol.VarSymbol v)
Make an item representing a local variable. |
private Items.LocalItem |
makeLocalItem(Type type,
int reg)
Make an item representing a local anonymous variable. |
(package private) Items.Item |
makeMemberItem(Symbol member,
boolean nonvirtual)
Make an item representing an instance variable or method. |
(package private) Items.Item |
makeStackItem(Type type)
Make an item representing a value on stack. |
(package private) Items.Item |
makeStaticItem(Symbol member)
Make an item representing a static variable or method. |
(package private) Items.Item |
makeSuperItem()
Make an item representing `super'. |
(package private) Items.Item |
makeThisItem()
Make an item representing `this'. |
(package private) Items.Item |
makeVoidItem()
Make a void item |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
Pool pool
Code code
Symtab syms
Types types
private final Items.Item voidItem
private final Items.Item thisItem
private final Items.Item superItem
private final Items.Item[] stackItem
| Constructor Detail |
|---|
public Items(Pool pool,
Code code,
Symtab syms,
Types types)
| Method Detail |
|---|
Items.Item makeVoidItem()
Items.Item makeThisItem()
Items.Item makeSuperItem()
Items.Item makeStackItem(Type type)
type - The value's type.Items.Item makeIndexedItem(Type type)
type - The expression's type.Items.LocalItem makeLocalItem(Symbol.VarSymbol v)
v - The represented variable.
private Items.LocalItem makeLocalItem(Type type,
int reg)
type - The represented variable's type.reg - The represented variable's register.Items.Item makeStaticItem(Symbol member)
member - The represented symbol.
Items.Item makeMemberItem(Symbol member,
boolean nonvirtual)
member - The represented symbol.nonvirtual - Is the reference not virtual? (true for constructors
and private members).
Items.Item makeImmediateItem(Type type,
java.lang.Object value)
type - The literal's type.value - The literal's value.Items.Item makeAssignItem(Items.Item lhs)
lhs - The item representing the assignment's left hand side.
Items.CondItem makeCondItem(int opcode,
Code.Chain trueJumps,
Code.Chain falseJumps)
opcode - The jump's opcode.trueJumps - A chain encomassing all jumps that can be taken
if the condition evaluates to true.falseJumps - A chain encomassing all jumps that can be taken
if the condition evaluates to false.Items.CondItem makeCondItem(int opcode)
opcode - The jump's opcode.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||