Mercurial > hg > truffle
diff src/share/vm/oops/methodOop.hpp @ 726:be93aad57795
6655646: dynamic languages need dynamically linked call sites
Summary: invokedynamic instruction (JSR 292 RI)
Reviewed-by: twisti, never
author | jrose |
---|---|
date | Tue, 21 Apr 2009 23:21:04 -0700 |
parents | e5b0439ef4ae |
children | 75596850f863 |
line wrap: on
line diff
--- a/src/share/vm/oops/methodOop.hpp Mon Apr 20 14:48:03 2009 -0700 +++ b/src/share/vm/oops/methodOop.hpp Tue Apr 21 23:21:04 2009 -0700 @@ -534,7 +534,10 @@ oop method_handle_type() const; static jint* method_type_offsets_chain(); // series of pointer-offsets, terminated by -1 // presize interpreter frames for extra interpreter stack entries, if needed - static int extra_stack_entries() { return EnableMethodHandles ? (int)MethodHandlePushLimit : 0; } + // method handles want to be able to push a few extra values (e.g., a bound receiver), and + // invokedynamic sometimes needs to push a bootstrap method, call site, and arglist, + // all without checking for a stack overflow + static int extra_stack_entries() { return (EnableMethodHandles ? (int)MethodHandlePushLimit : 0) + (EnableInvokeDynamic ? 3 : 0); } static int extra_stack_words(); // = extra_stack_entries() * Interpreter::stackElementSize() // RedefineClasses() support: bool is_old() const { return access_flags().is_old(); }