CodeIterator Class Reference

#include <codeIterator.hpp>

Inheritance diagram for CodeIterator:

Inheritance graph
[legend]
Collaboration diagram for CodeIterator:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 CodeIterator (methodOop method, int startBCI=1)
 CodeIterator (u_char *hp)
bool advance ()
u_char byte_at (int offset_from_instruction)
oop oop_at (int offset_from_instruction)
int word_at (int offset_from_instruction)
Bytecodes::Code code () const
Bytecodes::CodeType code_type () const
Bytecodes::Format format () const
Bytecodes::SendType send () const
Bytecodes::ArgumentSpec argumentsType () const
bool pop_result () const
Bytecodes::LoopType loopType () const
int bci () const
int next_bci () const
u_charhp () const
u_charnext_hp () const
char * interpreter_return_point (bool restore_value=false) const
void set_bci (int bci)
oopaligned_oop (int offset_from_instruction)
bool is_message_send () const
bool is_primitive_call () const
bool is_dll_call () const
oopblock_method_addr ()
methodOop block_method ()
void customize_class_var_code (klassOop to_klass)
void recustomize_class_var_code (klassOop from_klass, klassOop to_klass)
void uncustomize_class_var_code (klassOop from_klass)
void customize_inst_var_code (klassOop to_klass)
void recustomize_inst_var_code (klassOop from_klass, klassOop to_klass)
void uncustomize_inst_var_code (klassOop from_klass)
InterpretedICic ()
InterpretedPrim_Cacheprim_cache ()
InterpretedDLL_Cachedll_cache ()
void set_code (u_char code)

Private Member Functions

void align ()
u_charalign (u_char *p) const

Private Attributes

methodOop method
u_charcurrent
u_charend

Detailed Description

Definition at line 27 of file codeIterator.hpp.


Constructor & Destructor Documentation

CodeIterator::CodeIterator ( methodOop  method,
int  startBCI = 1 
)

Definition at line 42 of file codeIterator.cpp.

References assert, methodOopDesc::codes_end(), end, method, oopSize, and set_bci().

Here is the call graph for this function:

CodeIterator::CodeIterator ( u_char hp  ) 

Definition at line 50 of file codeIterator.cpp.

References methodOopDesc::codes_end(), current, end, method, and methodOopDesc::methodOop_from_hcode().

Here is the call graph for this function:


Member Function Documentation

bool CodeIterator::advance (  )  [inline]

Definition at line 43 of file codeIterator.hpp.

References current, end, and next_hp().

Referenced by methodOopDesc::decay_invocation_count(), methodOopDesc::fileout_body(), methodKlass::oop_follow_contents(), methodKlass::oop_layout_iterate(), and methodKlass::oop_oop_iterate().

Here is the call graph for this function:

u_char* CodeIterator::align ( u_char p  )  const [inline, private]

Definition at line 34 of file codeIterator.hpp.

void CodeIterator::align (  )  [inline, private]

Definition at line 37 of file codeIterator.cpp.

References current.

Referenced by aligned_oop(), dll_cache(), ic(), and next_hp().

oop* CodeIterator::aligned_oop ( int  offset_from_instruction  )  [inline]

Definition at line 72 of file codeIterator.hpp.

References align(), and current.

Referenced by block_method_addr(), customize_class_var_code(), customize_inst_var_code(), oop_at(), methodKlass::oop_follow_contents(), methodKlass::oop_oop_iterate(), recustomize_class_var_code(), recustomize_inst_var_code(), uncustomize_class_var_code(), uncustomize_inst_var_code(), and word_at().

Here is the call graph for this function:

Bytecodes::ArgumentSpec CodeIterator::argumentsType (  )  const [inline]

Definition at line 57 of file codeIterator.hpp.

References Bytecodes::argument_spec(), and code().

Referenced by interpreter_return_point().

Here is the call graph for this function:

int CodeIterator::bci (  )  const

Definition at line 62 of file codeIterator.cpp.

References methodOopDesc::codes(), current, and method.

Here is the call graph for this function:

methodOop CodeIterator::block_method (  ) 

Definition at line 212 of file codeIterator.cpp.

References code(), oop_at(), Bytecodes::push_new_closure_context_0, Bytecodes::push_new_closure_context_1, Bytecodes::push_new_closure_context_2, Bytecodes::push_new_closure_context_n, Bytecodes::push_new_closure_tos_0, Bytecodes::push_new_closure_tos_1, Bytecodes::push_new_closure_tos_2, and Bytecodes::push_new_closure_tos_n.

