关于Item

关于Item

0、Item

The base class of all items, which implements default behavior.

项(Item)代表一个字节码中可以寻址的实体,有许多种类的项,例如,局部变量、静态变量堆栈的栈顶值、this指针等等

1、StaticItem

An item representing a static variable or method.

2、StackItem

An item representing a value on stack.

如果操作数已经在栈中,那么直接就是StackItem,如果是StackItem,则不需要任何JVM操作码。

3、SelfItem

An item representing `this' or `super'.

4、MemberItem

An item representing an instance variable or method.

5、LocalItem

An item representing a local variable.

6、IndexedItem

An item representing an indexed expression.

7、ImmediateItem

An item representing a literal.

常量类型的Item对应的是ImmediateItem

8、CondItem

An item representing a conditional or unconditional jump.

9、AssignItem

An item representing an assignment expressions.

查看Items类对这些Item的操作及说明:

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.

上一篇:一种基于Orleans的分布式Id生成方案


下一篇:【紫书】Trees on the level UVA - 122 动态建树及bfs