Java Doc for CodeAttr.java in  » Scripting » Nice » gnu » bytecode » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Scripting » Nice » gnu.bytecode 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   gnu.bytecode.Attribute
      gnu.bytecode.CodeAttr

CodeAttr
public class CodeAttr extends Attribute implements AttrContainer(Code)
Represents the contents of a standard "Code" attribute.

Most of the actual methods that generate bytecode operation are in this class (typically with names starting with emit), though there are also some in Method.

Note that a CodeAttr is an Attribute of a Method, and can in turn contain other Attributes, such as a LineNumbersAttr.
author:
   Per Bothner



Field Summary
 intPC
    
public  intSP
    
 Attributeattributes
    
 byte[]code
    
 short[]exception_table
    
 intexception_table_length
    
 CodeFragmentfragmentStack
    
 CodeFragmentfragments
    
 IfStateif_stack
     The stack of currently active conditionals.
 Labellabels
    
 LineNumbersAttrlines
    
public  LocalVarsAttrlocals
    
 intpreviousPC
    
 intreadPC
    
 Type[]stack_types
    
 TryStatetry_stack
     The stack of currently active try statements.
 booleanunreachable_here
    

Constructor Summary
public  CodeAttr(Method meth)
    

Method Summary
public  voidaddHandler(int start_pc, int end_pc, int handler_pc, int catch_type)
     Add an exception handler.
public  voidaddHandler(int start_pc, int end_pc, int handler_pc, ClassType catch_type, ConstantPool constants)
     Add an exception handler.
public  VariableaddLocal(Type type)
     Add a new local variable (in the current scope).
Parameters:
  type - type of the new Variable.
public  VariableaddLocal(Type type, String name)
     Add a new local variable (in the current scope).
Parameters:
  type - type of the new Variable.
Parameters:
  name - name of the new Variable.
public  voidaddParamLocals()
     Call addLocal for parameters (as implied by method type).
public  voidassignConstants(ClassType cl)
    
public  voidbeginFragment(boolean isHandler)
    
 booleancheckPostcondition()
    
public  voiddisAssemble(ClassTypeWriter dst, int offset, int length)
    
final public  voidemitAdd(char sig)
    
final public  voidemitAdd(PrimType type)
    
final public  voidemitAdd()
    
final public  voidemitAnd()
    
final public  voidemitArrayLength()
    
public  voidemitArrayLoad(Type element_type)
     Load an element from an array.
public  voidemitArrayLoad()
     Load an element from an array.
public  voidemitArrayStore(Type element_type)
     Store into an element of an array.
public  voidemitCatchEnd()
    
public  voidemitCatchStart(Variable var)
    
public  voidemitCatchStart(ClassType type)
    
public  voidemitCheckcast(Type type)
    
final public  voidemitConvert(Type from, Type to)
    
final public  voidemitDiv()
    
public  voidemitDup()
     Emit code to duplicate the top element of the stack.
public  voidemitDup(int size, int offset)
     Compile code to duplicate with offset.
public  voidemitDup(int size)
     Compile code to duplicate the top 1 or 2 words.
public  voidemitDup(Type type)
     Duplicate the top element of the given type.
public  voidemitDupX()
     Emit code to duplicate the top element of the stack and place the copy before the previous element.
final public  voidemitElse()
     Compile start of else clause.
final public  voidemitFi()
     Compile end of conditional.
public  voidemitFinallyEnd()
    
public  voidemitFinallyStart()
    
final public  voidemitGetField(Field field)
     Compile code to get a non-static field value.
final public  voidemitGetStatic(Field field)
     Compile code to get a static field value. Stack: ...
final public  voidemitGoto(Label label, int opcode)
     Compile an unconditional branch (goto) or a jsr.
final public  voidemitGoto(Label label)
     Compile an unconditional branch (goto).
final public  voidemitGotoIfCompare1(Label label, int opcode)
    
final public  voidemitGotoIfCompare2(Label label, int logop)
    
