osprey/kgccfe/gnu/java/class.c File Reference

#include "config.h"
#include "system.h"
#include "tree.h"
#include "rtl.h"
#include "flags.h"
#include "java-tree.h"
#include "jcf.h"
#include "obstack.h"
#include "toplev.h"
#include "output.h"
#include "parse.h"
#include "function.h"
#include "ggc.h"
#include "stdio.h"
#include "target.h"

Include dependency graph for class.c:

Go to the source code of this file.

Data Types

type  assume_compiled_node_struct

Defines

#define O_BINARY   0
#define registered_class   class_roots[0]
#define fields_ident   class_roots[1]
#define info_ident   class_roots[2]
#define class_list   class_roots[3]
#define class_dtable_decl   class_roots[4]
#define ACC_TRANSLATED   0x4000

Typedefs

typedef struct
assume_compiled_node_struct 
assume_compiled_node

Functions/Subroutines

static tree make_method_value PARAMS ((tree))
static tree build_java_method_type PARAMS ((tree, tree, int))
static int32 hashUtf8String PARAMS ((const char *, int))
static tree get_dispatch_table PARAMS ((tree, tree))
static int assume_compiled PARAMS ((const char *))
static struct hash_entry
*init_test_hash_newfunc 
PARAMS ((struct hash_entry *, struct hash_table *, hash_table_key))
static assume_compiled_node
*find_assume_compiled_node 
PARAMS ((assume_compiled_node *, const char *))
static assume_compiled_nodefind_assume_compiled_node (assume_compiled_node *node, const char *ident)
void add_assume_compiled (char *ident, int excludep) const
static int assume_compiled (char *ident) const
tree ident_subst (char *old_name, int old_length, const char *prefix, int old_char, int new_char, const char *suffix) const
tree identifier_subst (tree old_id, const char *prefix, int old_char, int new_char, const char *suffix) const
tree mangled_classname (char *prefix, tree type) const
tree make_class ()
tree unmangle_classname (char *name, int name_length) const
tree push_class (tree class_type, tree class_name)
tree lookup_class (tree name)
void set_super_info (int access_flags, tree this_class, tree super_class, int interfaces_count)
void set_class_decl_access_flags (int access_flags, tree class_decl)
int class_depth (tree clas)
int interface_of_p (tree type1, tree type2)
int inherits_from_p (tree type1, tree type2)
int enclosing_context_p (tree type1, tree type2)
int common_enclosing_context_p (tree type1, tree type2)
static void add_interface_do (tree basetype_vec, tree interface_class, int i)
tree maybe_add_interface (tree this_class, tree interface_class)
void add_interface (tree this_class, tree interface_class)
static tree build_java_method_type (tree fntype, tree this_class, int access_flags)
static struct hash_entryinit_test_hash_newfunc (struct hash_entry *entry, struct hash_table *table, string)
unsigned long java_hash_hash_tree_node (hash_table_key k)
bool java_hash_compare_tree_node (hash_table_key k1, hash_table_key k2)
tree add_method_1 (tree handle_class, int access_flags, tree name, tree function_type)
tree add_method (tree this_class, int access_flags, tree name, tree method_sig)
tree add_field (tree class, tree name, tree field_type, int flags)
void set_constant_value (tree field, tree constant)
static int32 hashUtf8String (char *str, int len) const
void compile_resource_file (char *name, const char *filename)
tree build_utf8_ref (tree name)
tree build_class_ref (tree type)
tree build_static_field_ref (tree fdecl)
int get_access_flags_from_decl (tree decl)
static tree make_field_value (tree fdecl)
static tree make_method_value (tree mdecl)
static tree get_dispatch_vector (tree type)
static tree get_dispatch_table (tree type, tree this_class_addr)
void make_class_data (tree type)
void finish_class ()
int is_compiled_class (tree class)
tree build_dtable_decl (tree type)
void push_super_field (tree this_class, tree super_class)
static tree maybe_layout_super_class (tree super_class, tree this_class)
void layout_class (tree this_class)
void layout_class_methods (tree this_class)
tree layout_class_method (tree this_class, tree super_class, tree method_decl, tree dtable_count)
void register_class ()
void emit_register_classes ()
tree build_method_symbols_entry (tree method)
void emit_offset_symbol_table ()
void init_class_processing ()

Variables

static rtx registerClass_libfunc
static rtx registerResource_libfunc
struct obstack permanent_obstack
struct obstack temporary_obstack
static assume_compiled_nodeassume_compiled_tree
static tree class_roots [5] = { NULL_TREE, NULL_TREE, NULL_TREE, NULL_TREE, NULL_TREE }
tree utf8_decl_list = NULL_TREE


Define Documentation

#define ACC_TRANSLATED   0x4000

Referenced by make_method_value().

