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

cfmacros.h File Reference


Detailed Description

Macros for navigating class file structures in a ClassFile.

Control

$URL: https://svn.apache.org/path/name/cfmacros.h $ $Id: cfmacros.h 0 09/28/2005 dlydick $

Copyright 2005 The Apache Software Foundation or its licensors, as applicable.

Licensed under the Apache License, Version 2.0 ("the License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

See the License for the specific language governing permissions and limitations under the License.

Version:
$LastChangedRevision: 0 $
Date:
$LastChangedDate: 09/28/2005 $
Author:
$LastChangedBy: dlydick $ Original code contributed by Daniel Lydick on 09/28/2005.

Reference

Definition in file cfmacros.h.

#include "heap.h"

Go to the source code of this file.

UTF string manipulation macros.

Probe CONSTANT_Utf8_info constant_pool entries for field data and addresses.

Return information about (CONSTANT_Utf8_info) entry, namely:

Parameters:
type typedef definition for pointer cast of result
pcfs ClassFile pointer to a fully parsed class data area
cpidx Index into its constant_pool[] array.
strname_idx Field name of indirect constant_pool pointed to by pcfs and cpidx. The index found here is the index containing the UTF string. (CP1_xxx and CP2_xxx macros only)
Returns:
(cp_info *) to a constant_pool[cpidx]


#define CP1_CLASS_NAME_STRLEN(pcfs, cpidx)   CP1_NAME_STRLEN(CONSTANT_Class_info, pcfs, cpidx, name_index)
#define CP1_NAME_STRLEN(type, pcfs, cpidx, strname_idx)   CP_THIS_STRLEN(pcfs, (PTR_CP_ENTRY_TYPE(type,pcfs,cpidx)->strname_idx))
#define CP2_CLASS_NAME_STRLEN(type, pcfs, cpidx, strname_idx)
#define CP_THIS_STRLEN(pcfs, cpidx)   PTR_CP_ENTRY_TYPE(CONSTANT_Utf8_info, pcfs, cpidx)->length
#define PTR_CP1_CLASS_NAME(pcfs, cpidx)   PTR_CP1_NAME(CONSTANT_Class_info, pcfs, cpidx, name_index)
#define PTR_CP1_CLASS_NAME_STRNAME(pcfs, cpidx)   PTR_CP1_NAME_STRNAME(CONSTANT_Class_info, pcfs, cpidx, name_index)
#define PTR_CP1_NAME(type, pcfs, cpidx, strname_idx)   PTR_CP_THIS(pcfs, (PTR_CP_ENTRY_TYPE(type, pcfs,cpidx)->strname_idx))
#define PTR_CP1_NAME_STRNAME(type, pcfs, cpidx, strname_idx)
#define PTR_CP2_CLASS_NAME(type, pcfs, cpidx, strname_idx)
#define PTR_CP2_CLASS_NAME_STRNAME(type, pcfs, cpidx, strname_idx)
#define PTR_CP_THIS(pcfs, cpidx)   PTR_CP_ENTRY_TYPE(CONSTANT_Utf8_info, pcfs, cpidx)
#define PTR_CP_THIS_STRNAME(pcfs, cpidx)

Architecture-dependent byte swapping macros.

Inline the logic to swap bytes on multi-byte elements.

This is only meaningful on CONFIG_LITTLE_ENDIAN architectures. (Notice that if member does not match the pointer's type, there will be a compile warning or error.)

Parameters:
type Which constant_pool type, CONSTANT_xxx_info, that will be used as (type *) to reference members.
member Member of (CONSTANT_xxx_info *) to be manipulated.
Returns:
rvoid
Attention:
The following variables area must be defined for the CP_ITEM_SWAP_U2() and CP_ITEM_SWAP_U2 macros to work:
      u2 *pcpu2;
      u4 *pcpu4;
   
Todo:
There needs to be logic implemented that can determine whether or not a particular field has been byte swapped in case a constant pool reference is made to an entry that was previously byte swapped. This has NOT been done for this ioriginal implementation because it is on a Solaris 9 machine, which is big endian.


#define CP_ITEM_SWAP_U2(type, member)
#define CP_ITEM_SWAP_U4(type, member)

General navigation and parsing macros.

Parameters:
pcfs ClassFile pointer to a fully parsed class data area
cpidx Index into its constant_pool[] array.


#define CP_TAG(pcfs, cpidx)   ((PTR_CP_ENTRY(pcfs, cpidx))->tag)
 Report the (u1) tag value of the class file pcf constant_pool entry at this index cpidx.
#define PTR_CP_ENTRY(pcfs, cpidx)   (&(pcfs->constant_pool[cpidx])->cp)
 Report the (cp_info *) of the address of the class file pcfs constant_pool entry at this index cpidx.
#define PTR_CP_INFO(pcfs, cpidx)   ((u1 *) (&PTR_CP_ENTRY(pcfs, cpidx)->info))
 Point into a (cp_info) data structure and return start of info field as a (u1 *).

Generic prefix bytes.

Fill in empty area at start of selected structures for address alignment purposes.

Fill pattern bytes are provided for (cp_info) and (attribute_info) structure alignment within (cp_info_dup) and (attribute_info_dup) structures. This assures that 2- and 4-byte alignments needed for the beginning of those structures is followed (after the first element, the tag and attribute_name_index elements, respectively).

Real machine architectures that have issues with non-aligned multi-byte accesses do not like the fact that ClassFile structures such as cp_info begin with a single byte field followed by multi-byte fields. In like manner, structures like attribute_info have only 2- and 4-byte fields, yet may contain an odd number of bytes in their info fields. Due to the streaming nature of Java class files, subsequent attributes may thus be misaligned, even though they may only contain fields with an even number of bytes. Thus the cp_info_dup and attribute_info_dup structures were devised to suppress problems like this. When the class file is read, all structure accesses are performed on blocks of allocated memory that start on 4- or 8-byte address boundaries and pad the first few bytes so that all 2- and 4-byte accesses are on 2- or 4-byte boundaries.

There are three FILL_INFO_DUPx fill fields for padding and three FILL_INFO_NOTUSED_Ux fill fields for assigning values to notusedXX fields.

See also:
cp_info_dup

attribute_info_dup

ARCH_ODD4_ADDRESS_SIGSEGV

ARCH_ODD2_ADDRESS_SIGSEGV

Todo:
WATCH OUT! When changing CP_INFO_NUM_EMPTIES or ATTRIBUTE_INFO_NUM_EMPTIES, beware of not having he right number of struct->empty[x]=FILL lines in the cp_info_dup and attribute_info_dup assignments! Could eliminate these, but they are useful for debugging.
Todo:
4-byte unused fields are meaningful only for 64-bit implementations.
Todo:
For 64-bit compilations, these fill patterns may need to be expanded to support 8-byte alignments for some architectures. For 32-bit compilations, nothing needs to be done. (Verify if this is so.) Remember that the WORDSIZE64 configuration macro is used to distinguish this mode of compilation. (See config.sh for details.)


#define FILL_INFO_DUP0   0xbe
#define FILL_INFO_DUP1   0xef
#define FILL_INFO_DUP2   0x99
#define FILL_INFO_NOTUSED_U1   0x9a
#define FILL_INFO_NOTUSED_U2   0x9ace
#define FILL_INFO_NOTUSED_U4   0x9aceface

Responses to generic failure types

Generic return type for error test, including either return value of a typed rnull pointer (GENERIC_FAILUREx_PTR() only), a generic value (GENERIC_FAILUREx_VALUE() only), or throw an error (GENERIC_FAILUREx_THROWERROR() only), plus a error message. If expr is rtrue, return the return value or throw the error (depending on the specific macro), else continue with inline code.

The versions GENERAL_FAILURE1_xxx() and GENERAL_FAILURE2_xxx() also may pass a formatting parameter for msg to format into the output string.

The following is a grand union of the parameters for all of these macros. A given macro may or may not use some of them:

Parameters:
expr Any logical expression that returns rtrue or rfalse.
dml Debug message level for amount of output verbosity
fn Name of function invoking this macro
msg Any text message to display to stderr if expr is rtrue. For GENERIC_FAILURE{1|2}(), this should also contain 1 or 2 formatting items also.
parm1 (for GENERIC_FAILURE{1|2}_xxx() only) First parameter to format into msg.
parm2 (for GENERIC_FAILURE2_xxx() only) Second parameter to format into msg.
rettype Function return TYPE (not including '*' modifier) to be used instead of (rvoid *). Used by GENERIC_FAILUREx_PTR() only.
retval Function return VALUE, used by GENERIC_FAILUREx_VALUE() and GENERIC_FAILUREx_THROWERROR() .
retclass Function error class to throw, used by GENERIC_FAILUREx_THROWERROR() only.
heap1ptr Data heap block to free, or rnull if not needed.
heap2ptr Data heap block to free, or rnull if not needed.
Returns:
If expr is rtrue, return a typed rnull pointer to the calling function, cast as (rettype *), else continue with inline code.


#define GENERIC_FAILURE1_PTR(expr, dml, fn, msg, parm1, rettype,heap1ptr, heap2ptr)
#define GENERIC_FAILURE1_THROWERROR(expr, dml, fn, msg, parm1, retval, retclass, heap1ptr, heap2ptr)
#define GENERIC_FAILURE1_VALUE(expr, dml, fn, msg, parm1, retval,heap1ptr, heap2ptr)
#define GENERIC_FAILURE2_PTR(expr, dml, fn, msg, parm1, parm2, rettype, heap1ptr, heap2ptr)
#define GENERIC_FAILURE2_THROWERROR(expr, dml, fn, msg, parm1, parm2,retval, retclass, heap1ptr, heap2ptr)
#define GENERIC_FAILURE2_VALUE(expr, dml, fn, msg, parm1, parm2, retval, heap1ptr, heap2ptr)
#define GENERIC_FAILURE_PTR(expr, dml, fn, msg, rettype,heap1ptr, heap2ptr)
#define GENERIC_FAILURE_THROWERROR(expr, dml, fn, msg, retval, retclass, heap1ptr, heap2ptr)
#define GENERIC_FAILURE_VALUE(expr, dml, fn, msg, retval, heap1ptr,heap2ptr)

Support for failed system calls

Recover from error when loading and parsing class file by returning an rnull pointer, properly cast.

Parameters:
expr Any logical expression that returns rtrue or rfalse.
msg Any text message to display to stderr if expr is rtrue.
heap1ptr Method heap block to free, or rnull if not needed.
heap2ptr Method heap block to free, or rnull if not needed.
Returns:
If expr is rtrue, return an rnull pointer to the calling function, cast as shown above, else continue with inline code.


#define LOAD_SYSCALL_FAILURE(expr, msg, heap1ptr, heap2ptr)
#define LOAD_SYSCALL_FAILURE_ATTRIB(expr, msg, heap1ptr, heap2ptr)

Non-aligned multi-byte field access

Cast arbitrary pointers to type (u2 *) and (u4 *) for referencing items in class file data image. These pointers DO NOT need to be 2- or 4-byte aligned.

Parameters:
ptr Name of pointer variable to receive (cast) value
loc Name of pointer variable to be (recast) as either (u2 *) or (u4 *).
Returns:
loc receives new value from (recast *) loc


#define MAKE_PU2(ptr, loc)   ptr = (u2 *) (loc)
#define MAKE_PU4(ptr, loc)   ptr = (u4 *) (loc)

Pointer casting for very common constructions.

Report the (cp_info *) of a PTR_CP_ENTRY(), but cast as a pointer to one of the following data types.

The PTR_CP_ENTRY_TYPE() macro may used to choose any arbitrary type at all.

If type is a (CONSTANT_xxxxx_info *), the result may be referenced DIRECTLY BY THE VM SPEC. These types are:

Parameters:
type typedef definition for pointer cast of result
pcfs ClassFile pointer to a fully parsed class data area
cpidx Index into its constant_pool[] array.
Returns:
Pointer to a constant_pool[cpidx], variously typed as above.


#define PTR_CP_ENTRY_CLASS(pcfs, cpidx)   ((CONSTANT_Class_info *) PTR_CP_ENTRY(pcfs, cpidx))
#define PTR_CP_ENTRY_TYPE(type, pcfs, cpidx)   ((type *) PTR_CP_ENTRY(pcfs, cpidx))
#define PTR_CP_ENTRY_UTF8(pcfs, cpidx)   ((CONSTANT_Utf8_info *) PTR_CP_ENTRY(pcfs, cpidx))

Typed constant_pool pointers

Convert generic constant_pool[] entry into a CONSTANT_xxxxx_info typed pointer, stripping off the generic prefix bytes.

Adjust a generic constant_pool entry (cp_info_dup *) into its corresponding CONSTANT_xxxxx_info typed pointer by changing the pointer to point not to the beginning of the (cp_info_dup) structure, but to its cp member, which is where the data actually begins. This is useful for argument passing when the whole (cp_info_dup *) is available. The original adjustment was made in the first place to support native member accesses on real machine architectures that are picky about multi-byte accesses that are not aligned to addresses of the same size.

See also:
ARCH_ODD4_ADDRESS_SIGSEGV

ARCH_ODD2_ADDRESS_SIGSEGV

Parameters:
pcpinfodup Pointer to a constant_pool entry, typically &pcfs->constant_pool[n]
Returns:
Pointer to the ->cp member, typed as CONSTANT_xxxxx_info


#define PTR_THIS_CP_Class(pcpinfodup)   ((CONSTANT_Class_info *) &(pcpinfodup)->cp)
#define PTR_THIS_CP_Double(pcpinfodup)   ((CONSTANT_Double_info *) &(pcpinfodup)->cp)
#define PTR_THIS_CP_Fieldref(pcpinfodup)   ((CONSTANT_Fieldref_info *) &(pcpinfodup)->cp)
#define PTR_THIS_CP_Float(pcpinfodup)   ((CONSTANT_Float_info *) &(pcpinfodup)->cp)
#define PTR_THIS_CP_Integer(pcpinfodup)   ((CONSTANT_Integer_info *) &(pcpinfodup)->cp)
#define PTR_THIS_CP_InterfaceMethodref(pcpinfodup)   ((CONSTANT_InterfaceMethodref_info *) &(pcpinfodup)->cp)
#define PTR_THIS_CP_Long(pcpinfodup)   ((CONSTANT_Long_info *) &(pcpinfodup)->cp)
#define PTR_THIS_CP_Methodref(pcpinfodup)   ((CONSTANT_Methodref_info *) &(pcpinfodup)->cp)
#define PTR_THIS_CP_NameAndType(pcpinfodup)   ((CONSTANT_NameAndType_info *) &(pcpinfodup)->cp)
#define PTR_THIS_CP_String(pcpinfodup)   ((CONSTANT_String_info *) &(pcpinfodup)->cp)
#define PTR_THIS_CP_Utf8(pcpinfodup)   ((CONSTANT_Utf8_info *) &(pcpinfodup)->cp)

Functions

 ARCH_COPYRIGHT_APACHE (cfmacros, h,"$URL: https://svn.apache.org/path/name/cfmacros.h $ $Id: cfmacros.h 0 09/28/2005 dlydick $")


Define Documentation

#define PTR_THIS_CP_Class pcpinfodup   )     ((CONSTANT_Class_info *) &(pcpinfodup)->cp)
 

Definition at line 81 of file cfmacros.h.

Referenced by classfile_allocate_primative(), classfile_loadclassdata(), linkage_resolve_class(), and opcode_run().

#define PTR_THIS_CP_Fieldref pcpinfodup   )     ((CONSTANT_Fieldref_info *) &(pcpinfodup)->cp)
 

Definition at line 84 of file cfmacros.h.

Referenced by classfile_loadclassdata(), and linkage_resolve_class().

#define PTR_THIS_CP_Methodref pcpinfodup   )     ((CONSTANT_Methodref_info *) &(pcpinfodup)->cp)
 

Definition at line 87 of file cfmacros.h.

Referenced by classfile_loadclassdata(), and linkage_resolve_class().

#define PTR_THIS_CP_InterfaceMethodref pcpinfodup   )     ((CONSTANT_InterfaceMethodref_info *) &(pcpinfodup)->cp)
 

Definition at line 90 of file cfmacros.h.

Referenced by classfile_loadclassdata(), and linkage_resolve_class().

#define PTR_THIS_CP_String pcpinfodup   )     ((CONSTANT_String_info *) &(pcpinfodup)->cp)
 

Definition at line 93 of file cfmacros.h.

#define PTR_THIS_CP_Integer pcpinfodup   )     ((CONSTANT_Integer_info *) &(pcpinfodup)->cp)
 

Definition at line 96 of file cfmacros.h.

#define PTR_THIS_CP_Float pcpinfodup   )     ((CONSTANT_Float_info *) &(pcpinfodup)->cp)
 

Definition at line 99 of file cfmacros.h.

#define PTR_THIS_CP_Long pcpinfodup   )     ((CONSTANT_Long_info *) &(pcpinfodup)->cp)
 

Definition at line 102 of file cfmacros.h.

#define PTR_THIS_CP_Double pcpinfodup   )     ((CONSTANT_Double_info *) &(pcpinfodup)->cp)
 

Definition at line 105 of file cfmacros.h.

#define PTR_THIS_CP_NameAndType pcpinfodup   )     ((CONSTANT_NameAndType_info *) &(pcpinfodup)->cp)
 

Definition at line 108 of file cfmacros.h.

Referenced by linkage_resolve_class(), and opcode_run().

#define PTR_THIS_CP_Utf8 pcpinfodup   )     ((CONSTANT_Utf8_info *) &(pcpinfodup)->cp)
 

Definition at line 111 of file cfmacros.h.

Referenced by attribute_name_common_find(), class_load_primative(), classfile_allocate_primative(), classfile_loadclassdata(), field_find_by_cp_entry(), linkage_resolve_class(), method_find_by_cp_entry(), method_return_type(), nts_prchar2utf(), nts_prchar2utf_classname(), opcode_run(), and unicode_cnv2utf().

#define PTR_CP_ENTRY pcfs,
cpidx   )     (&(pcfs->constant_pool[cpidx])->cp)
 

Report the (cp_info *) of the address of the class file pcfs constant_pool entry at this index cpidx.

Returns:
(cp_info *) to a constant_pool[cpidx]

Definition at line 136 of file cfmacros.h.

#define CP_TAG pcfs,
cpidx   )     ((PTR_CP_ENTRY(pcfs, cpidx))->tag)
 

