Method Struct Reference

#include <class_member.h>

Inheritance diagram for Method:

Class_Member List of all members.

Public Types

enum  State { ST_NotCompiled, ST_NotLinked = ST_NotCompiled, ST_Compiled, ST_Linked = ST_Compiled }

Public Member Functions

State get_state ()
void set_state (State st)
unsigned num_bc_exception_handlers () const
Handlerget_bc_exception_handler_info (unsigned eh_number)
void set_num_target_exception_handlers (JIT *jit, unsigned n)
unsigned get_num_target_exception_handlers (JIT *jit)
void set_target_exception_handler_info (JIT *jit, unsigned eh_number, void *start_ip, void *end_ip, void *handler_ip, Class *catch_clss, bool exc_obj_is_dead=false)
Target_Exception_Handler_Ptr get_target_exception_handler_info (JIT *jit, unsigned eh_num)
unsigned num_exceptions_method_can_throw ()
Stringget_exception_name (int n)
const Byte * get_byte_code_addr ()
unsigned get_byte_code_size ()
unsigned get_max_stack ()
unsigned get_max_locals ()
Arg_List_Iterator get_argument_list ()
unsigned get_num_arg_slots () const
unsigned get_num_args ()
unsigned get_num_ref_args ()
Java_Type get_return_java_type ()
Classget_return_class_type ()
void * get_indirect_address ()
void * get_code_addr ()
void set_code_addr (void *code_addr)
void add_vtable_patch (void *)
void apply_vtable_patches ()
NativeCodePtr get_registered_native_func ()
void set_registered_native_func (NativeCodePtr native_func)
void * allocate_code_block_mt (size_t size, size_t alignment, JIT *jit, unsigned heat, int id, Code_Allocation_Action action)
 This returns a block for jitted code.
void * allocate_rw_data_block (size_t size, size_t alignment, JIT *jit)
void * allocate_jit_info_block (size_t size, JIT *jit)
void * allocate_JIT_data_block (size_t size, JIT *jit, size_t alignment)
CodeChunkInfoget_first_JIT_specific_info ()
CodeChunkInfoget_JIT_specific_info_no_create (JIT *jit)
CodeChunkInfoget_chunk_info_mt (JIT *jit, int id)
 Find a chunk info for specific JIT.
CodeChunkInfoget_chunk_info_no_create_mt (JIT *jit, int id)
 Find a chunk info for specific JIT, or NULL if no chunk info is created for this JIT.
CodeChunkInfocreate_code_chunk_info_mt ()
 Allocate a new chunk info.
void register_jit_overridden_method_callback (JIT *jit_to_be_notified, void *callback_data)
void do_jit_overridden_method_callbacks (Method *overriding_method)
void register_jit_recompiled_method_callback (JIT *jit_to_be_notified, void *callback_data)
void do_jit_recompiled_method_callbacks ()
Method_Side_Effects get_side_effects ()
void set_side_effects (Method_Side_Effects mse)
Method_Signatureget_method_sig ()
void set_method_sig (Method_Signature *msig)
void set_position_in_vtable (unsigned index, unsigned offset)
 Sets index in vtable and offset from the base of vtable for this method.
 Method ()
void MethodClearInternals ()
bool is_synchronized ()
bool is_native ()
bool is_abstract ()
bool is_varargs ()
bool is_bridge ()
bool is_init ()
bool is_clinit ()
bool is_finalize ()
bool is_overridden ()
Boolean is_nop ()
unsigned get_index ()
bool is_fake_method ()
Methodget_real_intf_method ()
bool parse (Global_Env &env, Class *clss, ByteReader &cfs, bool is_trusted_cl)
void calculate_arguments_slot_num ()
unsigned calculate_size ()
unsigned get_num_param_annotations ()
AnnotationTableget_param_annotations (unsigned index)
unsigned get_num_invisible_param_annotations ()
AnnotationTableget_invisible_param_annotations (unsigned index)
AnnotationValueget_default_value ()
InlineInfo * get_inline_info ()
 Gets inlined methods information.
void add_inline_info_entry (Method *method, uint32 codeSize, void *codeAddr, uint32 mapLength, AddrLocation *addrLocationMap)
 Adds information about inlined method.
void send_inlined_method_load_events (Method *method)
 Sends JVMTI_EVENT_COMPILED_METHOD_LOAD event for every inline method recorded in this InlineInfo object.
