equal
deleted
inserted
replaced
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. |
120 // Must share this for correct bootstrapping! |
120 // Must share this for correct bootstrapping! |
121 set_secondary_supers(Universe::the_array_interfaces_array()); |
121 set_secondary_supers(Universe::the_array_interfaces_array()); |
122 return NULL; |
122 return NULL; |
123 } |
123 } |
124 |
124 |
125 bool ArrayKlass::compute_is_subtype_of(Klass* k) { |
|
126 // An array is a subtype of Serializable, Clonable, and Object |
|
127 return k == SystemDictionary::Object_klass() |
|
128 || k == SystemDictionary::Cloneable_klass() |
|
129 || k == SystemDictionary::Serializable_klass(); |
|
130 } |
|
131 |
|
132 objArrayOop ArrayKlass::allocate_arrayArray(int n, int length, TRAPS) { |
125 objArrayOop ArrayKlass::allocate_arrayArray(int n, int length, TRAPS) { |
133 check_array_allocation_length(length, arrayOopDesc::max_array_length(T_ARRAY), CHECK_0); |
126 check_array_allocation_length(length, arrayOopDesc::max_array_length(T_ARRAY), CHECK_0); |
134 int size = objArrayOopDesc::object_size(length); |
127 int size = objArrayOopDesc::object_size(length); |
135 Klass* k = array_klass(n+dimension(), CHECK_0); |
128 Klass* k = array_klass(n+dimension(), CHECK_0); |
136 ArrayKlass* ak = ArrayKlass::cast(k); |
129 ArrayKlass* ak = ArrayKlass::cast(k); |