final public  voidemitGotoIfEq(Label label, boolean invert)
    
final public  voidemitGotoIfEq(Label label)
     Compile a conditional transfer if 2 top stack elements are equal.
final public  voidemitGotoIfGe(Label label)
    
final public  voidemitGotoIfGt(Label label)
    
final public  voidemitGotoIfIntEqZero(Label label)
    
final public  voidemitGotoIfIntGeZero(Label label)
    
final public  voidemitGotoIfIntGtZero(Label label)
    
final public  voidemitGotoIfIntLeZero(Label label)
    
final public  voidemitGotoIfIntLtZero(Label label)
    
final public  voidemitGotoIfIntNeZero(Label label)
    
final public  voidemitGotoIfLe(Label label)
    
final public  voidemitGotoIfLt(Label label)
    
final public  voidemitGotoIfNE(Label label)
     Compile conditional transfer if 2 top stack elements are not equal.
final public  voidemitGotoIfNotNull(Label label)
    
final public  voidemitGotoIfNull(Label label)
    
final public  voidemitIOr()
    
final public  voidemitIfCompare1(int opcode)
     Compile start of a conditional: if (!(x OPCODE 0)) ... The value of x must already have been pushed.
final public  voidemitIfEq()
     Compile start of a conditional: if (x == y) ... The values of x and y must already have been pushed.
final public  voidemitIfGe()
     Compile start of a conditional: if (x >= y) ... The values of x and y must already have been pushed.
final public  voidemitIfGt()
     Compile start of a conditional: if (x > y) ... The values of x and y must already have been pushed.
final public  voidemitIfIntCompare(int opcode)
     Compile start of a conditional: if (!(x OPCODE y)) ... The value of x and y must already have been pushed.
final public  voidemitIfIntLEqZero()
    
final public  voidemitIfIntLt()
    
final public  voidemitIfIntNotZero()
     Compile start of conditional: if (x != 0) ... Also use this if you have pushed a boolean value: if (b) ...
final public  voidemitIfIntZero()
     Compile start of conditional: if (x == 0) ... Also use this if you have pushed a boolean value: if (!b) ...
final public  voidemitIfLe()
     Compile start of a conditional: if (x <= y) ... The values of x and y must already have been pushed.
final public  voidemitIfLt()
     Compile start of a conditional: if (x < y) ... The values of x and y must already have been pushed.
final public  voidemitIfNEq()
     Compile start of a conditional: if (x != y) ... The values of x and y must already have been pushed.
final public  voidemitIfNotNull()
    
final public  voidemitIfNull()
    
final public  voidemitIfRefCompare1(int opcode)
     Compile start of a conditional: if (!(x OPCODE null)) ... The value of x must already have been pushed and must be of reference type.
final public  voidemitIfThen()
    
public  voidemitInc(Variable var, short inc)
    
public  voidemitInstanceof(Type type)
    
public  voidemitInvoke(Method method)
    
public  voidemitInvokeInterface(Method method)
    
public  voidemitInvokeMethod(Method method, int opcode)
    
public  voidemitInvokeSpecial(Method method)
    
public  voidemitInvokeStatic(Method method)
     Compile a static method call.
public  voidemitInvokeVirtual(Method method)
     Compile a virtual method call.
final public  voidemitJsr(Label label)
    
final public  voidemitLoad(Variable var)
     Comple code to push the contents of a local variable onto the statck.
 voidemitMaybeWide(int opcode, int index)
    
final public  voidemitMonitorEnter()
    
final public  voidemitMonitorExit()
    
final public  voidemitMul()
    
final public  voidemitNeg()
     Unary numerical negation (-).
public  voidemitNew(ClassType type)
     Invoke new on a class type.
 voidemitNewArray(int type_code)
    
public  voidemitNewArray(Type element_type, int dims)
     Compile code to allocate a new array.
public  voidemitNewArray(Type element_type)
    
public  voidemitNop()
    
final public  voidemitNot(Type type)
    
