1 /*
2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
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
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
686 return is_not_compilable(comp_level) || access_flags().is_not_osr_compilable();
687 }
688 void set_not_osr_compilable() { _access_flags.set_not_osr_compilable(); }
689 bool is_not_c1_compilable() const { return access_flags().is_not_c1_compilable(); }
690 void set_not_c1_compilable() { _access_flags.set_not_c1_compilable(); }
691 bool is_not_c2_compilable() const { return access_flags().is_not_c2_compilable(); }
692 void set_not_c2_compilable() { _access_flags.set_not_c2_compilable(); }
693
694 // Background compilation support
695 bool queued_for_compilation() const { return access_flags().queued_for_compilation(); }
696 void set_queued_for_compilation() { _access_flags.set_queued_for_compilation(); }
697 void clear_queued_for_compilation() { _access_flags.clear_queued_for_compilation(); }
698
699 // Resolve all classes in signature, return 'true' if successful
700 static bool load_signature_classes(methodHandle m, TRAPS);
701
702 // Return if true if not all classes references in signature, including return type, has been loaded
703 static bool has_unloaded_classes_in_signature(methodHandle m, TRAPS);
704
705 // Printing
706 void print_short_name(outputStream* st) /*PRODUCT_RETURN*/; // prints as klassname::methodname; Exposed so field engineers can debug VM
707 void print_name(outputStream* st) PRODUCT_RETURN; // prints as "virtual void foo(int)"
708
709 // Helper routine used for method sorting
710 static void sort_methods(objArrayOop methods,
711 objArrayOop methods_annotations,
712 objArrayOop methods_parameter_annotations,
713 objArrayOop methods_default_annotations,
714 bool idempotent = false);
715
716 // size of parameters
717 void set_size_of_parameters(int size) { _size_of_parameters = size; }
718 private:
719
720 // Inlined elements
721 address* native_function_addr() const { assert(is_native(), "must be native"); return (address*) (this+1); }
722 address* signature_handler_addr() const { return native_function_addr() + 1; }
723
724 // Garbage collection support
725 oop* adr_constMethod() const { return (oop*)&_constMethod; }
726 oop* adr_constants() const { return (oop*)&_constants; }
727 oop* adr_method_data() const { return (oop*)&_method_data; }
|
1 /*
2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
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
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
686 return is_not_compilable(comp_level) || access_flags().is_not_osr_compilable();
687 }
688 void set_not_osr_compilable() { _access_flags.set_not_osr_compilable(); }
689 bool is_not_c1_compilable() const { return access_flags().is_not_c1_compilable(); }
690 void set_not_c1_compilable() { _access_flags.set_not_c1_compilable(); }
691 bool is_not_c2_compilable() const { return access_flags().is_not_c2_compilable(); }
692 void set_not_c2_compilable() { _access_flags.set_not_c2_compilable(); }
693
694 // Background compilation support
695 bool queued_for_compilation() const { return access_flags().queued_for_compilation(); }
696 void set_queued_for_compilation() { _access_flags.set_queued_for_compilation(); }
697 void clear_queued_for_compilation() { _access_flags.clear_queued_for_compilation(); }
698
699 // Resolve all classes in signature, return 'true' if successful
700 static bool load_signature_classes(methodHandle m, TRAPS);
701
702 // Return if true if not all classes references in signature, including return type, has been loaded
703 static bool has_unloaded_classes_in_signature(methodHandle m, TRAPS);
704
705 // Printing
706 void print_short_name(outputStream* st); // prints as klassname::methodname; Exposed so field engineers can debug VM
707 void print_name(outputStream* st); // prints as "virtual void foo(int)"; exposed for TraceRedefineClasses
708
709 // Helper routine used for method sorting
710 static void sort_methods(objArrayOop methods,
711 objArrayOop methods_annotations,
712 objArrayOop methods_parameter_annotations,
713 objArrayOop methods_default_annotations,
714 bool idempotent = false);
715
716 // size of parameters
717 void set_size_of_parameters(int size) { _size_of_parameters = size; }
718 private:
719
720 // Inlined elements
721 address* native_function_addr() const { assert(is_native(), "must be native"); return (address*) (this+1); }
722 address* signature_handler_addr() const { return native_function_addr() + 1; }
723
724 // Garbage collection support
725 oop* adr_constMethod() const { return (oop*)&_constMethod; }
726 oop* adr_constants() const { return (oop*)&_constants; }
727 oop* adr_method_data() const { return (oop*)&_method_data; }
|