Here is the call graph for this function:

oop * CodeIterator::block_method_addr (  ) 

Definition at line 196 of file codeIterator.cpp.

References aligned_oop(), code(), Bytecodes::push_new_closure_context_0, Bytecodes::push_new_closure_context_1, Bytecodes::push_new_closure_context_2, Bytecodes::push_new_closure_context_n, Bytecodes::push_new_closure_tos_0, Bytecodes::push_new_closure_tos_1, Bytecodes::push_new_closure_tos_2, and Bytecodes::push_new_closure_tos_n.

Here is the call graph for this function:

u_char CodeIterator::byte_at ( int  offset_from_instruction  )  [inline]

Definition at line 49 of file codeIterator.hpp.

References current.

Referenced by methodOopDesc::fileout_body(), and IfNode::IfNode().

Bytecodes::Code CodeIterator::code (  )  const [inline]

Definition at line 53 of file codeIterator.hpp.

References current.

Referenced by argumentsType(), block_method(), block_method_addr(), code_type(), customize_class_var_code(), customize_inst_var_code(), methodOopDesc::decay_invocation_count(), methodOopDesc::fileout_body(), format(), InterpretedPrim_Cache::has_failure_code(), InterpretedPrim_Cache::has_receiver(), IfNode::IfNode(), interpreter_return_point(), is_dll_call(), is_message_send(), is_primitive_call(), loopType(), InterpretedPrim_Cache::name(), InterpretedPrim_Cache::pdesc(), pop_result(), recustomize_class_var_code(), recustomize_inst_var_code(), send(), uncustomize_class_var_code(), uncustomize_inst_var_code(), and WhileNode::WhileNode().

Bytecodes::CodeType CodeIterator::code_type (  )  const [inline]

Definition at line 54 of file codeIterator.hpp.

References code(), and Bytecodes::code_type().

Here is the call graph for this function:

void CodeIterator::customize_class_var_code ( klassOop  to_klass  ) 

Definition at line 228 of file codeIterator.cpp.

References aligned_oop(), assert, code(), oopDesc::is_symbol(), klassOopDesc::klass_part(), Klass::lookup_class_var(), Bytecodes::push_classVar, Bytecodes::push_classVar_name, set_code(), Universe::store(), Bytecodes::store_classVar, Bytecodes::store_classVar_name, Bytecodes::store_classVar_pop, and Bytecodes::store_classVar_pop_name.

Here is the call graph for this function:

void CodeIterator::customize_inst_var_code ( klassOop  to_klass  ) 

Definition at line 279 of file codeIterator.cpp.

References aligned_oop(), as_smiOop(), assert, code(), oopDesc::is_symbol(), klassOopDesc::klass_part(), Klass::lookup_inst_var(), Bytecodes::push_instVar, Bytecodes::push_instVar_name, Bytecodes::return_instVar, Bytecodes::return_instVar_name, set_code(), Universe::store(), Bytecodes::store_instVar, Bytecodes::store_instVar_name, Bytecodes::store_instVar_pop, and Bytecodes::store_instVar_pop_name.

Here is the call graph for this function:

InterpretedDLL_Cache * CodeIterator::dll_cache (  ) 

Definition at line 109 of file codeIterator.cpp.

References align(), and current.

Referenced by methodOopDesc::fileout_body(), DLLs::lookup_and_patch_InterpretedDLL_Cache(), and StubRoutines::trace_DLL_call_1().

Here is the call graph for this function:

Bytecodes::Format CodeIterator::format (  )  const [inline]

Definition at line 55 of file codeIterator.hpp.

References code(), and Bytecodes::format().

Referenced by methodOopDesc::fileout_body(), ic(), next_hp(), methodKlass::oop_follow_contents(), and methodKlass::oop_oop_iterate().

Here is the call graph for this function:

u_char* CodeIterator::hp (  )  const [inline]

Definition at line 62 of file codeIterator.hpp.

References current.

Referenced by methodOopDesc::fileout_body().

InterpretedIC * CodeIterator::ic (  ) 

Definition at line 98 of file codeIterator.cpp.

References align(), Bytecodes::BBLO, Bytecodes::BBOO, Bytecodes::BLO, Bytecodes::BOO, current, and format().

Referenced by methodOopDesc::fileout_body().