public  voidemitPop(int nvalues)
     Compile code to pop values off the stack (and ignore them).
public  voidemitPrimop(int opcode, int arg_count, Type retType)
    
final public  voidemitPushBoolean(boolean b)
    
final public  voidemitPushConstant(int val, Type type)
    
final public  voidemitPushConstant(CpoolEntry cnst)
    
public  voidemitPushDouble(double x)
    
public  voidemitPushFloat(float x)
    
final public  voidemitPushInt(int i)
    
public  voidemitPushLong(long i)
    
public  voidemitPushNull()
    
public  voidemitPushNull(Type type)
    
final public  voidemitPushString(String str)
    
final public  voidemitPushThis()
    
final public  voidemitPutField(Field field)
     Compile code to put a non-static field value. Stack: ..., objectref, value => ...
final public  voidemitPutStatic(Field field)
     Compile code to put a static field value. Stack: ..., value => ...
final public  voidemitRem()
    
public  voidemitRet(Variable var)
     Emit a 'ret' instruction.
final public  voidemitReturn()
     Compile a method return.
final public  voidemitShl()
    
final public  voidemitShr()
    
public  voidemitStore(Variable var)
    
final public  voidemitSub(char sig)
    
final public  voidemitSub(PrimType type)
    
final public  voidemitSub()
    
public  voidemitSwap()
    
public  voidemitTailCall(boolean pop_args, Scope scope)
     Compile a tail-call to position 0 of the current procewure.
Parameters:
  pop_args - if true, copy argument registers (except this) from stack.
Parameters:
  scope - Scope whose start we jump back to.
final public  voidemitThrow()
    
final  voidemitTransfer(Label label, int opcode)
    
public  voidemitTryCatchEnd()
    
public  voidemitTryEnd()
    
public  voidemitTryStart(boolean has_finally, Type result_type)
    
final public  voidemitUshr()
    
final public  voidemitXOr()
    
public  voidendFragment()
    
public  voidendPostcondition()
    
public  voidendPrecondition()
    
public  voidenterScope(Scope scope)
    
public  voidfinalize_labels()
    
public  VariablegetArg(int index)
     Get the index'th parameter.
final public  AttributegetAttributes()
    
public  byte[]getCode()
     Get the code (instruction bytes) of this method. Does not make a copy.
public  intgetCodeLength()
     Set the current lengthof the code (instruction bytes) of this method.
final public  ConstantPoolgetConstants()
    
public  ScopegetCurrentScope()
    
final public  intgetLength()
    
public  intgetMaxLocals()
     Get the maximum number of local variable words in this method.
public  intgetMaxStack()
     Get the maximum number of words on the operand stack in this method.
final public  MethodgetMethod()
    
final public  intgetPC()
    
final public  TryStategetTryStack()
    
public  voidifAssertionsDisabledGoto(Field assertionEnabled, Label l)
    
final public  booleanisInTry()
    
public  voidloadResult()
    
public  Variablelookup(String name)
    
public  ScopemethodScope()
     Return the toplevel scope, corresponding to the current method.
public  ScopepopScope()
    
final public  TypepopType()
    
public  voidpreparePostcondition(Field assertionEnabled, boolean hasPostCond)
    
public  voidprint(ClassTypeWriter dst)
    
public  voidpushRetType()
    
public  ScopepushScope()
    
final public  voidpushType(Type type)
    
final public  voidput1(int i)
     Write an 8-bit byte to the current code-stream.
final public  voidput2(int i)
    
final public  voidput4(int i)
    
final public  voidputIndex2(CpoolEntry cnst)
    
final public  voidputLineNumber(String file, int linenumber)
    
public  booleanreachableHere()
     True if control could reach here.
 voidreorder_fixups()
    
final public  voidreserve(int bytes)
    
public  voidrestoreStackTypeState(Type[] save)
     Restore a type state as saved by saveStackTypeState.
public  Type[]saveStackTypeState(boolean clear)
     Return an object encapsulating the type state of the JVM stack.