Report the (u1) tag value of the class file pcf constant_pool entry at this index cpidx.

Returns:
(u1) tag value of entry at constant_pool[cpidx]

Definition at line 147 of file cfmacros.h.

Referenced by cfmsgs_typemsg(), classfile_loadclassdata(), and linkage_resolve_class().

#define PTR_CP_INFO pcfs,
cpidx   )     ((u1 *) (&PTR_CP_ENTRY(pcfs, cpidx)->info))
 

Point into a (cp_info) data structure and return start of info field as a (u1 *).

Returns:
address or contents of something in a constant_pool[] entry, see above description.

Definition at line 158 of file cfmacros.h.

#define PTR_CP_ENTRY_TYPE type,
pcfs,
cpidx   )     ((type *) PTR_CP_ENTRY(pcfs, cpidx))
 

Definition at line 207 of file cfmacros.h.

Referenced by cfmsgs_typemsg().

#define PTR_CP_ENTRY_CLASS pcfs,
cpidx   )     ((CONSTANT_Class_info *) PTR_CP_ENTRY(pcfs, cpidx))
 

Definition at line 210 of file cfmacros.h.

Referenced by utf_pcfs_strcmp().

#define PTR_CP_ENTRY_UTF8 pcfs,
cpidx   )     ((CONSTANT_Utf8_info *) PTR_CP_ENTRY(pcfs, cpidx))
 

