1.1 --- a/src/share/vm/oops/method.hpp Fri May 31 06:41:50 2013 +0200 1.2 +++ b/src/share/vm/oops/method.hpp Wed Apr 24 11:49:38 2013 +0200 1.3 @@ -671,13 +671,15 @@ 1.4 Symbol* signature, //anything at all 1.5 TRAPS); 1.6 static Klass* check_non_bcp_klass(Klass* klass); 1.7 - // these operate only on invoke methods: 1.8 + 1.9 + // How many extra stack entries for invokedynamic when it's enabled 1.10 + static const int extra_stack_entries_for_jsr292 = 1; 1.11 + 1.12 + // this operates only on invoke methods: 1.13 // presize interpreter frames for extra interpreter stack entries, if needed 1.14 - // method handles want to be able to push a few extra values (e.g., a bound receiver), and 1.15 - // invokedynamic sometimes needs to push a bootstrap method, call site, and arglist, 1.16 - // all without checking for a stack overflow 1.17 - static int extra_stack_entries() { return EnableInvokeDynamic ? 2 : 0; } 1.18 - static int extra_stack_words(); // = extra_stack_entries() * Interpreter::stackElementSize() 1.19 + // Account for the extra appendix argument for invokehandle/invokedynamic 1.20 + static int extra_stack_entries() { return EnableInvokeDynamic ? extra_stack_entries_for_jsr292 : 0; } 1.21 + static int extra_stack_words(); // = extra_stack_entries() * Interpreter::stackElementSize 1.22 1.23 // RedefineClasses() support: 1.24 bool is_old() const { return access_flags().is_old(); }