final public  voidsetAttributes(Attribute attributes)
    
public  voidsetCode(byte[] code)
     Set the code (instruction bytes) of this method.
Parameters:
  code - the code bytes (which are not copied).Implicitly calls setCodeLength(code.length).
public  voidsetCodeLength(int len)
     Set the length the the code (instruction bytes) of this method.
public  voidsetMaxLocals(int n)
     Set the maximum number of local variable words in this method.
public  voidsetMaxStack(int n)
     Set the maximum number of words on the operand stack in this method.
final public  voidsetReachable(boolean val)
    
final public  voidsetUnreachable()
    
public  voidstartPostcondition()
    
public  voidstartPrecondition()
    
final public  TypetopType()
    
public  voidwrite(DataOutputStream dstr)
    

Field Detail
PC
int PC(Code)



SP
public int SP(Code)



attributes
Attribute attributes(Code)



code
byte[] code(Code)



exception_table
short[] exception_table(Code)



exception_table_length
int exception_table_length(Code)



fragmentStack
CodeFragment fragmentStack(Code)



fragments
CodeFragment fragments(Code)



if_stack
IfState if_stack(Code)
The stack of currently active conditionals.



labels
Label labels(Code)



lines
LineNumbersAttr lines(Code)



locals
public LocalVarsAttr locals(Code)



previousPC
int previousPC(Code)



readPC
int readPC(Code)



stack_types
Type[] stack_types(Code)



try_stack
TryState try_stack(Code)
The stack of currently active try statements.



unreachable_here
boolean unreachable_here(Code)




Constructor Detail
CodeAttr
public CodeAttr(Method meth)(Code)




Method Detail
addHandler
public void addHandler(int start_pc, int end_pc, int handler_pc, int catch_type)(Code)
Add an exception handler.



addHandler
public void addHandler(int start_pc, int end_pc, int handler_pc, ClassType catch_type, ConstantPool constants)(Code)
Add an exception handler.



addLocal
public Variable addLocal(Type type)(Code)
Add a new local variable (in the current scope).
Parameters:
  type - type of the new Variable. the new Variable.



addLocal
public Variable addLocal(Type type, String name)(Code)
Add a new local variable (in the current scope).
Parameters:
  type - type of the new Variable.
Parameters:
  name - name of the new Variable. the new Variable.



addParamLocals
public void addParamLocals()(Code)
Call addLocal for parameters (as implied by method type).



assignConstants
public void assignConstants(ClassType cl)(Code)



beginFragment
public void beginFragment(boolean isHandler)(Code)



checkPostcondition
boolean checkPostcondition()(Code)



disAssemble
public void disAssemble(ClassTypeWriter dst, int offset, int length)(Code)



emitAdd
final public void emitAdd(char sig)(Code)



emitAdd
final public void emitAdd(PrimType type)(Code)



emitAdd
final public void emitAdd()(Code)



emitAnd
final public void emitAnd()(Code)



emitArrayLength
final public void emitArrayLength()(Code)



emitArrayLoad
public void emitArrayLoad(Type element_type)(Code)
Load an element from an array. Must already have pushed the array and the index (in that order): Stack: ..., array, index => ..., value



emitArrayLoad
public void emitArrayLoad()(Code)
Load an element from an array. Must already have pushed the array and the index (in that order): Stack: ..., array, index => ..., value



emitArrayStore
public void emitArrayStore(Type element_type)(Code)
Store into an element of an array. Must already have pushed the array reference, the index, and the new value (in that order). Stack: ..., array, index, value => ...



emitCatchEnd
public void emitCatchEnd()(Code)



emitCatchStart
public void emitCatchStart(Variable var)(Code)



emitCatchStart
public void emitCatchStart(ClassType type)(Code)



emitCheckcast
public void emitCheckcast(Type type)(Code)



emitConvert
final public void emitConvert(Type from, Type to)(Code)



emitDiv
final public void emitDiv()(Code)