Here is the call graph for this function:

char * CodeIterator::interpreter_return_point ( bool  restore_value = false  )  const

Definition at line 138 of file codeIterator.cpp.

References Bytecodes::args_only, argumentsType(), code(), deoptimized_return_from_dll_call(), deoptimized_return_from_dll_call_restore(), deoptimized_return_from_primitive_call_with_failure_block(), deoptimized_return_from_primitive_call_with_failure_block_restore(), deoptimized_return_from_primitive_call_without_failure_block(), deoptimized_return_from_primitive_call_without_failure_block_restore(), deoptimized_return_from_send_with_receiver(), deoptimized_return_from_send_with_receiver_pop(), deoptimized_return_from_send_with_receiver_pop_restore(), deoptimized_return_from_send_with_receiver_restore(), deoptimized_return_from_send_without_receiver(), deoptimized_return_from_send_without_receiver_pop(), deoptimized_return_from_send_without_receiver_pop_restore(), deoptimized_return_from_send_without_receiver_restore(), is_dll_call(), is_message_send(), is_primitive_call(), pop_result(), Bytecodes::prim_call, Bytecodes::prim_call_failure, Bytecodes::prim_call_failure_lookup, Bytecodes::prim_call_lookup, Bytecodes::prim_call_self, Bytecodes::prim_call_self_failure, Bytecodes::prim_call_self_failure_lookup, Bytecodes::prim_call_self_lookup, Bytecodes::recv_0_args, Bytecodes::recv_1_args, Bytecodes::recv_2_args, Bytecodes::recv_n_args, and ShouldNotReachHere.

Here is the call graph for this function:

bool CodeIterator::is_dll_call (  )  const [inline]

Definition at line 78 of file codeIterator.hpp.

References code(), Bytecodes::code_type(), and Bytecodes::dll_call.

Referenced by methodOopDesc::fileout_body(), and interpreter_return_point().

Here is the call graph for this function:

bool CodeIterator::is_message_send (  )  const [inline]

Definition at line 76 of file codeIterator.hpp.

References code(), Bytecodes::code_type(), and Bytecodes::message_send.

Referenced by interpreter_return_point().

Here is the call graph for this function:

bool CodeIterator::is_primitive_call (  )  const [inline]

Definition at line 77 of file codeIterator.hpp.

References code(), Bytecodes::code_type(), and Bytecodes::primitive_call.

Referenced by methodOopDesc::fileout_body(), and interpreter_return_point().

Here is the call graph for this function:

Bytecodes::LoopType CodeIterator::loopType (  )  const [inline]

Definition at line 59 of file codeIterator.hpp.

References code(), and Bytecodes::loop_type().

Here is the call graph for this function:

int CodeIterator::next_bci (  )  const

Definition at line 67 of file codeIterator.cpp.

References methodOopDesc::codes(), method, and next_hp().

Referenced by WhileNode::WhileNode().

Here is the call graph for this function:

u_char * CodeIterator::next_hp (  )  const

Definition at line 72 of file codeIterator.cpp.

References align(), Bytecodes::B, Bytecodes::BB, Bytecodes::BBB, Bytecodes::BBBB, Bytecodes::BBL, Bytecodes::BBLO, Bytecodes::BBO, Bytecodes::BBOO, Bytecodes::BBS, Bytecodes::BL, Bytecodes::BLB, Bytecodes::BLL, Bytecodes::BLO, Bytecodes::BO, Bytecodes::BOL, Bytecodes::BOO, Bytecodes::BOOLB, current, end, format(), oopSize, and ShouldNotReachHere.

Referenced by advance(), and next_bci().

Here is the call graph for this function:

oop CodeIterator::oop_at ( int  offset_from_instruction  )  [inline]

Definition at line 50 of file codeIterator.hpp.

References aligned_oop().

Referenced by block_method(), methodOopDesc::decay_invocation_count(), methodOopDesc::fileout_body(), InterpretedPrim_Cache::name(), and InterpretedPrim_Cache::pdesc().

Here is the call graph for this function:

bool CodeIterator::pop_result (  )  const [inline]

Definition at line 58 of file codeIterator.hpp.

References code(), and Bytecodes::pop_tos().

Referenced by interpreter_return_point().

Here is the call graph for this function:

InterpretedPrim_Cache * CodeIterator::prim_cache (  ) 

Definition at line 113 of file codeIterator.cpp.

References current.