Definition at line 213 of file cfmacros.h.

#define PTR_CP_THIS pcfs,
cpidx   )     PTR_CP_ENTRY_TYPE(CONSTANT_Utf8_info, pcfs, cpidx)
 

Definition at line 379 of file cfmacros.h.

#define CP_THIS_STRLEN pcfs,
cpidx   )     PTR_CP_ENTRY_TYPE(CONSTANT_Utf8_info, pcfs, cpidx)->length
 

Definition at line 382 of file cfmacros.h.

Referenced by cfmsgs_typemsg(), jvmutil_print_stack_common(), utf_pcfs_strcmp(), utf_prchar_pcfs_strcmp(), and utf_utf_strcmp().

#define PTR_CP_THIS_STRNAME pcfs,
cpidx   ) 
 

Value:

((rchar *) &PTR_CP_ENTRY_TYPE(CONSTANT_Utf8_info, pcfs, cpidx) \
                   ->bytes[0])

Definition at line 385 of file cfmacros.h.

Referenced by cfmsgs_typemsg(), jvmutil_print_stack_common(), utf_pcfs_strcmp(), utf_prchar_pcfs_strcmp(), and utf_utf_strcmp().

#define PTR_CP1_NAME type,
pcfs,
cpidx,
strname_idx   )     PTR_CP_THIS(pcfs, (PTR_CP_ENTRY_TYPE(type, pcfs,cpidx)->strname_idx))
 