emitDup
public void emitDup()(Code)
Emit code to duplicate the top element of the stack.



emitDup
public void emitDup(int size, int offset)(Code)
Compile code to duplicate with offset.
Parameters:
  size - the size of the stack item to duplicate (1 or 2)
Parameters:
  offset - where to insert the result (must be 0, 1, or 2)The new words get inserted at stack[SP-size-offset]



emitDup
public void emitDup(int size)(Code)
Compile code to duplicate the top 1 or 2 words.
Parameters:
  size - number of words to duplicate



emitDup
public void emitDup(Type type)(Code)
Duplicate the top element of the given type.



emitDupX
public void emitDupX()(Code)
Emit code to duplicate the top element of the stack and place the copy before the previous element.



emitElse
final public void emitElse()(Code)
Compile start of else clause.



emitFi
final public void emitFi()(Code)
Compile end of conditional.



emitFinallyEnd
public void emitFinallyEnd()(Code)



emitFinallyStart
public void emitFinallyStart()(Code)



emitGetField
final public void emitGetField(Field field)(Code)
Compile code to get a non-static field value. Stack: ..., objectref => ..., value



emitGetStatic
final public void emitGetStatic(Field field)(Code)
Compile code to get a static field value. Stack: ... => ..., value



emitGoto
final public void emitGoto(Label label, int opcode)(Code)
Compile an unconditional branch (goto) or a jsr.
Parameters:
  label - target of the branch (must be in this method).



emitGoto
final public void emitGoto(Label label)(Code)
Compile an unconditional branch (goto).
Parameters:
  label - target of the branch (must be in this method).



emitGotoIfCompare1
final public void emitGotoIfCompare1(Label label, int opcode)(Code)



emitGotoIfCompare2
final public void emitGotoIfCompare2(Label label, int logop)(Code)



emitGotoIfEq
final public void emitGotoIfEq(Label label, boolean invert)(Code)



emitGotoIfEq
final public void emitGotoIfEq(Label label)(Code)
Compile a conditional transfer if 2 top stack elements are equal.



emitGotoIfGe
final public void emitGotoIfGe(Label label)(Code)



emitGotoIfGt
final public void emitGotoIfGt(Label label)(Code)



emitGotoIfIntEqZero
final public void emitGotoIfIntEqZero(Label label)(Code)



emitGotoIfIntGeZero
final public void emitGotoIfIntGeZero(Label label)(Code)



emitGotoIfIntGtZero
final public void emitGotoIfIntGtZero(Label label)(Code)



emitGotoIfIntLeZero
final public void emitGotoIfIntLeZero(Label label)(Code)



emitGotoIfIntLtZero
final public void emitGotoIfIntLtZero(Label label)(Code)



emitGotoIfIntNeZero
final public void emitGotoIfIntNeZero(Label label)(Code)



emitGotoIfLe
final public void emitGotoIfLe(Label label)(Code)



emitGotoIfLt
final public void emitGotoIfLt(Label label)(Code)



emitGotoIfNE
final public void emitGotoIfNE(Label label)(Code)
Compile conditional transfer if 2 top stack elements are not equal.



emitGotoIfNotNull
final public void emitGotoIfNotNull(Label label)(Code)



emitGotoIfNull
final public void emitGotoIfNull(Label label)(Code)



emitIOr
final public void emitIOr()(Code)



emitIfCompare1
final public void emitIfCompare1(int opcode)(Code)
Compile start of a conditional: if (!(x OPCODE 0)) ... The value of x must already have been pushed.



emitIfEq
final public void emitIfEq()(Code)
Compile start of a conditional: if (x == y) ... The values of x and y must already have been pushed.



emitIfGe
final public void emitIfGe()(Code)
Compile start of a conditional: if (x >= y) ... The values of x and y must already have been pushed.



emitIfGt
final public void emitIfGt()(Code)
Compile start of a conditional: if (x > y) ... The values of x and y must already have been pushed.



