verify.cc (branch_prepass): Updated for change to exception handler type.

* verify.cc (branch_prepass): Updated for change to exception
	handler type.
	(verify_instructions_0): Likewise.
	* defineclass.cc (handleCodeAttribute): Initialize `prepared'.
	(handleExceptionTableEntry): Updated for change to exception
	handler type.
	* java/lang/Class.h (Class): Removed _Jv_InterpMethodInvocation.
	* include/java-interp.h (_Jv_InterpMethodInvocation): Removed.
	(union _Jv_InterpPC): New.
	(class _Jv_InterpException): Changed types to _Jv_InterpPC.
	(class _Jv_InterpMethod): Added new `prepared' field.
	(class _Jv_InterpMethod): Added `compile' method.  Removed
	`continue1' and `find_exception'.  Changed arguments to `run'.
	* interpret.cc (union insn_slot): New.
	(find_exception): Removed.
	(run_normal): Removed most logic.
	(run_synch_object): Likewise; also, use JvSynchronize.
	(run_synch_class): Likewise.
	(run): Removed.
	(continue1): Renamed as `run'.  Compile bytecode if required.
	Add new code to allow refinement of direct-threaded code at
	runtime.  Handle exceptions.
	(SAVE_PC): Removed.
	(compile): New method.
	(SET_ONE, SET_INSN, SET_INT, SET_DATUM): New defines.
	(NULLARRAYCHECK): Don't use SAVE_PC.
	(pc_t): New typedef.
	(TAKE_GOTO, GET1S, GET1U, GET2U, AVAL1U, AVAL2U, AVAL2UP,
	SKIP_GOTO, GOTO_VAL, PCVAL, AMPAMP): New macros.

From-SVN: r54968
This commit is contained in:
Tom Tromey 2002-06-24 20:38:47 +00:00 committed by Tom Tromey
parent 7691fc06fe
commit fdae83abe7
6 changed files with 1517 additions and 708 deletions

View file

@ -1258,6 +1258,7 @@ void _Jv_ClassReader::handleCodeAttribute
method->exc_count = exc_table_length;
method->defining_class = def;
method->self = &def->methods[method_index];
method->prepared = NULL;
// grab the byte code!
memcpy ((void*) method->bytecode (),
@ -1267,7 +1268,7 @@ void _Jv_ClassReader::handleCodeAttribute
def->interpreted_methods[method_index] = method;
}
void _Jv_ClassReader::handleExceptionTableEntry
void _Jv_ClassReader::handleExceptionTableEntry
(int method_index, int exc_index,
int start_pc, int end_pc, int handler_pc, int catch_type)
{
@ -1275,10 +1276,10 @@ void _Jv_ClassReader::handleExceptionTableEntry
(def->interpreted_methods[method_index]);
_Jv_InterpException *exc = method->exceptions ();
exc[exc_index].start_pc = start_pc;
exc[exc_index].end_pc = end_pc;
exc[exc_index].handler_pc = handler_pc;
exc[exc_index].handler_type = catch_type;
exc[exc_index].start_pc.i = start_pc;
exc[exc_index].end_pc.i = end_pc;
exc[exc_index].handler_pc.i = handler_pc;
exc[exc_index].handler_type.i = catch_type;
}
void _Jv_ClassReader::handleMethodsEnd ()