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. |
42 #include "oops/typeArrayKlass.inline.hpp" |
42 #include "oops/typeArrayKlass.inline.hpp" |
43 #include "oops/typeArrayOop.inline.hpp" |
43 #include "oops/typeArrayOop.inline.hpp" |
44 #include "runtime/handles.inline.hpp" |
44 #include "runtime/handles.inline.hpp" |
45 #include "utilities/macros.hpp" |
45 #include "utilities/macros.hpp" |
46 |
46 |
47 bool TypeArrayKlass::compute_is_subtype_of(Klass* k) { |
|
48 if (!k->is_typeArray_klass()) { |
|
49 return ArrayKlass::compute_is_subtype_of(k); |
|
50 } |
|
51 |
|
52 TypeArrayKlass* tak = TypeArrayKlass::cast(k); |
|
53 if (dimension() != tak->dimension()) return false; |
|
54 |
|
55 return element_type() == tak->element_type(); |
|
56 } |
|
57 |
|
58 TypeArrayKlass* TypeArrayKlass::create_klass(BasicType type, |
47 TypeArrayKlass* TypeArrayKlass::create_klass(BasicType type, |
59 const char* name_str, TRAPS) { |
48 const char* name_str, TRAPS) { |
60 Symbol* sym = NULL; |
49 Symbol* sym = NULL; |
61 if (name_str != NULL) { |
50 if (name_str != NULL) { |
62 sym = SymbolTable::new_permanent_symbol(name_str, CHECK_NULL); |
51 sym = SymbolTable::new_permanent_symbol(name_str, CHECK_NULL); |