void CodeIterator::recustomize_class_var_code ( klassOop  from_klass,
klassOop  to_klass 
)

Definition at line 260 of file codeIterator.cpp.

References aligned_oop(), assert, code(), oopDesc::is_association(), associationOopDesc::key(), klassOopDesc::klass_part(), Klass::lookup_class_var(), Bytecodes::push_classVar, Bytecodes::push_classVar_name, set_code(), Universe::store(), Bytecodes::store_classVar, Bytecodes::store_classVar_name, Bytecodes::store_classVar_pop, and Bytecodes::store_classVar_pop_name.

Here is the call graph for this function:

void CodeIterator::recustomize_inst_var_code ( klassOop  from_klass,
klassOop  to_klass 
)

Definition at line 318 of file codeIterator.cpp.

References aligned_oop(), as_smiOop(), assert, code(), fatal, Klass::inst_var_name_at(), klassOopDesc::klass_part(), Klass::lookup_inst_var(), Bytecodes::push_instVar, Bytecodes::push_instVar_name, Bytecodes::return_instVar, Bytecodes::return_instVar_name, set_code(), Universe::store(), Bytecodes::store_instVar, Bytecodes::store_instVar_name, Bytecodes::store_instVar_pop, Bytecodes::store_instVar_pop_name, and smiOopDesc::value().

Here is the call graph for this function:

Bytecodes::SendType CodeIterator::send (  )  const [inline]

Definition at line 56 of file codeIterator.hpp.

References code(), and Bytecodes::send_type().

Here is the call graph for this function:

void CodeIterator::set_bci ( int  bci  ) 

Definition at line 57 of file codeIterator.cpp.

References methodOopDesc::codes(), current, and method.

Referenced by CodeIterator().

Here is the call graph for this function:

void CodeIterator::set_code ( u_char  code  )  [inline]

Definition at line 101 of file codeIterator.hpp.

References current.

Referenced by customize_class_var_code(), customize_inst_var_code(), recustomize_class_var_code(), recustomize_inst_var_code(), uncustomize_class_var_code(), and uncustomize_inst_var_code().

void CodeIterator::uncustomize_class_var_code ( klassOop  from_klass  ) 

Definition at line 246 of file codeIterator.cpp.

References aligned_oop(), assert, code(), oopDesc::is_association(), associationOopDesc::key(), Bytecodes::push_classVar, Bytecodes::push_classVar_name, set_code(), Universe::store(), Bytecodes::store_classVar, Bytecodes::store_classVar_name, Bytecodes::store_classVar_pop, and Bytecodes::store_classVar_pop_name.

Here is the call graph for this function:

void CodeIterator::uncustomize_inst_var_code ( klassOop  from_klass  ) 

Definition at line 298 of file codeIterator.cpp.

References aligned_oop(), assert, code(), fatal, Klass::inst_var_name_at(), klassOopDesc::klass_part(), Bytecodes::push_instVar, Bytecodes::push_instVar_name, Bytecodes::return_instVar, Bytecodes::return_instVar_name, set_code(), Universe::store(), Bytecodes::store_instVar, Bytecodes::store_instVar_name, Bytecodes::store_instVar_pop, Bytecodes::store_instVar_pop_name, and smiOopDesc::value().

Here is the call graph for this function:

int CodeIterator::word_at ( int  offset_from_instruction  )  [inline]

Definition at line 51 of file codeIterator.hpp.

References aligned_oop().

Referenced by methodOopDesc::fileout_body(), IfNode::IfNode(), InterpretedPrim_Cache::name(), and InterpretedPrim_Cache::pdesc().

Here is the call graph for this function:


Member Data Documentation

u_char* CodeIterator::current [private]

Definition at line 30 of file codeIterator.hpp.

Referenced by advance(), align(), aligned_oop(), bci(), byte_at(), code(), CodeIterator(), dll_cache(), hp(), ic(), next_hp(), prim_cache(), set_bci(), and set_code().

u_char* CodeIterator::end [private]

Definition at line 31 of file codeIterator.hpp.

Referenced by advance(), CodeIterator(), and next_hp().

methodOop CodeIterator::method [private]

Definition at line 29 of file codeIterator.hpp.

Referenced by bci(), CodeIterator(), next_bci(), and set_bci().


The documentation for this class was generated from the following files:
Generated on Mon Oct 9 13:51:27 2006 for Strongtalk VM by  doxygen 1.4.7