Definition at line 396 of file cfmacros.h.

#define CP1_NAME_STRLEN type,
pcfs,
cpidx,
strname_idx   )     CP_THIS_STRLEN(pcfs, (PTR_CP_ENTRY_TYPE(type,pcfs,cpidx)->strname_idx))
 

Definition at line 399 of file cfmacros.h.

Referenced by cfmsgs_typemsg(), jvmutil_print_errtype_stack(), and jvmutil_print_stack_common().

#define PTR_CP1_NAME_STRNAME type,
pcfs,
cpidx,
strname_idx   ) 
 

Value:

PTR_CP_THIS_STRNAME(pcfs, (PTR_CP_ENTRY_TYPE(type, pcfs, cpidx) \
                                ->strname_idx))

Definition at line 402 of file cfmacros.h.

Referenced by cfmsgs_typemsg(), jvmutil_print_errtype_stack(), and jvmutil_print_stack_common().

#define PTR_CP1_CLASS_NAME pcfs,
cpidx   )     PTR_CP1_NAME(CONSTANT_Class_info, pcfs, cpidx, name_index)
 

Definition at line 413 of file cfmacros.h.

#define CP1_CLASS_NAME_STRLEN pcfs,
cpidx   )     CP1_NAME_STRLEN(CONSTANT_Class_info, pcfs, cpidx, name_index)
 

