1 /* |
1 /* |
2 * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2019, Oracle and/or its affiliates. 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. |
108 |
108 |
109 |
109 |
110 address VtableStubs::find_stub(bool is_vtable_stub, int vtable_index) { |
110 address VtableStubs::find_stub(bool is_vtable_stub, int vtable_index) { |
111 assert(vtable_index >= 0, "must be positive"); |
111 assert(vtable_index >= 0, "must be positive"); |
112 |
112 |
113 VtableStub* s = ShareVtableStubs ? lookup(is_vtable_stub, vtable_index) : NULL; |
113 VtableStub* s = lookup(is_vtable_stub, vtable_index); |
114 if (s == NULL) { |
114 if (s == NULL) { |
115 if (is_vtable_stub) { |
115 if (is_vtable_stub) { |
116 s = create_vtable_stub(vtable_index); |
116 s = create_vtable_stub(vtable_index); |
117 } else { |
117 } else { |
118 s = create_itable_stub(vtable_index); |
118 s = create_itable_stub(vtable_index); |