![]() |
![]() |
|
![]() |
![]() |
Encyclopedia :
M :
MI :
MID :
MIDlet Preverify |
|
|
MIDlet PreverifyA MIDlet is a Java program for embedded devices, more specifically the J2ME virtual machine. Generally, these are games and applications that run on a cell phone.
IntroductionSince class verification in J2SE takes up 50k and the lack of space in MIDP devices, the class verification has been broken up to a part that is completed by the developer and apart completed by the Mobile JVM itself. The developer directed class verfication stage is called MIDlet preverifiication or preverfification. Preverification occurs after the class is compiled. What Tasks Preverification CompletesGenerally, the preverification task annotates the class files with notes that the small incomplete class verifier in the Mobile JVM reads and uses to do a fast class verification to enable the Mobile JVM to then run the resulting bytecodes. The resulting bytecodes are valid bytecodes because the annotations are using attributes of the bytecode to make the notes for the Mobile JVM to read in doing its final incomplete class verification(). JVM Class File VerificationAccording to the, The Java Virtual Machine Specification() ISBN 0201432943, class file verififcation is completed in 4 passes beofre full startup of the JVM occurs in runing bytecode of an application. Pass 1Pass 2Pass 3During linking the verfier checks the code array of the code attribute by performing a data flow analysis to ensure these items are true: Pass 4This is the pass where class loading occurs to finalize the class verification process. Preverification StepsConclusionPreverification preverifies the compiled classes by inserting annotations in the StackMap portion of the Code attribute describing variable types used and operand stack items. This and inlining all subroutines and removing jumps reduces the first 3 passes of the J2SE verification process to soemthing more manageable with the mobile device memory sizes in completing the last 4th pass on the mobile device within the mobile jvm. References
|
|
|
This article is from Wikipedia. All text is available under the terms of the GNU Free Documentation License. |
|
| © 2008 Chamas Enterprises Inc. |