Definition at line 417 of file cfmacros.h.

#define PTR_CP1_CLASS_NAME_STRNAME pcfs,
cpidx   )     PTR_CP1_NAME_STRNAME(CONSTANT_Class_info, pcfs, cpidx, name_index)
 

Definition at line 420 of file cfmacros.h.

Referenced by thread_new().

#define PTR_CP2_CLASS_NAME type,
pcfs,
cpidx,
strname_idx   ) 
 

Value:

PTR_CP_THIS(pcfs,                                             \
              (PTR_CP_ENTRY_TYPE(CONSTANT_Class_info,            \
                           pcfs,                                 \
                           (PTR_CP_ENTRY_TYPE(type, pcfs, cpidx) \
                                ->strname_idx))                  \
                   ->name_index))

Definition at line 430 of file cfmacros.h.

#define CP2_CLASS_NAME_STRLEN type,
pcfs,
cpidx,
strname_idx   ) 
 

Value:

CP_THIS_STRLEN(pcfs,                                             \
                  (PTR_CP_ENTRY_TYPE(CONSTANT_Class_info,            \
                               pcfs,                                 \
                               (PTR_CP_ENTRY_TYPE(type, pcfs, cpidx) \
                                    ->strname_idx))                  \
                       ->name_index))

Definition at line 438 of file cfmacros.h.

