Mercurial > hg > truffle
comparison src/share/vm/oops/methodOop.hpp @ 1152:cd37471eaecc
6914206: change way of permission checking for generated MethodHandle adapters
Summary: Put generated MH adapter in InvokeDynamic/MethodHandle classes to be able to indentify them easily in the compiler.
Reviewed-by: kvn, never, jrose
author | twisti |
---|---|
date | Fri, 08 Jan 2010 11:09:46 +0100 |
parents | dd57230ba8fe |
children | 5f24d0319e54 |
comparison
equal
deleted
inserted
replaced
1151:1271af4ec18c | 1152:cd37471eaecc |
---|---|
1 /* | 1 /* |
2 * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. | 2 * Copyright 1997-2010 Sun Microsystems, Inc. All Rights Reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
523 // Reflection support | 523 // Reflection support |
524 bool is_overridden_in(klassOop k) const; | 524 bool is_overridden_in(klassOop k) const; |
525 | 525 |
526 // JSR 292 support | 526 // JSR 292 support |
527 bool is_method_handle_invoke() const { return access_flags().is_method_handle_invoke(); } | 527 bool is_method_handle_invoke() const { return access_flags().is_method_handle_invoke(); } |
528 // Tests if this method is an internal adapter frame from the | |
529 // MethodHandleCompiler. | |
530 bool is_method_handle_adapter() const; | |
528 static methodHandle make_invoke_method(KlassHandle holder, | 531 static methodHandle make_invoke_method(KlassHandle holder, |
529 symbolHandle signature, | 532 symbolHandle signature, |
530 Handle method_type, | 533 Handle method_type, |
531 TRAPS); | 534 TRAPS); |
532 // these operate only on invoke methods: | 535 // these operate only on invoke methods: |
536 // method handles want to be able to push a few extra values (e.g., a bound receiver), and | 539 // method handles want to be able to push a few extra values (e.g., a bound receiver), and |
537 // invokedynamic sometimes needs to push a bootstrap method, call site, and arglist, | 540 // invokedynamic sometimes needs to push a bootstrap method, call site, and arglist, |
538 // all without checking for a stack overflow | 541 // all without checking for a stack overflow |
539 static int extra_stack_entries() { return (EnableMethodHandles ? (int)MethodHandlePushLimit : 0) + (EnableInvokeDynamic ? 3 : 0); } | 542 static int extra_stack_entries() { return (EnableMethodHandles ? (int)MethodHandlePushLimit : 0) + (EnableInvokeDynamic ? 3 : 0); } |
540 static int extra_stack_words(); // = extra_stack_entries() * Interpreter::stackElementSize() | 543 static int extra_stack_words(); // = extra_stack_entries() * Interpreter::stackElementSize() |
544 | |
541 // RedefineClasses() support: | 545 // RedefineClasses() support: |
542 bool is_old() const { return access_flags().is_old(); } | 546 bool is_old() const { return access_flags().is_old(); } |
543 void set_is_old() { _access_flags.set_is_old(); } | 547 void set_is_old() { _access_flags.set_is_old(); } |
544 bool is_obsolete() const { return access_flags().is_obsolete(); } | 548 bool is_obsolete() const { return access_flags().is_obsolete(); } |
545 void set_is_obsolete() { _access_flags.set_is_obsolete(); } | 549 void set_is_obsolete() { _access_flags.set_is_obsolete(); } |