emitIfIntCompare
final public void emitIfIntCompare(int opcode)(Code)
Compile start of a conditional: if (!(x OPCODE y)) ... The value of x and y must already have been pushed.



emitIfIntLEqZero
final public void emitIfIntLEqZero()(Code)
Compile start of conditional: if (x <= 0)



emitIfIntLt
final public void emitIfIntLt()(Code)



emitIfIntNotZero
final public void emitIfIntNotZero()(Code)
Compile start of conditional: if (x != 0) ... Also use this if you have pushed a boolean value: if (b) ...



emitIfIntZero
final public void emitIfIntZero()(Code)
Compile start of conditional: if (x == 0) ... Also use this if you have pushed a boolean value: if (!b) ...



emitIfLe
final public void emitIfLe()(Code)
Compile start of a conditional: if (x <= y) ... The values of x and y must already have been pushed.



emitIfLt
final public void emitIfLt()(Code)
Compile start of a conditional: if (x < y) ... The values of x and y must already have been pushed.



emitIfNEq
final public void emitIfNEq()(Code)
Compile start of a conditional: if (x != y) ... The values of x and y must already have been pushed.



emitIfNotNull
final public void emitIfNotNull()(Code)
Compile start of conditional: if (x != null)



emitIfNull
final public void emitIfNull()(Code)
Compile start of conditional: if (x == null)



emitIfRefCompare1
final public void emitIfRefCompare1(int opcode)(Code)
Compile start of a conditional: if (!(x OPCODE null)) ... The value of x must already have been pushed and must be of reference type.



emitIfThen
final public void emitIfThen()(Code)



emitInc
public void emitInc(Variable var, short inc)(Code)



emitInstanceof
public void emitInstanceof(Type type)(Code)



emitInvoke
public void emitInvoke(Method method)(Code)



emitInvokeInterface
public void emitInvokeInterface(Method method)(Code)



emitInvokeMethod
public void emitInvokeMethod(Method method, int opcode)(Code)



emitInvokeSpecial
public void emitInvokeSpecial(Method method)(Code)



emitInvokeStatic
public void emitInvokeStatic(Method method)(Code)
Compile a static method call. The stack contains the the arguments in order.
Parameters:
  method - the static method to invoke



emitInvokeVirtual
public void emitInvokeVirtual(Method method)(Code)
Compile a virtual method call. The stack contains the 'this' object, followed by the arguments in order.
Parameters:
  method - the method to invoke virtually



emitJsr
final public void emitJsr(Label label)(Code)



emitLoad
final public void emitLoad(Variable var)(Code)
Comple code to push the contents of a local variable onto the statck.
Parameters:
  var - The variable whose contents we want to push.



emitMaybeWide
void emitMaybeWide(int opcode, int index)(Code)



emitMonitorEnter
final public void emitMonitorEnter()(Code)



emitMonitorExit
final public void emitMonitorExit()(Code)



emitMul
final public void emitMul()(Code)



emitNeg
final public void emitNeg()(Code)
Unary numerical negation (-).



emitNew
public void emitNew(ClassType type)(Code)
Invoke new on a class type. Does not call the constructor!
Parameters:
  type - the desired new object type



emitNewArray
void emitNewArray(int type_code)(Code)



emitNewArray
public void emitNewArray(Type element_type, int dims)(Code)
Compile code to allocate a new array. The size should have been already pushed on the stack.
Parameters:
  type - type of the array elements



emitNewArray
public void emitNewArray(Type element_type)(Code)



emitNop
public void emitNop()(Code)



emitNot
final public void emitNot(Type type)(Code)



emitPop
public void emitPop(int nvalues)(Code)
Compile code to pop values off the stack (and ignore them).
Parameters:
  nvalues - the number of values (not words) to pop



emitPrimop
public void emitPrimop(int opcode, int arg_count, Type retType)(Code)



emitPushBoolean
final public void emitPushBoolean(boolean b)(Code)



emitPushConstant
final public void emitPushConstant(int val, Type type)(Code)



