Index pamiec Cornwell Patricia Post Mortem J K Rowling Prisoner of Azkaban xhtml1 s.elt abc.com.pl 8 Chmielewska Joanna (Nie)boszczyk maz (5) Szmidt Krzysztof J. Psychologia podręczna CzęÂść V Elementarz twórczego myslenia Odyseja kosmiczna 2010 abc.com.pl 7 l rampa ty zawsze |
[ Pobierz całość w formacie PDF ] .)Smonitorexit., handle =>.Exit monitored region of code.handlemust be a reference to an object.The lock on handleis released.If this is the last lock that this thread has onthat handle (one thread isallowed to have multiple locks on a single handle),other threads that are waiting for handleare allowed to proceed.(A nullin either bytecode throws NullPointerException.)Debuggingbreakpoint -no change-Call breakpoint handler.The breakpoint bytecode is used to overwritea bytecode to force control temporarily back to the debugger priorto the effect of the overwritten bytecode.The original bytecode'soperands (if any) are not overwritten, and the original bytecodeis restored when the breakpoint bytecode is removed.The _quickBytecodesThe following discussion, straight out of the Java virtual machinedocumentation, shows you an example of the cleverness mentionedearlier that's needed to make a bytecode interpreter fast:The following set of pseudo-bytecodes, suffixed by _quick,are all variants of standard Java bytecodes.They are used bythe runtime to improve the execution speed of the bytecode interpreter.They aren't officially part of the virtual machine specificationand are invisible outside a Java virtual machine implementation.However, inside that implementation they have proven to be aneffective op-timization.First, you should know that the javacJava compiler still generates only non-_quickbytecodes.Second, all bytecodes that have a _quickvariant reference the constant pool.When_quick optimization is turned on, each non-_quickbytecode (that has a _quickvariant) resolves the specified item in the constant pool, signalsan error if the item in the constant pool could not be resolvedfor some reason, turns itself into the _quickvariant of itself, and then performs its intended operation.This is identical to the actions of the non-_quickbytecode, except for the step of overwriting itself with its _quickvariant.The _quick variantof a bytecode assumes that the item in the constant pool has alreadybeen resolved, and that this resolution did not produce any errors.It simply performs the intended operation on the resolved item.Thus, as your bytecodes are being interpreted, they are automaticallygetting faster and faster! Here are all the _quickvariants in the current Java runtime:ldc1_quickldc2_quickldc2w_quickanewarray_quickmultinewarray_quickputfield_quickputfield2_quickgetfield_quickgetfield2_quickputstatic_quickputstatic2_quickgetstatic_quickgetstatic2_quickinvokevirtual_quickinvokevirtualobject_quickinvokenonvirtual_quickinvokestatic_quickinvokeinterface_quicknew_quickcheckcast_quickinstanceof_quickIf you'd like to go back in this appendix and look at what eachof these does, you can find the name of the original bytecodeon which a _quick variantis based simply by removing the _quickfrom its name.The bytecodes putstatic,getstatic, putfield,and getfield have two _quickvariants each, one for each stack picture in their original descriptions.invokevirtual has two variants:one for objects and one for arrays (to do fast lookups in java.lang.Object).NoteOne last note on the _quick optimization, regarding the unusual handling of the constant pool (for detail fanatics only): When a class is read in, an array constant_pool[] of size nconstants is created and assigned to a field in the class.constant_pool[0] is set to point to a dynamically allocated array that indicates which fields in the constant_pool have already been resolved.Constant_pool[1] through constant_pool[nconstants - 1] are set to point at the "type" field that corresponds to this constant item.When a bytecode is executed that references the constant pool, an index is generated, and constant_pool[0] is checked to see whether the index has already been resolved.If so, the value of constant_pool[index] is returned.If not, the value of constant_pool[index] is resolved to be the actual pointer or data, and overwrites whatever value was already in constant_pool[index].Use of this site is subject to certainCopyright (c) 1996-1998EarthWeb, Inc.All rights reserved.Reproduction in whole or in part in any form or medium without express written permission of EarthWeb is prohibited [ Pobierz całość w formacie PDF ] |
||||
Wszelkie Prawa Zastrzeżone! Kawa była słaba i bez smaku. Nie miała treści, a jedynie formę. Design by SZABLONY.maniak.pl. | |||||