Referenced by cfmsgs_typemsg().

#define PTR_CP2_CLASS_NAME_STRNAME type,
pcfs,
cpidx,
strname_idx   ) 
 

Value:

PTR_CP_THIS_STRNAME(pcfs,                                           \
                      (PTR_CP_ENTRY_TYPE(CONSTANT_Class_info,          \
                                 pcfs,                                 \
                                 (PTR_CP_ENTRY_TYPE(type, pcfs, cpidx) \
                                      ->strname_idx))                  \
                           ->name_index))

Definition at line 446 of file cfmacros.h.

Referenced by cfmsgs_typemsg().

#define MAKE_PU2 ptr,
loc   )     ptr = (u2 *) (loc)
 

Definition at line 478 of file cfmacros.h.

Referenced by cfattrib_loadattribute(), and classfile_loadclassdata().

#define MAKE_PU4 ptr,
loc   )     ptr = (u4 *) (loc)
 

Definition at line 479 of file cfmacros.h.

Referenced by classfile_loadclassdata().

#define GENERIC_FAILURE_PTR expr,
dml,
fn,
msg,
rettype,
heap1ptr,
heap2ptr   ) 
 

Value:

if (expr)                                                          \
    {                                                                  \
        HEAP_FREE_DATA((rvoid *) heap1ptr); /* Ignored if rnull */     \
        HEAP_FREE_DATA((rvoid *) heap2ptr); /* Ignored if rnull */     \
        sysDbgMsg(dml, fn, msg);                                       \
        return((rettype *) rnull);                                     \
    }

