Tom Tromey
7db43d37b1
verify.cc (_Jv_BytecodeVerifier::branch_prepass): Skip a short, not a byte.
...
* verify.cc (_Jv_BytecodeVerifier::branch_prepass) [op_sipush]:
Skip a short, not a byte.
[op_newarray]: Skip a byte, not a short.
From-SVN: r47163
2001-11-19 02:13:08 +00:00
Tom Tromey
4c6d901a76
verify.cc (_Jv_BytecodeVerifier::get_type_val_for_signature): Added `B' case.
...
* verify.cc (_Jv_BytecodeVerifier::get_type_val_for_signature):
Added `B' case.
From-SVN: r47162
2001-11-19 01:37:28 +00:00
Tom Tromey
590077b070
verify.cc (_Jv_BytecodeVerifier::get_ushort): Use `jint' for temporary values.
...
* verify.cc (_Jv_BytecodeVerifier::get_ushort): Use `jint' for
temporary values.
(_Jv_BytecodeVerifier::get_short): Likewise.
(_Jv_BytecodeVerifier::get_int): Likewise.
(_Jv_BytecodeVerifier::check_return_type): Reverse ordering of
`compatible' call.
From-SVN: r47161
2001-11-19 01:04:15 +00:00
Tom Tromey
e7b35eec24
verify.cc (_Jv_BytecodeVerifier::pop_type): Put PC into error message.
...
* verify.cc (_Jv_BytecodeVerifier::pop_type): Put PC into error
message.
(_Jv_BytecodeVerifier::pop64): Likewise.
(_Jv_BytecodeVerifier::pop32): Likewise.
(_Jv_BytecodeVerifier::pop_raw): Likewise.
(_Jv_BytecodeVerifier::pop_type): Promote the match type.
(type::set_initialized): Only modify uninitialized types.
(type::set_uninitialized): Fix shadowing bug. Simplify code.
From-SVN: r47158
2001-11-19 00:31:37 +00:00
Tom Tromey
604407070b
verify.cc: Include StringBuffer.h.
...
* verify.cc: Include StringBuffer.h.
(verify_fail): Added pc argument. Use StringBuffer to construct
exception message.
(_Jv_BytecodeVerifier::verify_instructions_0): Put PC into error
message.
(_Jv_BytecodeVerifier::check_return_type): Likewise.
(_Jv_BytecodeVerifier::handle_field_or_method): Likewise.
(_Jv_BytecodeVerifier::check_constant): Likewise.
(_Jv_BytecodeVerifier::check_class_constant): Likewise.
(_Jv_BytecodeVerifier::check_pool_index): Likewise.
(_Jv_BytecodeVerifier::get_variable): Likewise.
(_Jv_BytecodeVerifier::branch_prepass): Likewise. Also, correctly
check exception handler endpoint.
(_Jv_BytecodeVerifier::verify_instructions_0): Correctly handle
wide arguments to current method.
(_Jv_BytecodeVerifier::check_wide_constant): New method.
(_Jv_BytecodeVerifier::verify_instructions_0) [op_ldc2_w]: Use
it.
From-SVN: r47155
2001-11-18 23:04:28 +00:00
Tom Tromey
b34e9a5b9f
verify.cc (_Jv_BytecodeVerifier::check_field_constant): Handle case where field has primitive type.
...
* verify.cc (_Jv_BytecodeVerifier::check_field_constant): Handle
case where field has primitive type.
From-SVN: r47112
2001-11-16 23:39:34 +00:00
Tom Tromey
f6b733ed1f
verify.cc (_Jv_BytecodeVerifier::is_assignable_from_slow): New method.
...
* verify.cc (_Jv_BytecodeVerifier::is_assignable_from_slow): New
method.
(type::compatible): Use it.
(type::merge): Likewise.
(type::promote): Return a `type&'.
(get_one_type): Promote return value.
From-SVN: r47097
2001-11-16 19:59:16 +00:00
Tom Tromey
f50e7a2d92
verify.cc (type::compatible): Use _Jv_IsAssignableFrom.
...
* verify.cc (type::compatible): Use _Jv_IsAssignableFrom.
(type::merge): Likewise.
From-SVN: r47077
2001-11-16 01:28:55 +00:00
Tom Tromey
6c5a8271d4
verify.cc (class _Jv_BytecodeVerifier): Fixed logic.
...
* verify.cc (class _Jv_BytecodeVerifier) [op_dup2]: Fixed logic.
[op_dup_x2]: Likewise.
[op_dup2_x1]: Likewise.
[op_dup2_x2]: Likewise.
(branch_prepass): Added `op_newarray' case. Updated unrecognized
instruction error.
(verify_instructions_0): Updated unrecognized instruction error.
From-SVN: r47033
2001-11-15 00:24:38 +00:00
Jeff Sturm
75b17b742a
* verify.cc: Wrap in #ifdef INTERPRETER...#endif.
...
From-SVN: r46882
2001-11-09 17:33:45 +00:00
Tom Tromey
b11946180d
* verify.cc (skip_padding): Fail if padding byte is nonzero.
...
From-SVN: r46830
2001-11-07 19:15:54 +00:00
Tom Tromey
a12fe13ddb
Class.h (Class): Made _Jv_BytecodeVerifier a friend.
...
* java/lang/Class.h (Class): Made _Jv_BytecodeVerifier a friend.
* Makefile.in: Rebuilt.
* Makefile.am (libgcj_la_SOURCES): Added verify.cc.
* verify.cc: New file.
* include/java-interp.h (_Jv_count_arguments): Declare.
(_Jv_VerifyMethod): Likewise.
(class _Jv_InterpMethod): Made _Jv_BytecodeVerifier a friend.
(class _Jv_InterpException): Likewise.
* resolve.cc (_Jv_count_arguments): Renamed from count_arguments.
No longer static. Updated callers.
* defineclass.cc (int_bits_to_float): Removed.
(long_bits_to_double): Likewise.
(prepare_pool_entry): Updated.
(handleCodeAttribute): Verify method (commented out for now).
From-SVN: r46796
2001-11-05 23:39:54 +00:00