#define class_dtable_decl   class_roots[4]

Definition at line 104 of file class.c.

Referenced by make_class_data().

#define class_list   class_roots[3]

Definition at line 103 of file class.c.

Referenced by layout_class().

#define fields_ident   class_roots[1]

Definition at line 101 of file class.c.

Referenced by build_static_field_ref(), and init_class_processing().

#define info_ident   class_roots[2]

Definition at line 102 of file class.c.

Referenced by build_static_field_ref(), and init_class_processing().

#define O_BINARY   0

Definition at line 46 of file class.c.

#define registered_class   class_roots[0]

Definition at line 100 of file class.c.

Referenced by emit_register_classes(), and register_class().


Typedef Documentation


Function Documentation

void add_assume_compiled ( char *  ident,
int  excludep 
) const

tree add_field ( tree  class,
tree  name,
tree  field_type,
int  flags 
)

void add_interface ( tree  this_class,
tree  interface_class 
)

Definition at line 583 of file class.c.

References add_interface_do(), error(), i, n, NULL_TREE, TREE_VEC_ELT, TREE_VEC_LENGTH, and TYPE_BINFO_BASETYPES.

static void add_interface_do ( tree  basetype_vec,
tree  interface_class,
int  i 
) [static]

tree add_method ( tree  this_class,
int  access_flags,
tree  name,
tree  method_sig 
)

tree add_method_1 ( tree  handle_class,
int  access_flags,
tree  name,
tree  function_type 
)

static int assume_compiled ( char *  ident  )  const [static]

tree build_class_ref ( tree  type  ) 

tree build_dtable_decl ( tree  type  ) 

static tree build_java_method_type ( tree  fntype,
tree  this_class,
int  access_flags 
) [static]

Definition at line 618 of file class.c.

References ACC_STATIC, build_method_type(), and CLASS_TO_HANDLE_TYPE.

Referenced by add_method_1().

tree build_method_symbols_entry ( tree  method  ) 

tree build_static_field_ref ( tree  fdecl  ) 

tree build_utf8_ref ( tree  name  ) 

int class_depth ( tree  clas  ) 

int common_enclosing_context_p ( tree  type1,
tree  type2 
)

Definition at line 518 of file class.c.

References DECL_CONTEXT, NULL_TREE, PURE_INNER_CLASS_TYPE_P, TREE_TYPE, and TYPE_NAME.

void compile_resource_file ( char *  name,
const char *  filename 
)

void emit_offset_symbol_table (  ) 

void emit_register_classes (  ) 

int enclosing_context_p ( tree  type1,
tree  type2 
)

Definition at line 497 of file class.c.

References DECL_CONTEXT, INNER_CLASS_TYPE_P, NULL_TREE, TREE_TYPE, and TYPE_NAME.

static assume_compiled_node* find_assume_compiled_node ( assume_compiled_node node,
const char *  ident 
) [static]

Definition at line 111 of file class.c.

References NULL, assume_compiled_node_struct::sibling, strlen(), and strncmp().

Referenced by add_assume_compiled(), and assume_compiled().

void finish_class (  ) 

int get_access_flags_from_decl ( tree  decl  ) 

static tree get_dispatch_table ( tree  type,
tree  this_class_addr 
) [static]

static tree get_dispatch_vector ( tree  type  )  [static]

static int32 hashUtf8String ( char *  str,
int  len 
) const [static]

Definition at line 838 of file class.c.

References int32, and UTF8_GET.

Referenced by build_utf8_ref().

tree ident_subst ( char*  old_name,
int  old_length,
const char *  prefix,
int  old_char,
int  new_char,
const char *  suffix 
) const

tree identifier_subst ( tree  old_id,
const char *  prefix,
int  old_char,
int  new_char,
const char *  suffix 
) const

int inherits_from_p ( tree  type1,
tree  type2 
)

Definition at line 482 of file class.c.

References CLASSTYPE_SUPER, NULL_TREE, and TREE_CODE.

Referenced by build_class_init(), and build_instanceof().

void init_class_processing ( void   ) 

static struct hash_entry* init_test_hash_newfunc ( struct hash_entry entry,
struct hash_table table,
string   
) [static, read]

Definition at line 629 of file class.c.

References hash_allocate(), init_test_hash_entry::init_test_decl, NULL, and ret.

Referenced by add_method_1().

int interface_of_p ( tree  type1,
tree  type2 
)

Definition at line 454 of file class.c.

References BINFO_TYPE, i, n, TREE_VEC_ELT, TREE_VEC_LENGTH, and TYPE_BINFO_BASETYPES.

int is_compiled_class ( tree  class  ) 

bool java_hash_compare_tree_node ( hash_table_key  k1,
hash_table_key  k2 
)

Definition at line 658 of file class.c.

Referenced by add_method_1().