Definition at line 552 of file cfmacros.h.

Referenced by cfattrib_loadattribute().

#define GENERIC_FAILURE1_PTR expr,
dml,
fn,
msg,
parm1,
rettype,
heap1ptr,
heap2ptr   ) 
 

Value:

if (expr)                                                          \
    {                                                                  \
        HEAP_FREE_DATA((rvoid *) heap1ptr); /* Ignored if rnull */     \
        HEAP_FREE_DATA((rvoid *) heap2ptr); /* Ignored if rnull */     \
        sysDbgMsg(dml, fn, msg, parm1);                                \
        return((rettype *) rnull);                                     \
    }

Definition at line 562 of file cfmacros.h.

Referenced by classfile_loadclassdata().

#define GENERIC_FAILURE2_PTR expr,
dml,
fn,
msg,
parm1,
parm2,
rettype,
heap1ptr,
heap2ptr   ) 
 

Value:

if (expr)                                                          \
    {                                                                  \
        HEAP_FREE_DATA((rvoid *) heap1ptr); /* Ignored if rnull */     \
        HEAP_FREE_DATA((rvoid *) heap2ptr); /* Ignored if rnull */     \
        sysDbgMsg(dml, fn, msg, parm1, parm2);                         \
        return((rettype *) rnull);                                     \
    }

Definition at line 572 of file cfmacros.h.

#define GENERIC_FAILURE_VALUE expr,
dml,
fn,
msg,
retval,
heap1ptr,
heap2ptr   ) 
 

Value:

if (expr)                                                          \
    {                                                                  \
        HEAP_FREE_DATA((rvoid *) heap1ptr); /* Ignored if rnull */     \
        HEAP_FREE_DATA((rvoid *) heap2ptr); /* Ignored if rnull */     \
        sysDbgMsg(dml, fn, msg);                                       \
        return(retval);                                                \
    }

Definition at line 582 of file cfmacros.h.

#define GENERIC_FAILURE1_VALUE expr,
dml,
fn,
msg,
parm1,
retval,
heap1ptr,
heap2ptr   ) 
 

Value:

if (expr)                                                          \
    {                                                                  \
        HEAP_FREE_DATA((rvoid *) heap1ptr); /* Ignored if rnull */     \
        HEAP_FREE_DATA((rvoid *) heap2ptr); /* Ignored if rnull */     \
        sysDbgMsg(dml, fn, msg, parm1);                                \
        return(retval);                                                \
    }

Definition at line 592 of file cfmacros.h.

Referenced by linkage_resolve_class().

#define GENERIC_FAILURE2_VALUE expr,
dml,
fn,
msg,
parm1,
parm2,
retval,
heap1ptr,
heap2ptr   ) 
 

Value:

if (expr)                                                          \
    {                                                                  \
        HEAP_FREE_DATA((rvoid *) heap1ptr); /* Ignored if rnull */     \
        HEAP_FREE_DATA((rvoid *) heap2ptr); /* Ignored if rnull */     \
        sysDbgMsg(dml, fn, msg, parm1, parm2);                         \
        return(retval);                                                \
    }

Definition at line 602 of file cfmacros.h.

#define GENERIC_FAILURE_THROWERROR expr,
dml,
fn,
msg,
retval,
retclass,
heap1ptr,
heap2ptr   ) 
 

Value:

if (expr)                                                          \
    {                                                                  \
        HEAP_FREE_DATA((rvoid *) heap1ptr); /* Ignored if rnull */     \
        HEAP_FREE_DATA((rvoid *) heap2ptr); /* Ignored if rnull */     \
        sysDbgMsg(dml, fn, msg);                                       \
        exit_throw_exception(retval, retclass);                        \
/*NOTREACHED*/                                                         \
    }

Definition at line 612 of file cfmacros.h.

#define GENERIC_FAILURE1_THROWERROR expr,
dml,
fn,
msg,
parm1,
retval,
retclass,
heap1ptr,
heap2ptr   ) 
 

