diff -r 1d037ecd7960 -r e5b0439ef4ae src/cpu/sparc/vm/templateInterpreter_sparc.cpp --- a/src/cpu/sparc/vm/templateInterpreter_sparc.cpp Wed Apr 08 00:12:59 2009 -0700 +++ b/src/cpu/sparc/vm/templateInterpreter_sparc.cpp Wed Apr 08 10:56:49 2009 -0700 @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -108,6 +108,24 @@ } +// Arguments are: required type in G5_method_type, and +// failing object (or NULL) in G3_method_handle. +address TemplateInterpreterGenerator::generate_WrongMethodType_handler() { + address entry = __ pc(); + // expression stack must be empty before entering the VM if an exception + // happened + __ empty_expression_stack(); + // load exception object + __ call_VM(Oexception, + CAST_FROM_FN_PTR(address, + InterpreterRuntime::throw_WrongMethodTypeException), + G5_method_type, // required + G3_method_handle); // actual + __ should_not_reach_here(); + return entry; +} + + address TemplateInterpreterGenerator::generate_ArrayIndexOutOfBounds_handler(const char* name) { address entry = __ pc(); // expression stack must be empty before entering the VM if an exception happened @@ -448,6 +466,7 @@ const int extra_space = rounded_vm_local_words + // frame local scratch space + //6815692//methodOopDesc::extra_stack_words() + // extra push slots for MH adapters frame::memory_parameter_word_sp_offset + // register save area (native_call ? frame::interpreter_frame_extra_outgoing_argument_words : 0); @@ -1447,6 +1466,7 @@ round_to(callee_extra_locals * Interpreter::stackElementWords(), WordsPerLong); const int max_stack_words = max_stack * Interpreter::stackElementWords(); return (round_to((max_stack_words + //6815692//+ methodOopDesc::extra_stack_words() + rounded_vm_local_words + frame::memory_parameter_word_sp_offset), WordsPerLong) // already rounded