Author: dlydick Date: Wed Oct 19 01:44:42 2005 New Revision: 326482 URL: http://svn.apache.org/viewcvs?rev=326482&view=rev Log: Updated ARCH_xxx() macros for better diagnostic support. Minor documentation adjustments. Modified: incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/attribute.c incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/attribute.h incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/cfmacros.h incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/cfmsgs.c incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/class.h incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/classfile.h incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/classutil.c incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/exit.h incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/field.h incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/gc_stub.c incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/jlClass.c incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/jlObject.c incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/jlString.c incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/jlThread.c incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/jrtypes.c incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/jrtypes.h incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/jvalue.h incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/jvmcfg.c incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/jvmclass.h incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/jvmutil.c incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/linkage.c incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/linkage.h incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/native.c incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/native.h incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/nts.h incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/object.h incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/objectutil.c incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/opcode.h incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/stdio.c incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/threadstate.c incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/timeslice.c incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/unicode.c incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/unicode.h incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/utf.h Modified: incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/attribute.c URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/attribute.c?rev=326482&r1=326481&r2=326482&view=diff ============================================================================== --- incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/attribute.c (original) +++ incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/attribute.c Wed Oct 19 01:44:42 2005 @@ -6,7 +6,9 @@ * * @section Control * - * \$URL$ \$Id$ + * \$URL$ + * + * \$Id$ * * Copyright 2005 The Apache Software Foundation * or its licensors, as applicable. @@ -30,6 +32,7 @@ * @date \$LastChangedDate$ * * @author \$LastChangedBy$ + * * Original code contributed by Daniel Lydick on 09/28/2005. * * @section Reference @@ -37,7 +40,9 @@ */ #include "arch.h" -ARCH_COPYRIGHT_APACHE(attribute, c, "$URL$ $Id$"); +ARCH_SOURCE_COPYRIGHT_APACHE(attribute, c, +"$URL$", +"$Id$"); #include "jvmcfg.h" @@ -49,7 +54,7 @@ /*! - * @brief Locate an attribute by constant_pool entry for a field, + * @brief Locate an attribute by @c @b constant_pool entry for a field, * method, or class. The attribute pointer passed in is valid for * all three types. * @@ -60,8 +65,9 @@ * * @param patr Attribute array for a field, method, or class. * - * @param atrname UTF8 constant_pool entry of name of attribute in - * field, method, or class. + * + * @param atrname UTF8 @c @b constant_pool entry of name of attribute + * in field, method, or class. * * * @returns Attribute table index ofthie attribute or @@ -75,6 +81,8 @@ attribute_info_dup **patr, cp_info_dup *atrname) { + ARCH_FUNCTION_NAME(attribute_name_common_find); + /* Search for match of attribute array against requested name */ jvm_attribute_index atridx; @@ -108,9 +116,9 @@ * @param patr Attribute array for a field, method, or class. * * @param atrenum Attribute enumeration (from - * @link jvm/src/classfile.h classfile.h@endlink) - * for attribute of field, method, or class to locate - * (e.g. LOCAL_CODE_ATTRIBUTE). + * @link jvm/src/classfile.h classfile.h@endlink) + * for attribute of field, method, or class to locate + * (e.g. LOCAL_CODE_ATTRIBUTE). * * * @returns Attribute table index ofthie attribute or @@ -124,6 +132,8 @@ attribute_info_dup **patr, classfile_attribute_enum atrenum) { + ARCH_FUNCTION_NAME(attribute_enum_common_find); + /* Search for match of attribute array against requested enum */ jvm_attribute_index atridx; @@ -144,22 +154,22 @@ /*! - * @brief Locate by constant_pool entry the attribute_info index for an - * attribute in a field attribute area. + * @brief Locate by @c @b constant_pool entry the attribute_info index + * for an attribute in a field attribute area. * * * @param clsidx Class index of class whose field is to be - * searched for an attribute. + * searched for an attribute. * * @param fldidx Field index of field to search. * - * @param atrname UTF8 constant_pool entry of name of - * attribute name to locate. + * @param atrname UTF8 @c @b constant_pool entry of name of + * attribute name to locate. * * * @returns attribute table index of this attribute in field, or * @link #jvm_attribute_index_bad jvm_attribute_index_bad@endlink - * if not found. + * if not found. * */ jvm_attribute_index @@ -167,6 +177,8 @@ jvm_field_index fldidx, cp_info_dup *atrname) { + ARCH_FUNCTION_NAME(attribute_find_in_field_by_cp_entry); + /* Prohibit invalid class parameter */ if (jvm_class_index_null == clsidx) { @@ -197,7 +209,7 @@ * * * @param clsidx Class index of class whose field is to be - * searched for an attribute. + * searched for an attribute. * * @param fldidx Field index of field to search. * @@ -205,6 +217,7 @@ LOCAL_xxxx_ATTRIBUTE@endlink enumeration of * attribute to locate. * + * * @returns attribute table index of this attribute in field, or * @link #jvm_attribute_index_bad jvm_attribute_index_bad@endlink * if not found. @@ -215,6 +228,8 @@ jvm_field_index fldidx, classfile_attribute_enum atrenum) { + ARCH_FUNCTION_NAME(attribute_find_in_field_by_enum); + /* Prohibit invalid class parameter */ if (jvm_class_index_null == clsidx) { @@ -239,17 +254,18 @@ /*! - * @brief Locate by constant_pool entry the attribute_info index for - * an attribute in a method attribute area. + * @brief Locate by @c @b constant_pool entry the attribute_info index + * for an attribute in a method attribute area. * * * @param clsidx Class index of class whose method is to be - * searched for an attribute. + * searched for an attribute. * * @param mthidx Method index of method to search. * - * @param atrname UTF8 constant_pool entry of name of - * attribute name to locate. + * @param atrname UTF8 @c @b constant_pool entry of name of + * attribute name to locate. + * * * @returns attribute table index of this attribute in method, or * @link #jvm_attribute_index_bad jvm_attribute_index_bad@endlink @@ -261,6 +277,8 @@ jvm_method_index mthidx, cp_info_dup *atrname) { + ARCH_FUNCTION_NAME(attribute_find_in_method_by_cp_entry); + /* Prohibit invalid class parameter */ if (jvm_class_index_null == clsidx) { @@ -291,7 +309,7 @@ * * * @param clsidx Class index of class whose method is to be - * searched for an attribute. + * searched for an attribute. * * @param mthidx Method index of method to search. * @@ -299,6 +317,7 @@ LOCAL_xxxx_ATTRIBUTE@endlink enumeration of * attribute to locate. * + * * @returns attribute table index of this attribute in method, or * @link #jvm_attribute_index_bad jvm_attribute_index_bad@endlink * if not found. @@ -309,6 +328,8 @@ jvm_method_index mthidx, classfile_attribute_enum atrenum) { + ARCH_FUNCTION_NAME(attribute_find_in_method_by_enum); + /* Prohibit invalid class parameter */ if (jvm_class_index_null == clsidx) { @@ -333,15 +354,16 @@ /*! - * @brief Locate by constant_pool entry the attribute_info index for - * an attribute in a class attribute area. + * @brief Locate by @c @b constant_pool entry the attribute_info index + * for an attribute in a class attribute area. * * * @param clsidx Class index of class be searched for an - * attribute. + * attribute. + * + * @param atrname UTF8 @c @b constant_pool entry of name of + * attribute name to locate. * - * @param atrname UTF8 constant_pool entry of name of - * attribute name to locate. * * @returns attribute table index of this attribute in class, or * @link #jvm_attribute_index_bad jvm_attribute_index_bad@endlink @@ -352,6 +374,8 @@ attribute_find_in_class_by_cp_entry(jvm_class_index clsidx, cp_info_dup *atrname) { + ARCH_FUNCTION_NAME(attribute_find_in_class_by_cp_entry); + /* Prohibit invalid class parameter */ if (jvm_class_index_null == clsidx) { @@ -376,12 +400,13 @@ * * * @param clsidx Class index of class whose method is to be - * searched for an attribute. + * searched for an attribute. * * @param atrenum @link #classfile_attribute_enum LOCAL_xxxx_ATTRIBUTE@endlink enumeration of * attribute to locate. * + * * @returns attribute table index of this attribute in class, or * @link #jvm_attribute_index_bad jvm_attribute_index_bad@endlink * if not found. @@ -391,6 +416,8 @@ attribute_find_in_class_by_enum(jvm_class_index clsidx, classfile_attribute_enum atrenum) { + ARCH_FUNCTION_NAME(attribute_find_in_class_by_enum); + /* Prohibit invalid class parameter */ if (jvm_class_index_null == clsidx) { Modified: incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/attribute.h URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/attribute.h?rev=326482&r1=326481&r2=326482&view=diff ============================================================================== --- incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/attribute.h (original) +++ incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/attribute.h Wed Oct 19 01:44:42 2005 @@ -9,7 +9,9 @@ * * @section Control * - * \$URL$ \$Id$ + * \$URL$ + * + * \$Id$ * * Copyright 2005 The Apache Software Foundation * or its licensors, as applicable. @@ -33,13 +35,16 @@ * @date \$LastChangedDate$ * * @author \$LastChangedBy$ + * * Original code contributed by Daniel Lydick on 09/28/2005. * * @section Reference * */ -ARCH_COPYRIGHT_APACHE(attribute, h, "$URL$ $Id$"); +ARCH_HEADER_COPYRIGHT_APACHE(attribute, h, +"$URL$", +"$Id$"); extern jvm_attribute_index attribute_find_in_field_by_cp_entry( Modified: incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/cfmacros.h URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/cfmacros.h?rev=326482&r1=326481&r2=326482&view=diff ============================================================================== --- incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/cfmacros.h (original) +++ incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/cfmacros.h Wed Oct 19 01:44:42 2005 @@ -9,7 +9,9 @@ * * @section Control * - * \$URL$ \$Id$ + * \$URL$ + * + * \$Id$ * * Copyright 2005 The Apache Software Foundation * or its licensors, as applicable. @@ -33,24 +35,27 @@ * @date \$LastChangedDate$ * * @author \$LastChangedBy$ + * * Original code contributed by Daniel Lydick on 09/28/2005. * * @section Reference * */ -ARCH_COPYRIGHT_APACHE(cfmacros, h, "$URL$ $Id$"); +ARCH_HEADER_COPYRIGHT_APACHE(cfmacros, h, +"$URL$", +"$Id$"); #include "heap.h" /*! * @name Typed constant_pool pointers * - * @brief Convert generic constant_pool[] entry into a + * @brief Convert generic @c @b constant_pool[] entry into a * @link #CONSTANT_Class_info CONSTANT_xxxxx_info@endlink typed pointer, * stripping off the generic prefix bytes. * - * Adjust a generic constant_pool entry (cp_info_dup *) + * Adjust a generic @c @b constant_pool entry (cp_info_dup *) * into its corresponding * @link #CONSTANT_Class_info CONSTANT_xxxxx_info@endlink typed pointer * by changing the pointer to point not to the beginning of the @@ -67,7 +72,7 @@ * @see ARCH_ODD2_ADDRESS_SIGSEGV * * - * @param pcpinfodup Pointer to a constant_pool entry, typically + * @param pcpinfodup Pointer to a @c @b constant_pool entry, typically * @c @b &pcfs->constant_pool[n] * * @@ -118,7 +123,8 @@ * @name General navigation and parsing macros. * * @param pcfs ClassFile pointer to a fully parsed class data area - * @param cpidx Index into its constant_pool[] array. + * + * @param cpidx Index into its @c @b constant_pool[] array. * */ @@ -126,11 +132,11 @@ /*! * @brief Report the (cp_info *) of the address of the - * class file @p @b pcfs constant_pool entry at this + * class file @p @b pcfs @c @b constant_pool entry at this * index @p @b cpidx. * * - * @returns(cp_info *) to a constant_pool[cpidx] + * @returns(cp_info *) to a @c @b constant_pool[cpidx] * */ #define PTR_CP_ENTRY(pcfs, cpidx) (&(pcfs->constant_pool[cpidx])->cp) @@ -138,10 +144,10 @@ /*! * @brief Report the (u1) tag value of the class file @p @b pcf - * constant_pool entry at this index @p @b cpidx. + * @c @b constant_pool entry at this index @p @b cpidx. * * - * @returns (u1) tag value of entry at constant_pool[cpidx] + * @returns (u1) tag value of entry at @c @b constant_pool[cpidx] * */ #define CP_TAG(pcfs, cpidx) ((PTR_CP_ENTRY(pcfs, cpidx))->tag) @@ -152,8 +158,8 @@ * start of @link cp_info#info info@endlink field as a (u1 *). * * - * @returns address or contents of something in a constant_pool[] entry, - * see above description. + * @returns address or contents of something in a @c @b constant_pool[] + * entry, see above description. */ #define PTR_CP_INFO(pcfs, cpidx) \ ((u1 *) (&PTR_CP_ENTRY(pcfs, cpidx)->info)) @@ -196,9 +202,11 @@ * * @param pcfs ClassFile pointer to a fully parsed class data area * - * @param cpidx Index into its constant_pool[] array. + * @param cpidx Index into its @c @b constant_pool[] array. * - * @returns Pointer to a constant_pool[cpidx], variously typed as above. + * + * @returns Pointer to a @c @b constant_pool[cpidx], variously typed as + * above. * */ @@ -220,7 +228,7 @@ /*! * @name UTF string manipulation macros. * - * @brief Probe CONSTANT_Utf8_info constant_pool entries for + * @brief Probe CONSTANT_Utf8_info @c @b constant_pool entries for * field data and addresses. * * Return information about (CONSTANT_Utf8_info) entry, namely: @@ -228,8 +236,8 @@ *