Value:

if (expr)                                                          \
    {                                                                  \
        HEAP_FREE_DATA((rvoid *) heap1ptr); /* Ignored if rnull */     \
        HEAP_FREE_DATA((rvoid *) heap2ptr); /* Ignored if rnull */     \
        sysDbgMsg(dml, fn, msg, parm1);                                \
        exit_throw_exception(retval, retclass);                        \
/*NOTREACHED*/                                                         \
    }

Definition at line 623 of file cfmacros.h.

#define GENERIC_FAILURE2_THROWERROR expr,
dml,
fn,
msg,
parm1,
parm2,
retval,
retclass,
heap1ptr,
heap2ptr   ) 
 

Value:

if (expr)                                                          \
    {                                                                  \
        HEAP_FREE_DATA((rvoid *) heap1ptr); /* Ignored if rnull */     \
        HEAP_FREE_DATA((rvoid *) heap2ptr); /* Ignored if rnull */     \
        sysDbgMsg(dml, fn, msg, parm1, parm2);                         \
        exit_throw_exception(retval, retclass);                        \
/*NOTREACHED*/                                                         \
    }

Definition at line 634 of file cfmacros.h.

#define LOAD_SYSCALL_FAILURE expr,
msg,
heap1ptr,
heap2ptr   ) 
 

Value:

if (expr)                                               \
    {                                                       \
        HEAP_FREE_METHOD((rvoid *) heap1ptr);               \
        HEAP_FREE_METHOD((rvoid *) heap2ptr);               \
    }                                                       \
    GENERIC_FAILURE_PTR(expr,                               \
                        DMLMIN,                             \
                        "classfile_loadclassdata",          \
                        msg,                                \
                        ClassFile,                          \
                        rnull,                              \
                        rnull);

Definition at line 689 of file cfmacros.h.

Referenced by classfile_loadclassdata().

#define LOAD_SYSCALL_FAILURE_ATTRIB expr,
msg,
heap1ptr,
heap2ptr   ) 
 

Value:

if (expr)                                                      \
    {                                                              \
        HEAP_FREE_METHOD((rvoid *) heap1ptr);                      \
        HEAP_FREE_METHOD((rvoid *) heap2ptr);                      \
    }                                                              \
    GENERIC_FAILURE_PTR(expr,                                      \
                        DMLMIN,                                    \
                        "cfattrib_loadattribute",                  \
                        msg,                                       \
                        u1,                                        \
                        rnull,                                     \
                        rnull);

Definition at line 703 of file cfmacros.h.

Referenced by cfattrib_loadattribute().

#define CP_ITEM_SWAP_U2 type,
member   ) 
 

Definition at line 771 of file cfmacros.h.

Referenced by classfile_loadclassdata().

#define CP_ITEM_SWAP_U4 type,
member   ) 
 

Definition at line 772 of file cfmacros.h.

Referenced by classfile_loadclassdata().

#define FILL_INFO_DUP0   0xbe
 

Definition at line 835 of file cfmacros.h.

Referenced by cfattrib_loadattribute(), classfile_loadclassdata(), nts_prchar2utf(), and nts_prchar2utf_classname().

#define FILL_INFO_DUP1   0xef
 

Definition at line 836 of file cfmacros.h.

Referenced by cfattrib_loadattribute(), classfile_loadclassdata(), nts_prchar2utf(), and nts_prchar2utf_classname().

#define FILL_INFO_DUP2   0x99
 

Definition at line 837 of file cfmacros.h.

Referenced by classfile_loadclassdata(), nts_prchar2utf(), and nts_prchar2utf_classname().

#define FILL_INFO_NOTUSED_U1   0x9a
 

Definition at line 842 of file cfmacros.h.

#define FILL_INFO_NOTUSED_U2   0x9ace
 

Definition at line 843 of file cfmacros.h.

#define FILL_INFO_NOTUSED_U4   0x9aceface
 

Definition at line 844 of file cfmacros.h.


Function Documentation

ARCH_COPYRIGHT_APACHE cfmacros  ,
,
"$URL: https://svn.apache.org/path/name/cfmacros.h $ $Id: cfmacros.h 0 09/28/2005 dlydick $" 
 


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