emitPushConstant
final public void emitPushConstant(CpoolEntry cnst)(Code)



emitPushDouble
public void emitPushDouble(double x)(Code)



emitPushFloat
public void emitPushFloat(float x)(Code)



emitPushInt
final public void emitPushInt(int i)(Code)



emitPushLong
public void emitPushLong(long i)(Code)



emitPushNull
public void emitPushNull()(Code)



emitPushNull
public void emitPushNull(Type type)(Code)

Parameters:
  type - the type null is considered to have.



emitPushString
final public void emitPushString(String str)(Code)



emitPushThis
final public void emitPushThis()(Code)



emitPutField
final public void emitPutField(Field field)(Code)
Compile code to put a non-static field value. Stack: ..., objectref, value => ...



emitPutStatic
final public void emitPutStatic(Field field)(Code)
Compile code to put a static field value. Stack: ..., value => ...



emitRem
final public void emitRem()(Code)



emitRet
public void emitRet(Variable var)(Code)
Emit a 'ret' instruction.
Parameters:
  var - the variable containing the return address



emitReturn
final public void emitReturn()(Code)
Compile a method return.



emitShl
final public void emitShl()(Code)



emitShr
final public void emitShr()(Code)



emitStore
public void emitStore(Variable var)(Code)



emitSub
final public void emitSub(char sig)(Code)



emitSub
final public void emitSub(PrimType type)(Code)



emitSub
final public void emitSub()(Code)



emitSwap
public void emitSwap()(Code)



emitTailCall
public void emitTailCall(boolean pop_args, Scope scope)(Code)
Compile a tail-call to position 0 of the current procewure.
Parameters:
  pop_args - if true, copy argument registers (except this) from stack.
Parameters:
  scope - Scope whose start we jump back to.



emitThrow
final public void emitThrow()(Code)



emitTransfer
final void emitTransfer(Label label, int opcode)(Code)



emitTryCatchEnd
public void emitTryCatchEnd()(Code)



emitTryEnd
public void emitTryEnd()(Code)



emitTryStart
public void emitTryStart(boolean has_finally, Type result_type)(Code)



emitUshr
final public void emitUshr()(Code)



emitXOr
final public void emitXOr()(Code)



endFragment
public void endFragment()(Code)



endPostcondition
public void endPostcondition()(Code)



endPrecondition
public void endPrecondition()(Code)



enterScope
public void enterScope(Scope scope)(Code)



finalize_labels
public void finalize_labels()(Code)



getArg
public Variable getArg(int index)(Code)
Get the index'th parameter.



getAttributes
final public Attribute getAttributes()(Code)



getCode
public byte[] getCode()(Code)
Get the code (instruction bytes) of this method. Does not make a copy.



getCodeLength
public int getCodeLength()(Code)
Set the current lengthof the code (instruction bytes) of this method.



getConstants
final public ConstantPool getConstants()(Code)



getCurrentScope
public Scope getCurrentScope()(Code)



getLength
final public int getLength()(Code)



getMaxLocals
public int getMaxLocals()(Code)
Get the maximum number of local variable words in this method.



getMaxStack
public int getMaxStack()(Code)
Get the maximum number of words on the operand stack in this method.



getMethod
final public Method getMethod()(Code)



getPC
final public int getPC()(Code)



getTryStack
final public TryState getTryStack()(Code)



ifAssertionsDisabledGoto
public void ifAssertionsDisabledGoto(Field assertionEnabled, Label l)(Code)



isInTry
final public boolean isInTry()(Code)



loadResult
public void loadResult()(Code)



lookup
public Variable lookup(String name)(Code)
Search by name for a Variable
Parameters:
  name - name to search for the Variable, or null if not found (in any scope of this Method).



methodScope
public Scope methodScope()(Code)
Return the toplevel scope, corresponding to the current method.



popScope
public Scope popScope()(Code)



popType
final public Type popType()(Code)