unsigned long java_hash_hash_tree_node ( hash_table_key  k  ) 

Definition at line 651 of file class.c.

Referenced by add_method_1().

void layout_class ( tree  this_class  ) 

tree layout_class_method ( tree  this_class,
tree  super_class,
tree  method_decl,
tree  dtable_count 
)

void layout_class_methods ( tree  this_class  ) 

tree lookup_class ( tree  name  ) 

tree make_class (  ) 

void make_class_data ( tree  type  ) 

Offset from start of virtual function table declaration to where objects actually point at, following new g++ ABI.

Definition at line 1490 of file class.c.

References alloc_class_constant(), assume_compiled(), BINFO_TYPE, BITS_PER_UNIT, build(), build1, build_class_ref(), build_constants_constructor(), build_decl, build_dtable_decl(), build_int_2, build_prim_array_type(), build_utf8_ref(), chainon(), class_dtable_decl, CLASS_INTERFACE, class_ptr_type, CLASS_TO_HANDLE_TYPE, class_type_node, CLASSTYPE_SUPER, DECL_ALIGN, DECL_ARTIFICIAL, DECL_EXTERNAL, DECL_IGNORED_P, DECL_INITIAL, DECL_NAME, dtable, dtable_ptr_type, field_count(), field_ptr_type_node, FIELD_STATIC, field_type_node, FINISH_RECORD_CONSTRUCTOR, flag_hash_synchronization, flag_indirect_dispatch, flag_inline_functions, flag_keep_inline_functions, get_access_flags_from_decl(), get_dispatch_table(), HOST_WIDE_INT, i, IDENTIFIER_POINTER, index(), integer_minus_one_node, integer_zero_node, interfaces, is_compiled_class(), make_field_value(), make_method_value(), mangled_classname(), METHOD_PRIVATE, method_ptr_type_node, method_symbols_array_ptr_type, method_type_node, nreverse(), null_pointer_node, NULL_TREE, object_type_node, optimize, otable_decl, otable_methods, otable_ptr_type, otable_syms_decl, POINTER_SIZE, ptr_type_node, PUSH_FIELD_VALUE, PUSH_SUPER_VALUE, rest_of_decl_compilation(), size_in_bytes(), START_RECORD_CONSTRUCTOR, string_ptr_type_node, TREE_CHAIN, tree_cons, TREE_OPERAND, TREE_PUBLIC, TREE_STATIC, TREE_TYPE, TREE_VEC_ELT, TREE_VEC_LENGTH, TYPE_BINFO_BASETYPES, TYPE_FIELDS, TYPE_METHODS, TYPE_NAME, and TYPE_NVIRTUALS.

Referenced by finish_class().

static tree make_field_value ( tree  fdecl  )  [static]

static tree make_method_value ( tree  mdecl  )  [static]

tree mangled_classname ( char *  prefix,
tree  type 
) const

tree maybe_add_interface ( tree  this_class,
tree  interface_class 
)

static tree maybe_layout_super_class ( tree  super_class,
tree  this_class 
) [static]

static assume_compiled_node* find_assume_compiled_node PARAMS ( (assume_compiled_node *, const char *)   )  [static]

static struct hash_entry* init_test_hash_newfunc PARAMS ( (struct hash_entry *, struct hash_table *, hash_table_key  )  [static, read]

static int assume_compiled PARAMS ( (const char *)   )  [static, read]

Definition at line 635 of file mips-tfile.c.

static tree get_dispatch_table PARAMS ( (tree, tree  )  [static]

static int32 hashUtf8String PARAMS ( (const char *, int)   )  [static]

static tree build_java_method_type PARAMS ( (tree, tree, int)   )  [static]

static tree make_method_value PARAMS ( (tree  )  [static]

tree push_class ( tree  class_type,
tree  class_name 
)

void push_super_field ( tree  this_class,
tree  super_class 
)

void register_class (  ) 

void set_class_decl_access_flags ( int  access_flags,
tree  class_decl 
)

void set_constant_value ( tree  field,
tree  constant 
)

void set_super_info ( int  access_flags,
tree  this_class,
tree  super_class,
int  interfaces_count 
)

tree unmangle_classname ( char *  name,
int  name_length 
) const


Variable Documentation

Definition at line 96 of file class.c.

tree class_roots[5] = { NULL_TREE, NULL_TREE, NULL_TREE, NULL_TREE, NULL_TREE } [static]

Definition at line 99 of file class.c.

Referenced by init_class_processing().

Definition at line 63 of file class.c.

Definition at line 64 of file class.c.

Definition at line 67 of file class.c.

tree utf8_decl_list = NULL_TREE

Definition at line 961 of file class.c.


Generated on Wed Apr 8 15:27:34 2009 for Open64 by  doxygen 1.5.6