1 /*
2 * Copyright (c) 2005, 2015, 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 *
750 // cleans up the marks
751 ~KlassDepChange();
752
753 // What kind of DepChange is this?
754 virtual bool is_klass_change() const { return true; }
755
756 Klass* new_type() { return _new_type(); }
757
758 // involves_context(k) is true if k is new_type or any of the super types
759 bool involves_context(Klass* k);
760 };
761
762
763 // A CallSite has changed its target.
764 class CallSiteDepChange : public DepChange {
765 private:
766 Handle _call_site;
767 Handle _method_handle;
768
769 public:
770 CallSiteDepChange(Handle call_site, Handle method_handle)
771 : _call_site(call_site),
772 _method_handle(method_handle)
773 {
774 assert(_call_site() ->is_a(SystemDictionary::CallSite_klass()), "must be");
775 assert(_method_handle.is_null() || _method_handle()->is_a(SystemDictionary::MethodHandle_klass()), "must be");
776 }
777
778 // What kind of DepChange is this?
779 virtual bool is_call_site_change() const { return true; }
780
781 oop call_site() const { return _call_site(); }
782 oop method_handle() const { return _method_handle(); }
783 };
784
785 #endif // SHARE_VM_CODE_DEPENDENCIES_HPP
|
1 /*
2 * Copyright (c) 2005, 2016, 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 *
750 // cleans up the marks
751 ~KlassDepChange();
752
753 // What kind of DepChange is this?
754 virtual bool is_klass_change() const { return true; }
755
756 Klass* new_type() { return _new_type(); }
757
758 // involves_context(k) is true if k is new_type or any of the super types
759 bool involves_context(Klass* k);
760 };
761
762
763 // A CallSite has changed its target.
764 class CallSiteDepChange : public DepChange {
765 private:
766 Handle _call_site;
767 Handle _method_handle;
768
769 public:
770 CallSiteDepChange(Handle call_site, Handle method_handle);
771
772 // What kind of DepChange is this?
773 virtual bool is_call_site_change() const { return true; }
774
775 oop call_site() const { return _call_site(); }
776 oop method_handle() const { return _method_handle(); }
777 };
778
779 #endif // SHARE_VM_CODE_DEPENDENCIES_HPP
|