java-interp.h (insn_index): New declaration.

* include/java-interp.h (insn_index): New declaration.
        (num_insn_slots): New private variable.
        (get_line_table): New declaration.
        * interpret.cc (insn_index): New function.
        (get_line_table): New function.

From-SVN: r110411
This commit is contained in:
Keith Seitz 2006-01-30 21:20:40 +00:00 committed by Keith Seitz
parent f34312c23c
commit e939885ff5
3 changed files with 99 additions and 0 deletions

View file

@ -145,6 +145,7 @@ class _Jv_InterpMethod : public _Jv_MethodBase
_Jv_LineTableEntry *line_table;
void *prepared;
int number_insn_slots;
unsigned char* bytecode ()
{
@ -182,9 +183,24 @@ class _Jv_InterpMethod : public _Jv_MethodBase
// number info is unavailable.
int get_source_line(pc_t mpc);
#ifdef DIRECT_THREADED
// Convenience function for indexing bytecode PC/insn slots in
// line tables for JDWP
jlong insn_index (pc_t pc);
#endif
public:
static void dump_object(jobject o);
/* Get the line table for this method.
* start is the lowest index in the method
* end is the highest index in the method
* line_numbers is an array to hold the list of source line numbers
* code_indices is an array to hold the corresponding list of code indices
*/
void get_line_table (jlong& start, jlong& end, jintArray& line_numbers,
jlongArray& code_indices);
#ifdef DIRECT_THREADED
friend void _Jv_CompileMethod (_Jv_InterpMethod*);
#endif