unsigned get_line_number_table_size ()
bool get_line_number_entry (unsigned index, jlong *pc, jint *line)
unsigned get_local_var_table_size ()
bool get_local_var_entry (unsigned index, jlong *pc, jint *length, jint *slot, String **name, String **type, String **generic_type)
int get_line_number (uint16 bc)
void set_inline_assumption (JIT *jit, Method *caller)
void method_was_overridden ()
void lock ()
void unlock ()
uint32 get_pending_breakpoints ()
void insert_pending_breakpoint ()
void remove_pending_breakpoint ()
uint8 * get_stackmap ()

Public Attributes

Inline_Record * inline_records
Method_Change_Notification_Record_notify_override_records
Method_Change_Notification_Record_notify_recompiled_records
uint8 * m_stackmap
unsigned is_init: 1
unsigned is_clinit: 1
unsigned is_finalize: 1
unsigned is_overridden: 1
unsigned is_nop: 1

Friends

void add_new_fake_method (Class *clss, Class *example, unsigned *next)
void add_any_fake_methods (Class *clss)

Classes

struct  LocalVarOffset

Member Enumeration Documentation

enum Method::State

Enumerator:
ST_NotCompiled 
ST_NotLinked 
ST_Compiled 
ST_Linked 


Constructor & Destructor Documentation

Method.Method (  ) 


Member Function Documentation

State Method.get_state (  ) 

void Method.set_state ( State  st  ) 

unsigned Method.num_bc_exception_handlers (  )  const

Handler* Method.get_bc_exception_handler_info ( unsigned  eh_number  ) 

void Method.set_num_target_exception_handlers ( JIT *  jit,
unsigned  n 
)

unsigned Method.get_num_target_exception_handlers ( JIT *  jit  ) 

void Method.set_target_exception_handler_info ( JIT *  jit,
unsigned  eh_number,
void *  start_ip,
void *  end_ip,
void *  handler_ip,
Class catch_clss,
bool  exc_obj_is_dead = false 
)

Target_Exception_Handler_Ptr Method.get_target_exception_handler_info ( JIT *  jit,
unsigned  eh_num 
)

unsigned Method.num_exceptions_method_can_throw (  ) 

String* Method.get_exception_name ( int  n  ) 

const Byte* Method.get_byte_code_addr (  ) 

unsigned Method.get_byte_code_size (  ) 

unsigned Method.get_max_stack (  ) 

unsigned Method.get_max_locals (  ) 

Arg_List_Iterator Method.get_argument_list (  ) 

unsigned Method.get_num_arg_slots (  )  const

unsigned Method.get_num_args (  ) 

unsigned Method.get_num_ref_args (  ) 

Java_Type Method.get_return_java_type (  ) 

Class* Method.get_return_class_type (  ) 

void* Method.get_indirect_address (  ) 

void* Method.get_code_addr (  ) 

void Method.set_code_addr ( void *  code_addr  ) 

void Method.add_vtable_patch ( void *   ) 

void Method.apply_vtable_patches (  ) 

NativeCodePtr Method.get_registered_native_func (  ) 

void Method.set_registered_native_func ( NativeCodePtr  native_func  ) 

void* Method.allocate_code_block_mt ( size_t  size,
size_t  alignment,
JIT *  jit,
unsigned  heat,
int  id,
Code_Allocation_Action  action 
)

This returns a block for jitted code.

It is not used for native methods. It is safe to call this function from multiple threads.

void* Method.allocate_rw_data_block ( size_t  size,
size_t  alignment,
JIT *  jit 
)

void* Method.allocate_jit_info_block ( size_t  size,
JIT *  jit 
)

void* Method.allocate_JIT_data_block ( size_t  size,
JIT *  jit,
size_t  alignment 
)

CodeChunkInfo* Method.get_first_JIT_specific_info (  ) 

CodeChunkInfo* Method.get_JIT_specific_info_no_create ( JIT *  jit  ) 

CodeChunkInfo* Method.get_chunk_info_mt ( JIT *  jit,
int  id 
)

Find a chunk info for specific JIT.

If no chunk exist for this JIT, create and return one. This method is safe to call from multiple threads.

CodeChunkInfo* Method.get_chunk_info_no_create_mt ( JIT *  jit,
int  id 
)

Find a chunk info for specific JIT, or NULL if no chunk info is created for this JIT.

This method is safe to call from multiple threads.

CodeChunkInfo* Method.create_code_chunk_info_mt (  ) 

Allocate a new chunk info.

This method is safe to call from multiple threads.