preparePostcondition
public void preparePostcondition(Field assertionEnabled, boolean hasPostCond)(Code)
Postcondition



print
public void print(ClassTypeWriter dst)(Code)



pushRetType
public void pushRetType()(Code)



pushScope
public Scope pushScope()(Code)



pushType
final public void pushType(Type type)(Code)



put1
final public void put1(int i)(Code)
Write an 8-bit byte to the current code-stream.
Parameters:
  i - the byte to write



put2
final public void put2(int i)(Code)
Write a 16-bit short to the current code-stream
Parameters:
  i - the value to write



put4
final public void put4(int i)(Code)
Write a 32-bit int to the current code-stream
Parameters:
  i - the value to write



putIndex2
final public void putIndex2(CpoolEntry cnst)(Code)



putLineNumber
final public void putLineNumber(String file, int linenumber)(Code)



reachableHere
public boolean reachableHere()(Code)
True if control could reach here.



reorder_fixups
void reorder_fixups()(Code)



reserve
final public void reserve(int bytes)(Code)



restoreStackTypeState
public void restoreStackTypeState(Type[] save)(Code)
Restore a type state as saved by saveStackTypeState.



saveStackTypeState
public Type[] saveStackTypeState(boolean clear)(Code)
Return an object encapsulating the type state of the JVM stack.



setAttributes
final public void setAttributes(Attribute attributes)(Code)



setCode
public void setCode(byte[] code)(Code)
Set the code (instruction bytes) of this method.
Parameters:
  code - the code bytes (which are not copied).Implicitly calls setCodeLength(code.length).



setCodeLength
public void setCodeLength(int len)(Code)
Set the length the the code (instruction bytes) of this method. That is the number of current used bytes in getCode(). (Any remaing bytes provide for future growth.)



setMaxLocals
public void setMaxLocals(int n)(Code)
Set the maximum number of local variable words in this method.



setMaxStack
public void setMaxStack(int n)(Code)
Set the maximum number of words on the operand stack in this method.



setReachable
final public void setReachable(boolean val)(Code)



setUnreachable
final public void setUnreachable()(Code)



startPostcondition
public void startPostcondition()(Code)



startPrecondition
public void startPrecondition()(Code)



topType
final public Type topType()(Code)



write
public void write(DataOutputStream dstr) throws java.io.IOException(Code)



Fields inherited from gnu.bytecode.Attribute
AttrContainer container(Code)(Java Doc)
String name(Code)(Java Doc)
int name_index(Code)(Java Doc)
Attribute next(Code)(Java Doc)

Methods inherited from gnu.bytecode.Attribute
public void addToFrontOf(AttrContainer container)(Code)(Java Doc)
public void assignConstants(ClassType cl)(Code)(Java Doc)
public static void assignConstants(AttrContainer container, ClassType cl)(Code)(Java Doc)
public static int count(AttrContainer container)(Code)(Java Doc)
public static Attribute get(AttrContainer container, String name)(Code)(Java Doc)
final public AttrContainer getContainer()(Code)(Java Doc)
abstract public int getLength()(Code)(Java Doc)
public static int getLengthAll(AttrContainer container)(Code)(Java Doc)
final public String getName()(Code)(Java Doc)
final public int getNameIndex()(Code)(Java Doc)
final public Attribute getNext()(Code)(Java Doc)
final public boolean isSkipped()(Code)(Java Doc)
public void print(ClassTypeWriter dst)(Code)(Java Doc)
final public void setContainer(AttrContainer container)(Code)(Java Doc)
final public void setName(String name)(Code)(Java Doc)
final public void setNameIndex(int index)(Code)(Java Doc)
final public void setNext(Attribute next)(Code)(Java Doc)
final public void setSkipped(boolean skip)(Code)(Java Doc)
final public void setSkipped()(Code)(Java Doc)
abstract public void write(DataOutputStream dstr) throws java.io.IOException(Code)(Java Doc)
public static void writeAll(AttrContainer container, DataOutputStream dstr) throws java.io.IOException(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.