Main Page | Namespace List | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

gc_stub.c

Go to the documentation of this file.
00001 /*!
00002  * @file gc_stub.c
00003  *
00004  * @brief JVM @b stub garbage collector,
00005  * performs role of @c @b System.gc() .
00006  *
00007  * The logic of these structures and functions is empty, pending
00008  * a memory allocation and garbage collection design for the project.
00009  *
00010  * This is the first of hopefully a number of garbage collection
00011  * schemes.  Others should be named @b gc_somename.c .
00012  *
00013  * The common header file @link jvm/src/gc.h gc.h@endlink defines
00014  * the prototypes for all garbage collection implementations by way
00015  * of the @link #CONFIG_GC_TYPE_STUB CONFIG_GC_TYPE_xxx@endlink
00016  * symbol definitions.
00017  *
00018  *
00019  * @section Control
00020  *
00021  * \$URL: https://svn.apache.org/path/name/gc_stub.c $ \$Id: gc_stub.c 0 09/28/2005 dlydick $
00022  *
00023  * Copyright 2005 The Apache Software Foundation
00024  * or its licensors, as applicable.
00025  *
00026  * Licensed under the Apache License, Version 2.0 ("the License");
00027  * you may not use this file except in compliance with the License.
00028  * You may obtain a copy of the License at
00029  *
00030  *     http://www.apache.org/licenses/LICENSE-2.0
00031  *
00032  * Unless required by applicable law or agreed to in writing,
00033  * software distributed under the License is distributed on an
00034  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
00035  * either express or implied.
00036  *
00037  * See the License for the specific language governing permissions
00038  * and limitations under the License.
00039  *
00040  * @version \$LastChangedRevision: 0 $
00041  *
00042  * @date \$LastChangedDate: 09/28/2005 $
00043  *
00044  * @author \$LastChangedBy: dlydick $
00045  *         Original code contributed by Daniel Lydick on 09/28/2005.
00046  *
00047  * @section Reference
00048  *
00049  */
00050 
00051 #include "arch.h"
00052 ARCH_COPYRIGHT_APACHE(gc_stub, c, "$URL: https://svn.apache.org/path/name/gc_stub.c $ $Id: gc_stub.c 0 09/28/2005 dlydick $");
00053 
00054 #if defined(CONFIG_GC_TYPE_STUB) || defined(CONFIG_COMPILE_ALL_OPTIONS)
00055 
00056 
00057 #include "jvmcfg.h"
00058 #include "classfile.h"
00059 #include "jvm.h"
00060 
00061 /*!
00062  * @name Garbage collection accounting areas
00063  *
00064  * @brief Type definition for references to garbage collection
00065  * in several major JVM structure areas, namely classes,
00066  * objects, and stack frames.
00067  *
00068  */
00069 
00070 /*@{ */ /* Begin grouped definitions */
00071 
00072 /*!
00073  * @struct gc_class_stub
00074  *
00075  * @brief Type definition for references to garbage collection
00076  * in Java classes.
00077  */
00078 
00079 typedef struct
00080 {
00081     rint dummy; /*!< place holder for implementation details. */
00082 
00083 } gc_class_stub;
00084 
00085 
00086 /*!
00087  * @struct gc_object_stub
00088  *
00089  * @brief Type definition for references to garbage collection
00090  * in Java objects.
00091  */
00092 
00093 typedef struct
00094 {
00095     rint dummy; /*!< place holder for implementation details. */
00096 
00097 } gc_object_stub;
00098 
00099 
00100 /*!
00101  * @struct gc_stack_stub
00102  *
00103  * @brief Type definition for references to garbage collection
00104  * in Java stacks.
00105  */
00106 
00107 typedef struct
00108 {
00109     rint dummy; /*!< place holder for implementation details. */
00110 
00111 } gc_stack_stub;
00112 
00113 /*@} */ /* End of grouped definitions */
00114 
00115 
00116 /*!
00117  * @brief Initialize garbage collection
00118  *
00119  *
00120  * @b Parameters: @link #rvoid rvoid@endlink
00121  *
00122  *
00123  *       @returns @link #rvoid rvoid@endlink
00124  *
00125  */
00126 rvoid gc_init_stub()
00127 {
00128     /* Nothing to do in this model */
00129 
00130     return;
00131 
00132 } /* END of gc_init_stub() */
00133 
00134 
00135 /*!
00136  * @brief Review collection status of all objects and clean them up.
00137  *
00138  * Scan through object table for objects that need
00139  * be deallocated and free up those resources for
00140  * reuse by the JVM.
00141  *
00142  *
00143  * @param rmref  @link #rtrue rtrue@endlink when class and object
00144  *               references are to be removed during processing.
00145  *               This is @link #rfalse rfalse@endlink during
00146  *               JVM shutdown.
00147  *
00148  *
00149  * @returns @link #rvoid rvoid@endlink
00150  *
00151  */
00152 
00153 rvoid gc_run_stub(rboolean rmref)
00154 {
00155     jvm_class_index clsidx;
00156 
00157     for (clsidx = jvm_class_index_null;
00158          clsidx < JVMCFG_MAX_CLASSES;
00159          clsidx++)
00160     {
00161         rushort status = CLASS(clsidx).status;
00162 
00163         /* Skip free object table slots */
00164         if (!(CLASS_STATUS_INUSE & status))
00165         {
00166             continue;
00167         }
00168 
00169         /* Skip null slots (the JVMCFG_NULL_CLASS and any slot that
00170            is currently being intialized. */
00171         if (CLASS_STATUS_NULL & status)
00172         {
00173             continue;
00174         }
00175 
00176         /* Look only at slots marked as ready for garbage collection */
00177         if (CLASS_STATUS_GCREQ & status)
00178         {
00179             /*! @todo  Write the object GC algorithm */
00180             continue;
00181         }
00182 
00183     } /* for clsidx */
00184 
00185     jvm_object_hash objhash;
00186 
00187     for (objhash = jvm_object_hash_null;
00188          objhash < JVMCFG_MAX_OBJECTS;
00189          objhash++)
00190     {
00191         rushort status = OBJECT(objhash).status;
00192 
00193         /* Skip free object table slots */
00194         if (!(OBJECT_STATUS_INUSE & status))
00195         {
00196             continue;
00197         }
00198 
00199         /* Skip null slots (the JVMCFG_NULL_OBJECT and any slot that
00200            is currently being intialized). */
00201         if (OBJECT_STATUS_NULL & status)
00202         {
00203             continue;
00204         }
00205 
00206         /* Look only at slots marked as ready for garbage collection */
00207         if (OBJECT_STATUS_GCREQ & status)
00208         {
00209             /*! @todo  Write the object GC algorithm */
00210             continue;
00211         }
00212 
00213     } /* for objhash */
00214 
00215     /* Done with this pass */
00216     return;
00217 
00218 } /* END of gc_run_stub() */
00219 
00220 
00221 /*!
00222  * @brief Start up garbage collection for a class.
00223  *
00224  * Initialize garbage collection for a new class static
00225  * instance, as set up in class_static_new().  The reverse of
00226  * gc_class_delete_stub().
00227  *
00228  *
00229  * @param  clsidxNEW   Class table index of new class static instance.
00230  *
00231  *
00232  * @returns @link #rtrue rtrue@endlink if garbage
00233  *          collection was initialized for this class static instance,
00234  *          otherwise @link #rfalse rfalse@endlink.
00235  *
00236  *
00237  * @throws JVMCLASS_JAVA_LANG_INTERNALERROR 
00238            @link #JVMCLASS_JAVA_LANG_INTERNALERROR
00239            if null class index or if a garbage collection
00240            accounting area has already been
00241            allocated for this class@endlink.
00242  *
00243  *
00244  */
00245 rboolean gc_class_new_stub(jvm_class_index clsidxNEW)
00246 {
00247     return(rfalse);
00248 
00249 } /* END of gc_class_new_stub() */
00250 
00251 
00252 /*!
00253  * @brief Shut down and restart garbage collection for a class.
00254  *
00255  * Reinitialize garbage collection for a reloaded class static instance,
00256  * as set up in class_reload().
00257  *
00258  *
00259  * @param  clsidxOLD   Class table index of old class static instance.
00260  *
00261  * @param  clsidxNEW   Class table index of reloaded class static
00262  *                     instance.
00263  *
00264  *
00265  * @returns @link #rtrue rtrue@endlink if garbage collection was
00266  *          reinitialized for this reloaded class static instance,
00267  *          otherwise @link #rfalse rfalse@endlink.
00268  *
00269  *
00270  * @throws JVMCLASS_JAVA_LANG_INTERNALERROR 
00271            @link #JVMCLASS_JAVA_LANG_INTERNALERROR
00272            if null target class index@endlink.
00273  *
00274  */
00275 rboolean gc_class_reload_stub(jvm_class_index clsidxOLD,
00276                               jvm_class_index clsidxNEW)
00277 {
00278     return(rfalse);
00279 
00280 } /* END of gc_class_reload_stub() */
00281 
00282 
00283 /*!
00284  * @brief Add a class static reference to a class.
00285  *
00286  * Mark class as having another class static instance reference to it,
00287  * namely a @b lower_dim_array or @b initiating_ClassLoader or
00288  * @b defining_ClasslLoader The reverse of
00289  * gc_class_rmref_from_class_stub().
00290  *
00291  *
00292  * @param  clsidxFROM Class table index of source class static instance.
00293  *                    If @link #jvm_class_index_null
00294                       jvm_class_index_null@endlink, this is the class
00295  *                    table entry itself.
00296  *
00297  * @param  clsidxTO   Class table index of target class static instance.
00298  *
00299  *
00300  * @returns @link #rtrue rtrue@endlink if class static instance was
00301  *          marked, otherwise @link #rfalse rfalse@endlink.
00302  *
00303  *
00304  * @throws JVMCLASS_JAVA_LANG_INTERNALERROR 
00305            @link #JVMCLASS_JAVA_LANG_INTERNALERROR
00306            if null target class index@endlink.
00307  *
00308  */
00309 rboolean gc_class_mkref_from_class_stub(jvm_class_index clsidxFROM,
00310                                         jvm_class_index clsidxTO)
00311 {
00312     return(rfalse);
00313 
00314 } /* END of gc_class_mkref_from_class_stub() */
00315 
00316 
00317 /*!
00318  * @brief Add an object instance reference to a class.
00319  *
00320  * Mark class as having another class object instance reference to it,
00321  * namely where OBJECT_STATUS_CLASS is set for that object.  (Usually
00322  * marked only one time over the life of the class.)
00323  * The reverse of gc_class_rmref_from_object_stub().
00324  *
00325  *
00326  * @param  objhashFROM Object hash of source object instance.
00327  *
00328  * @param  clsidxTO    Class table index of target class static instance
00329  *
00330  *
00331  * @returns @link #rtrue rtrue@endlink if class static instance was
00332  *          marked, otherwise @link #rfalse rfalse@endlink.
00333  *
00334  *
00335  * @throws JVMCLASS_JAVA_LANG_INTERNALERROR 
00336            @link #JVMCLASS_JAVA_LANG_INTERNALERROR
00337            if null target class index@endlink.
00338  *
00339  */
00340 rboolean gc_class_mkref_from_object_stub(jvm_object_hash objhashFROM,
00341                                          jvm_class_index  clsidxTO)
00342 {
00343     return(rfalse);
00344 
00345 } /* END of gc_class_mkref_from_object_stub() */
00346 
00347 
00348 /*!
00349  * @brief Remove a class static reference from a class.
00350  *
00351  * Unmark class as having a class static instance reference to it.
00352  * The reverse of gc_class_mkref_from_class_stub().
00353  *
00354  *
00355  * @param  clsidxFROM Class table index of source class static instance.
00356  *                    If @link #jvm_class_index_null
00357                       jvm_class_index_null@endlink, this is the class
00358  *                    table entry itself.
00359  *
00360  * @param  clsidxTO   Class table index of target class static instance.
00361  *
00362  *
00363  * @returns @link #rtrue rtrue@endlink if class static instance was
00364  *          unmarked, otherwise @link #rfalse rfalse@endlink.
00365  *
00366  *
00367  * @throws JVMCLASS_JAVA_LANG_INTERNALERROR 
00368            @link #JVMCLASS_JAVA_LANG_INTERNALERROR
00369            if null target class index@endlink.
00370  *
00371  */
00372 rboolean gc_class_rmref_from_class_stub(jvm_class_index clsidxFROM,
00373                                         jvm_class_index clsidxTO)
00374 {
00375     return(rfalse);
00376 
00377 } /* END of gc_class_rmref_from_class_stub() */
00378 
00379 
00380 /*!
00381  * @brief Remove an object instance reference from a class.
00382  *
00383  * Unmark class as having a class object reference to it, namely
00384  * where OBJECT_STATUS_CLASS is set for that object.  (Usually marked
00385  * only one time over the life of the class, so this will effectively
00386  * mark the class itself as being ready for garbage collection.)
00387  * The reverse of gc_class_mkref_stub().
00388  *
00389  *
00390  * @param  objhashFROM Object hash of source object instance.
00391  *
00392  * @param  clsidxTO    Class table index of target class static instance
00393  *
00394  *
00395  * @returns @link #rtrue rtrue@endlink if class static instance was
00396  *          unmarked, otherwise @link #rfalse rfalse@endlink.
00397  *
00398  *
00399  * @throws JVMCLASS_JAVA_LANG_INTERNALERROR 
00400            @link #JVMCLASS_JAVA_LANG_INTERNALERROR
00401            if null target class index@endlink.
00402  *
00403  */
00404 rboolean gc_class_rmref_from_object_stub(jvm_object_hash objhashFROM,
00405                                          jvm_class_index clsidxTO)
00406 {
00407     return(rfalse);
00408 
00409 } /* END of gc_class_rmref_from_object_stub() */
00410 
00411 
00412 /*!
00413  * @brief Add a class static field reference to a class.
00414  *
00415  * Mark class static field as being a reference type (typically
00416  * after loading the class).  The reverse of
00417  * gc_class_field_rmref_stub().
00418  *
00419  *
00420  * @param  clsidxTO   Class table index of target class static instance.
00421  *
00422  * @param  csflidxTO  Class static field lookup index to field in
00423  *                    target class static instance.
00424  *
00425  *
00426  * @returns @link #rtrue rtrue@endlink if class static field was marked,
00427  *          otherwise @link #rfalse rfalse@endlink.
00428  *
00429  *
00430  * @throws JVMCLASS_JAVA_LANG_INTERNALERROR 
00431            @link #JVMCLASS_JAVA_LANG_INTERNALERROR
00432            if null target class index@endlink.
00433  *
00434  */
00435 rboolean gc_class_field_mkref_stub(jvm_class_index        clsidxTO,
00436                                    jvm_field_lookup_index csflidxTO)
00437 {
00438     return(rfalse);
00439 
00440 } /* END of gc_class_field_mkref_stub() */
00441 
00442 
00443 /*!
00444  * @brief Remove a class static field reference from a class.
00445  *
00446  * Mark class static field as @e not being a reference type (typically
00447  * before unloading the class.  The reverse of
00448  * gc_class_field_mkref_stub().
00449  *
00450  *
00451  * @param  clsidxTO   Class table index of target class static instance.
00452  *
00453  * @param  csflidxTO  Class static field lookup index to field in
00454  *                    target class.
00455  *
00456  *
00457  * @returns @link #rtrue rtrue@endlink if class static field was marked,
00458  *          otherwise @link #rfalse rfalse@endlink.
00459  *
00460  *
00461  * @throws JVMCLASS_JAVA_LANG_INTERNALERROR 
00462            @link #JVMCLASS_JAVA_LANG_INTERNALERROR
00463            if null class index@endlink.
00464  *
00465  */
00466 rboolean gc_class_field_rmref_stub(jvm_class_index clsidxTO,
00467                                    jvm_field_lookup_index csflidxTO)
00468 {
00469     return(rfalse);
00470 
00471 } /* END of gc_class_field_rmref_stub() */
00472 
00473 
00474 /*!
00475  * @brief Garbage collect a class static instance.
00476  *
00477  * Finalize garbage collection for a class static instance that will
00478  * no longer be used, as set up in class_static_delete().  If there
00479  * are any outstanding references to this class, those must first
00480  * be removed, at which time gc_run_stub() will perform the
00481  * finalization instead.  The reverse of gc_class_new_stub().
00482  *
00483  * @note Since this function is the reverse of gc_class_new_stub(),
00484  *       the @link #rclass.pgarbage rclass.pgarbage@endlink pointer must
00485  *       be freed by @link #HEAP_DATA_FREE() HEAP_DATA_FREE@endlink.
00486  *
00487  *
00488  * @param  clsidxOLD     Class table index of defunct class static
00489  *                       instance.
00490  *
00491  * @param  delete_class  If @link #rtrue rtrue@endlink, attempt
00492  *                       class_static_delete() when finished with
00493  *                       garbage collection.
00494  *
00495  *
00496  * @returns @link #rtrue rtrue@endlink if garbage collection was
00497  *          finalized for this class static instance, otherwise
00498  *          @link #rfalse rfalse@endlink.
00499  *
00500  *
00501  * @throws JVMCLASS_JAVA_LANG_INTERNALERROR 
00502            @link #JVMCLASS_JAVA_LANG_INTERNALERROR
00503            if null source source class index@endlink.
00504  *
00505  */
00506 rboolean gc_class_delete_stub(jvm_class_index clsidxOLD,
00507                               rboolean        delete_class)
00508 {
00509     return(rfalse);
00510 
00511 } /* END of gc_class_delete_stub() */
00512 
00513 
00514 /*!
00515  * @brief Start up garbage collection for an object.
00516  *
00517  * Initialize garbage collection for a new object instance, as
00518  * set up in object_new().  The reverse of gc_object_delete_stub().
00519  *
00520  *
00521  * @param  objhashNEW  Object table hash of new object instance.
00522  *
00523  *
00524  * @returns @link #rtrue rtrue@endlink if garbage collection was
00525  *          initialized for this object instance, otherwise
00526  *          @link #rfalse rfalse@endlink.
00527  *
00528  *
00529  * @throws JVMCLASS_JAVA_LANG_INTERNALERROR 
00530            @link #JVMCLASS_JAVA_LANG_INTERNALERROR
00531            if null object hash@endlink.
00532  *
00533  */
00534 rboolean gc_object_new_stub(jvm_object_hash objhashNEW)
00535 {
00536     return(rfalse);
00537 
00538 } /* END of gc_object_new_stub() */
00539 
00540 
00541 /*!
00542  * @brief Add a class static reference to an object.
00543  *
00544  * Mark object as having another class static instance reference to it.
00545  * The reverse of gc_object_rmref_from_class_stub().
00546  *
00547  *
00548  * @param  clsidxFROM Class table index of source class static instance.
00549  *
00550  * @param  objhashTO  Object table hash of target object instance
00551  *
00552  *
00553  * @returns @link #rtrue rtrue@endlink if object instance was marked,
00554  *          otherwise @link #rfalse rfalse@endlink.
00555  *
00556  *
00557  * @throws JVMCLASS_JAVA_LANG_INTERNALERROR 
00558            @link #JVMCLASS_JAVA_LANG_INTERNALERROR
00559            if null target object hash@endlink.
00560  *
00561  */
00562 rboolean gc_object_mkref_from_class_stub(jvm_class_index clsidxFROM,
00563                                          jvm_object_hash objhashTO)
00564 {
00565     return(rfalse);
00566 
00567 } /* END of gc_object_mkref_from_class_stub() */
00568 
00569 
00570 /*!
00571  * @brief Add an object instance reference to an object.
00572  *
00573  * Mark object as having another object instance reference to it.
00574  * The reverse of gc_object_rmref_from_object_stub().
00575  *
00576  *
00577  * @param  objhashFROM  Object table hash of source object instance.
00578  *                      If @link #jvm_object_hash_null
00579                         jvm_object_hash_null@endlink, this is the object
00580  *                      table entry itself.
00581  *
00582  * @param  objhashTO    Object table hash of target object instance
00583  *
00584  *
00585  * @returns @link #rtrue rtrue@endlink if object instance was marked,
00586  *          otherwise @link #rfalse rfalse@endlink.
00587  *
00588  *
00589  * @throws JVMCLASS_JAVA_LANG_INTERNALERROR 
00590            @link #JVMCLASS_JAVA_LANG_INTERNALERROR
00591            if null target object hash@endlink.
00592  *
00593  */
00594 rboolean gc_object_mkref_from_object_stub(jvm_object_hash objhashFROM,
00595                                           jvm_object_hash objhashTO)
00596 {
00597     return(rfalse);
00598 
00599 } /* END of gc_object_mkref_from_object_stub() */
00600 
00601 
00602 /*!
00603  * @brief Remove a class static reference from an object.
00604  *
00605  * Unmark object as having a class static instance reference to it.
00606  * The reverse of gc_object_mkref_from_class_stub().
00607  *
00608  *
00609  * @param  clsidxFROM Class table index of source class static instance.
00610  *
00611  * @param  objhashTO  Object table hash of target object instance
00612  *
00613  *
00614  * @returns @link #rtrue rtrue@endlink if class static instance was
00615  *          unmarked, otherwise @link #rfalse rfalse@endlink.
00616  *
00617  *
00618  * @throws JVMCLASS_JAVA_LANG_INTERNALERROR 
00619            @link #JVMCLASS_JAVA_LANG_INTERNALERROR
00620            if null target object hash@endlink.
00621  *
00622  */
00623 rboolean gc_object_rmref_from_class_stub(jvm_class_index clsidxFROM,
00624                                          jvm_object_hash objhashTO)
00625 {
00626     return(rfalse);
00627 
00628 } /* END of gc_object_rmref_from_class_stub() */
00629 
00630 
00631 /*!
00632  * @brief Remove an object instance reference from an object.
00633  *
00634  * Unmark object as having an object instance reference to it.
00635  * The reverse of gc_object_mkref_from_object_stub().
00636  *
00637  *
00638  * @param  objhashFROM  Object table hash of source object instance.
00639  *                      If @link #jvm_object_hash_null
00640                         jvm_object_hash_null@endlink, this is the object
00641  *                      table entry itself.
00642  *
00643  * @param  objhashTO    Object table hash of target object instance
00644  *
00645  *
00646  * @returns @link #rtrue rtrue@endlink if object instance was
00647  *          unmarked, otherwise @link #rfalse rfalse@endlink.
00648  *
00649  *
00650  * @throws JVMCLASS_JAVA_LANG_INTERNALERROR 
00651            @link #JVMCLASS_JAVA_LANG_INTERNALERROR
00652            if null target object hash@endlink.
00653  *
00654  */
00655 rboolean gc_object_rmref_from_object_stub(jvm_object_hash objhashFROM,
00656                                           jvm_object_hash objhashTO)
00657 {
00658     return(rfalse);
00659 
00660 } /* END of gc_object_rmref_from_object_stub() */
00661 
00662 
00663 /*!
00664  * @brief Add an object instance field reference to an object.
00665  *
00666  * Mark object instance field as being a reference type (typically
00667  * after loading the class and instantiating an object of that
00668  * class type).  The reverse of gc_object_field_rmref_stub().
00669  *
00670  *
00671  * @param  objhashTO   Object table hash of target object instance.
00672  *
00673  * @param  oiflidxTO   Object instance field lookup index to field
00674  *                     in target object instance.
00675  *
00676  *
00677  * @returns @link #rtrue rtrue@endlink if object instance field was
00678  *          marked, otherwise @link #rfalse rfalse@endlink.
00679  *
00680  *
00681  * @throws JVMCLASS_JAVA_LANG_INTERNALERROR 
00682            @link #JVMCLASS_JAVA_LANG_INTERNALERROR
00683            if null target object hash@endlink.
00684  *
00685  */
00686 rboolean gc_object_field_mkref_stub(jvm_object_hash objhashTO,
00687                                     jvm_field_lookup_index oiflidxTO)
00688 {
00689     return(rfalse);
00690 
00691 } /* END of gc_object_field_mkref_stub() */
00692 
00693 
00694 /*!
00695  * @brief Add an object instance field reference to an object.
00696  *
00697  * Mark object instance field as @e not being a reference type any more
00698  * (typically before unloading the class).  The reverse of
00699  * gc_object_field_rmref_stub().
00700  *
00701  *
00702  * @param  objhashTO    Object table hash of target object instance.
00703  *
00704  * @param  oiflidxTO    Object instance field lookup index to field
00705  *                      in target object instance.
00706  *
00707  *
00708  * @returns @link #rtrue rtrue@endlink if class static field was
00709  *          unmarked, otherwise @link #rfalse rfalse@endlink.
00710  *
00711  *
00712  * @throws JVMCLASS_JAVA_LANG_INTERNALERROR 
00713            @link #JVMCLASS_JAVA_LANG_INTERNALERROR
00714            if null target object hash@endlink.
00715  *
00716  */
00717 rboolean gc_object_field_rmref_stub(jvm_object_hash objhashTO,
00718                                     jvm_field_lookup_index oiflidxTO)
00719 {
00720     return(rfalse);
00721 
00722 } /* END of gc_object_field_rmref_stub() */
00723 
00724 
00725 /*!
00726  * @brief Garbage collect an object instance.
00727  *
00728  * Finalize garbage collection for an object instance that will no
00729  * longer be used, as set up in object_instance_delete().  If there
00730  * are any outstanding references to this class, those must first
00731  * be removed, at which time gc_run_stub() will perform the
00732  * finalization instead.  The reverse of gc_object_new_stub().
00733  *
00734  * @note Since this function is the reverse of gc_object_new_stub(), the
00735  * @link #rclass.pgarbage rclass.pgarbage@endlink pointer must be
00736  * freed by @link #HEAP_DATA_FREE() HEAP_DATA_FREE@endlink.
00737  *
00738  *
00739  * @param  objhashOLD  Object table hash of defunct object instance.
00740  *
00741  *
00742  * @returns @link #rtrue rtrue@endlink if garbage collection was
00743  *          finalized for this object instance, otherwise
00744  *          @link #rfalse rfalse@endlink.
00745  *
00746  *
00747  * @throws JVMCLASS_JAVA_LANG_INTERNALERROR 
00748            @link #JVMCLASS_JAVA_LANG_INTERNALERROR
00749            if null object hash@endlink.
00750  *
00751  */
00752 rboolean gc_object_delete_stub(jvm_object_hash objhashOLD)
00753 {
00754     return(rfalse);
00755 
00756 } /* END of gc_object_delete_stub() */
00757 
00758 
00759 /*!
00760  * @brief Start up garbage collection for a new Java virtual
00761  * method stack frame.
00762  *
00763  * Initialize garbage collection for a new stack frame for a
00764  * virtual Java method invocation, as set up in PUSH_GC().
00765  * The reverse of gc_stack_delete_stub().
00766  *
00767  *
00768  * @param  thridxNEW    Thread table index to thread that is setting
00769  *                      up a new stack frame for a method invocation.
00770  *
00771  * @param  num_locals   Number of local variables in this method.
00772  *
00773  *
00774  * @returns Pointer to (gc_stack)  for this object instance
00775  *
00776  *
00777  * @attention Due to the fact that there may be any number of garbage
00778  *            collection algorithms implemented for the JVM, and with
00779  *            the need to keep the API to the GC system constant, this
00780  *            return value is @b not defined to be related to
00781  *            any particular type of GC.  Instead it is a simple
00782  *            @link #rvoid rvoid@endlink pointer.
00783  *
00784  */
00785 rvoid *gc_stack_new_stub(jvm_thread_index thridxNEW, rint num_locals)
00786 {
00787     return((rvoid *) rnull);
00788 
00789 } /* END of gc_stack_new_stub() */
00790 
00791 
00792 /*!
00793  * @brief Add local variable reference to an object.
00794  * 
00795  * Mark object as having another local variable instance reference
00796  * to it.  The reverse of gc_stack_rmref_stub().
00797  *
00798  *
00799  * @param  thridxFROM Thread table index to thread that is setting
00800  *                    up new stack from for a method invocation.
00801  *
00802  * @param  frmidxTO   Index into current frame of local variable
00803  *                    that is an object reference.
00804  *
00805  *
00806  * @returns @link #rtrue rtrue@endlink if object instance was marked,
00807  *          otherwise @link #rfalse rfalse@endlink.
00808  *
00809  *
00810  * @throws JVMCLASS_JAVA_LANG_INTERNALERROR 
00811            @link #JVMCLASS_JAVA_LANG_INTERNALERROR
00812            if null thread index@endlink.
00813  *
00814  */
00815 rboolean gc_stack_mkref_from_jvm_stub(jvm_thread_index thridxFROM,
00816                                       jint             frmidxTO)
00817 {
00818     return(rfalse);
00819 
00820 } /* END of gc_stack_mkref_from_jvm_stub() */
00821 
00822 
00823 /*!
00824  * @brief Remove local variable reference from an object.
00825  *
00826  * Unmark object from having another local variable instance
00827  * reference to it.  The reverse of gc_stack_mkref_stub().
00828  *
00829  *
00830  * @param  thridxFROM Thread table index to thread that is setting
00831  *                    up new stack from for a method invocation.
00832  *
00833  * @param  frmidxTO   Index into current frame of local variable
00834  *                    that is an object reference.
00835  *
00836  *
00837  * @returns @link #rtrue rtrue@endlink if object instance was marked,
00838  *          otherwise @link #rfalse rfalse@endlink.
00839  *
00840  *
00841  * @throws JVMCLASS_JAVA_LANG_INTERNALERROR 
00842            @link #JVMCLASS_JAVA_LANG_INTERNALERROR
00843            if null thread index@endlink.
00844  *
00845  */
00846 rboolean gc_stack_rmref_from_jvm_stub(jvm_thread_index thridxFROM,
00847                                       jint             frmidxTO)
00848 {
00849     return(rfalse);
00850 
00851 } /* END of gc_stack_rmref_from_jvm_stub() */
00852 
00853 
00854 /*!
00855  * @brief Garbage collect a Java virtual method stack frame.
00856  *
00857  * Finalize garbage collection for a stack frame that will no
00858  * longer be used by a virtual Java method, as set up in PUSH_GC().
00859  * This function is called from POP_GC().  It is the reverse
00860  * of gc_stack_new_stub().
00861  *
00862  *
00863  * @param  thridxOLD  Thread table index to thread that is tearing
00864  *                    down an old stack frame from a method invocation.
00865  *
00866  * @param  ppgcs      Pointer to GC stack area pointer for this frame
00867  *
00868  * @param  plocal_teardown  Pointer to local area of partially popped
00869  *                          frame.
00870  *
00871  *
00872  * @returns @link #rtrue rtrue@endlink if garbage collection was
00873  *          finalized for this method return, otherwise
00874  *          @link #rfalse rfalse@endlink.
00875  *
00876  *
00877  * @throws JVMCLASS_JAVA_LANG_INTERNALERROR 
00878            @link #JVMCLASS_JAVA_LANG_INTERNALERROR
00879            if null thread index@endlink.
00880  *
00881  *
00882  * @attention Due to the fact that there may be any number of garbage
00883  *            collection algorithms implemented for the JVM, and with
00884  *            the need to keep the API to the GC system constant, the
00885  *            parameter @b ppgcs is @b not defined to be related to
00886  *            any particular type of GC.  Instead it is a simple
00887  *            @link #rvoid rvoid@endlink pointer.
00888  *
00889  */
00890 rboolean gc_stack_delete_stub(jvm_thread_index    thridxOLD,
00891                               rvoid             **ppgcs,
00892                               jint               *plocal_teardown)
00893 {
00894     return(rfalse);
00895 
00896 } /* END of gc_stack_delete_stub() */
00897 
00898 #endif /* CONFIG_GC_TYPE_STUB || CONFIG_OPTIONS_COMPILE_ALL */
00899 
00900 
00901 /* EOF */
00902 

Generated on Fri Sep 30 18:59:28 2005 by  doxygen 1.4.4