void Method.register_jit_overridden_method_callback ( JIT *  jit_to_be_notified,
void *  callback_data 
)

void Method.do_jit_overridden_method_callbacks ( Method overriding_method  ) 

void Method.register_jit_recompiled_method_callback ( JIT *  jit_to_be_notified,
void *  callback_data 
)

void Method.do_jit_recompiled_method_callbacks (  ) 

Method_Side_Effects Method.get_side_effects (  ) 

void Method.set_side_effects ( Method_Side_Effects  mse  ) 

Method_Signature* Method.get_method_sig (  ) 

void Method.set_method_sig ( Method_Signature msig  ) 

void Method.set_position_in_vtable ( unsigned  index,
unsigned  offset 
)

Sets index in vtable and offset from the base of vtable for this method.

Parameters:
index - index in vtable
offset - for instance methods: offset from the base of vtable

void Method.MethodClearInternals (  ) 

bool Method.is_synchronized (  ) 

bool Method.is_native (  ) 

bool Method.is_abstract (  ) 

bool Method.is_varargs (  ) 

bool Method.is_bridge (  ) 

bool Method.is_init (  ) 

bool Method.is_clinit (  ) 

bool Method.is_finalize (  ) 

bool Method.is_overridden (  ) 

Boolean Method.is_nop (  ) 

unsigned Method.get_index (  ) 

bool Method.is_fake_method (  ) 

Method* Method.get_real_intf_method (  ) 

bool Method.parse ( Global_Env env,
Class clss,
ByteReader cfs,
bool  is_trusted_cl 
)

void Method.calculate_arguments_slot_num (  ) 

unsigned Method.calculate_size (  ) 

unsigned Method.get_num_param_annotations (  ) 

AnnotationTable* Method.get_param_annotations ( unsigned  index  ) 

unsigned Method.get_num_invisible_param_annotations (  ) 

AnnotationTable* Method.get_invisible_param_annotations ( unsigned  index  ) 

AnnotationValue* Method.get_default_value (  ) 

InlineInfo* Method.get_inline_info (  ) 

Gets inlined methods information.

Returns:
InlineInfo object pointer.

void Method.add_inline_info_entry ( Method method,
uint32  codeSize,
void *  codeAddr,
uint32  mapLength,
AddrLocation *  addrLocationMap 
)

Adds information about inlined method.

Parameters:
[in] method - method which is inlined
[in] codeSize - size of inlined code block
[in] codeAddr - size of inlined code block
[in] mapLength - number of AddrLocation elements in addrLocationMap
[in] addrLocationMap - native address to bytecode location correspondence table

void Method.send_inlined_method_load_events ( Method method  ) 

Sends JVMTI_EVENT_COMPILED_METHOD_LOAD event for every inline method recorded in this InlineInfo object.

Parameters:
[in] method - outer method this InlineInfo object belogs to.

unsigned Method.get_line_number_table_size (  ) 

bool Method.get_line_number_entry ( unsigned  index,
jlong pc,
jint *  line 
)

unsigned Method.get_local_var_table_size (  ) 

bool Method.get_local_var_entry ( unsigned  index,
jlong pc,
jint *  length,
jint *  slot,
String **  name,
String **  type,
String **  generic_type 
)

int Method.get_line_number ( uint16  bc  ) 

void Method.set_inline_assumption ( JIT *  jit,
Method caller 
)

void Method.method_was_overridden (  ) 

void Method.lock (  ) 

void Method.unlock (  ) 

uint32 Method.get_pending_breakpoints (  ) 

void Method.insert_pending_breakpoint (  ) 

void Method.remove_pending_breakpoint (  ) 

uint8* Method.get_stackmap (  ) 


Friends And Related Function Documentation

void add_new_fake_method ( Class clss,
Class example,
unsigned *  next 
) [friend]

Reimplemented from Class_Member.

void add_any_fake_methods ( Class clss  )  [friend]

Reimplemented from Class_Member.


Member Data Documentation

unsigned Method.is_init

unsigned Method.is_clinit

unsigned Method.is_finalize

unsigned Method.is_overridden

unsigned Method.is_nop

Inline_Record* Method.inline_records

Method_Change_Notification_Record* Method._notify_override_records

Method_Change_Notification_Record* Method._notify_recompiled_records

uint8* Method.m_stackmap


The documentation for this struct was generated from the following file:

Genereated on Tue Mar 11 19:26:03 2008 by Doxygen.

(c) Copyright 2005, 2008 The Apache Software Foundation or its licensors, as applicable.