hotspot/src/share/vm/oops/typeArrayOop.hpp
author coleenp
Sat, 29 Sep 2012 06:40:00 -0400
changeset 13952 e3cf184080bc
parent 13728 882756847a04
child 22827 07d991d45a51
permissions -rw-r--r--
8000213: NPG: Should have renamed arrayKlass and typeArrayKlass Summary: Capitalize these metadata types (and objArrayKlass) Reviewed-by: stefank, twisti, kvn
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     1
/*
13728
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 10565
diff changeset
     2
 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     4
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
489c9b5090e2 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
489c9b5090e2 Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     8
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
489c9b5090e2 Initial load
duke
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
489c9b5090e2 Initial load
duke
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
489c9b5090e2 Initial load
duke
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
489c9b5090e2 Initial load
duke
parents:
diff changeset
    13
 * accompanied this code).
489c9b5090e2 Initial load
duke
parents:
diff changeset
    14
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
489c9b5090e2 Initial load
duke
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    18
 *
5547
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1
diff changeset
    21
 * questions.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    22
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    23
 */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    24
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    25
#ifndef SHARE_VM_OOPS_TYPEARRAYOOP_HPP
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    26
#define SHARE_VM_OOPS_TYPEARRAYOOP_HPP
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    27
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    28
#include "oops/arrayOop.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    29
#include "oops/typeArrayKlass.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    30
#ifdef TARGET_OS_ARCH_linux_x86
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    31
# include "orderAccess_linux_x86.inline.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    32
#endif
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    33
#ifdef TARGET_OS_ARCH_linux_sparc
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    34
# include "orderAccess_linux_sparc.inline.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    35
#endif
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    36
#ifdef TARGET_OS_ARCH_linux_zero
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    37
# include "orderAccess_linux_zero.inline.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    38
#endif
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    39
#ifdef TARGET_OS_ARCH_solaris_x86
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    40
# include "orderAccess_solaris_x86.inline.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    41
#endif
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    42
#ifdef TARGET_OS_ARCH_solaris_sparc
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    43
# include "orderAccess_solaris_sparc.inline.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    44
#endif
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    45
#ifdef TARGET_OS_ARCH_windows_x86
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    46
# include "orderAccess_windows_x86.inline.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    47
#endif
8107
78e5bd944384 7016023: Enable building ARM and PPC from src/closed repository
bobv
parents: 7397
diff changeset
    48
#ifdef TARGET_OS_ARCH_linux_arm
78e5bd944384 7016023: Enable building ARM and PPC from src/closed repository
bobv
parents: 7397
diff changeset
    49
# include "orderAccess_linux_arm.inline.hpp"
78e5bd944384 7016023: Enable building ARM and PPC from src/closed repository
bobv
parents: 7397
diff changeset
    50
#endif
78e5bd944384 7016023: Enable building ARM and PPC from src/closed repository
bobv
parents: 7397
diff changeset
    51
#ifdef TARGET_OS_ARCH_linux_ppc
78e5bd944384 7016023: Enable building ARM and PPC from src/closed repository
bobv
parents: 7397
diff changeset
    52
# include "orderAccess_linux_ppc.inline.hpp"
78e5bd944384 7016023: Enable building ARM and PPC from src/closed repository
bobv
parents: 7397
diff changeset
    53
#endif
10565
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents: 8921
diff changeset
    54
#ifdef TARGET_OS_ARCH_bsd_x86
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents: 8921
diff changeset
    55
# include "orderAccess_bsd_x86.inline.hpp"
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents: 8921
diff changeset
    56
#endif
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents: 8921
diff changeset
    57
#ifdef TARGET_OS_ARCH_bsd_zero
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents: 8921
diff changeset
    58
# include "orderAccess_bsd_zero.inline.hpp"
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents: 8921
diff changeset
    59
#endif
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    60
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    61
// A typeArrayOop is an array containing basic types (non oop elements).
489c9b5090e2 Initial load
duke
parents:
diff changeset
    62
// It is used for arrays of {characters, singles, doubles, bytes, shorts, integers, longs}
489c9b5090e2 Initial load
duke
parents:
diff changeset
    63
#include <limits.h>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    64
489c9b5090e2 Initial load
duke
parents:
diff changeset
    65
class typeArrayOopDesc : public arrayOopDesc {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    66
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    67
  jchar*    char_base()   const { return (jchar*)   base(T_CHAR); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    68
  jboolean* bool_base()   const { return (jboolean*)base(T_BOOLEAN); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    69
  jbyte*    byte_base()   const { return (jbyte*)   base(T_BYTE); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    70
  jint*     int_base()    const { return (jint*)    base(T_INT); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    71
  jlong*    long_base()   const { return (jlong*)   base(T_LONG); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    72
  jshort*   short_base()  const { return (jshort*)  base(T_SHORT); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    73
  jfloat*   float_base()  const { return (jfloat*)  base(T_FLOAT); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    74
  jdouble*  double_base() const { return (jdouble*) base(T_DOUBLE); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    75
13952
e3cf184080bc 8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents: 13728
diff changeset
    76
  friend class TypeArrayKlass;
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    77
489c9b5090e2 Initial load
duke
parents:
diff changeset
    78
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    79
  jbyte* byte_at_addr(int which) const {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    80
    assert(is_within_bounds(which), "index out of bounds");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    81
    return &byte_base()[which];
489c9b5090e2 Initial load
duke
parents:
diff changeset
    82
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    83
489c9b5090e2 Initial load
duke
parents:
diff changeset
    84
  jboolean* bool_at_addr(int which) const {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    85
    assert(is_within_bounds(which), "index out of bounds");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    86
    return &bool_base()[which];
489c9b5090e2 Initial load
duke
parents:
diff changeset
    87
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    88
489c9b5090e2 Initial load
duke
parents:
diff changeset
    89
  jchar* char_at_addr(int which) const {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    90
    assert(is_within_bounds(which), "index out of bounds");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    91
    return &char_base()[which];
489c9b5090e2 Initial load
duke
parents:
diff changeset
    92
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    93
489c9b5090e2 Initial load
duke
parents:
diff changeset
    94
  jint* int_at_addr(int which) const {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    95
    assert(is_within_bounds(which), "index out of bounds");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    96
    return &int_base()[which];
489c9b5090e2 Initial load
duke
parents:
diff changeset
    97
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    98
489c9b5090e2 Initial load
duke
parents:
diff changeset
    99
  jshort* short_at_addr(int which) const {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   100
    assert(is_within_bounds(which), "index out of bounds");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   101
    return &short_base()[which];
489c9b5090e2 Initial load
duke
parents:
diff changeset
   102
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   103
489c9b5090e2 Initial load
duke
parents:
diff changeset
   104
  jushort* ushort_at_addr(int which) const {  // for field descriptor arrays
489c9b5090e2 Initial load
duke
parents:
diff changeset
   105
    assert(is_within_bounds(which), "index out of bounds");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   106
    return (jushort*) &short_base()[which];
489c9b5090e2 Initial load
duke
parents:
diff changeset
   107
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   108
489c9b5090e2 Initial load
duke
parents:
diff changeset
   109
  jlong* long_at_addr(int which) const {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   110
    assert(is_within_bounds(which), "index out of bounds");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   111
    return &long_base()[which];
489c9b5090e2 Initial load
duke
parents:
diff changeset
   112
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   113
489c9b5090e2 Initial load
duke
parents:
diff changeset
   114
  jfloat* float_at_addr(int which) const {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   115
    assert(is_within_bounds(which), "index out of bounds");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   116
    return &float_base()[which];
489c9b5090e2 Initial load
duke
parents:
diff changeset
   117
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   118
489c9b5090e2 Initial load
duke
parents:
diff changeset
   119
  jdouble* double_at_addr(int which) const {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   120
    assert(is_within_bounds(which), "index out of bounds");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   121
    return &double_base()[which];
489c9b5090e2 Initial load
duke
parents:
diff changeset
   122
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   123
489c9b5090e2 Initial load
duke
parents:
diff changeset
   124
  jbyte byte_at(int which) const                  { return *byte_at_addr(which); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   125
  void byte_at_put(int which, jbyte contents)     { *byte_at_addr(which) = contents; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   126
489c9b5090e2 Initial load
duke
parents:
diff changeset
   127
  jboolean bool_at(int which) const               { return *bool_at_addr(which); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   128
  void bool_at_put(int which, jboolean contents)  { *bool_at_addr(which) = contents; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   129
489c9b5090e2 Initial load
duke
parents:
diff changeset
   130
  jchar char_at(int which) const                  { return *char_at_addr(which); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   131
  void char_at_put(int which, jchar contents)     { *char_at_addr(which) = contents; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   132
489c9b5090e2 Initial load
duke
parents:
diff changeset
   133
  jint int_at(int which) const                    { return *int_at_addr(which); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   134
  void int_at_put(int which, jint contents)       { *int_at_addr(which) = contents; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   135
489c9b5090e2 Initial load
duke
parents:
diff changeset
   136
  jshort short_at(int which) const                { return *short_at_addr(which); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   137
  void short_at_put(int which, jshort contents)   { *short_at_addr(which) = contents; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   138
489c9b5090e2 Initial load
duke
parents:
diff changeset
   139
  jushort ushort_at(int which) const              { return *ushort_at_addr(which); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   140
  void ushort_at_put(int which, jushort contents) { *ushort_at_addr(which) = contents; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   141
489c9b5090e2 Initial load
duke
parents:
diff changeset
   142
  jlong long_at(int which) const                  { return *long_at_addr(which); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   143
  void long_at_put(int which, jlong contents)     { *long_at_addr(which) = contents; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   144
489c9b5090e2 Initial load
duke
parents:
diff changeset
   145
  jfloat float_at(int which) const                { return *float_at_addr(which); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   146
  void float_at_put(int which, jfloat contents)   { *float_at_addr(which) = contents; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   147
489c9b5090e2 Initial load
duke
parents:
diff changeset
   148
  jdouble double_at(int which) const              { return *double_at_addr(which); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   149
  void double_at_put(int which, jdouble contents) { *double_at_addr(which) = contents; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   150
489c9b5090e2 Initial load
duke
parents:
diff changeset
   151
  jbyte byte_at_acquire(int which) const              { return OrderAccess::load_acquire(byte_at_addr(which)); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   152
  void release_byte_at_put(int which, jbyte contents) { OrderAccess::release_store(byte_at_addr(which), contents); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   153
13728
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 10565
diff changeset
   154
  // Java thinks metadata arrays are just arrays of either long or int, since
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 10565
diff changeset
   155
  // there doesn't seem to be T_ADDRESS, so this is a bit of unfortunate
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 10565
diff changeset
   156
  // casting
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 10565
diff changeset
   157
#ifdef _LP64
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 10565
diff changeset
   158
  Metadata* metadata_at(int which) const {
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 10565
diff changeset
   159
    return (Metadata*)*long_at_addr(which); }
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 10565
diff changeset
   160
  void metadata_at_put(int which, Metadata* contents) {
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 10565
diff changeset
   161
    *long_at_addr(which) = (long)contents;
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 10565
diff changeset
   162
  }
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 10565
diff changeset
   163
#else
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 10565
diff changeset
   164
  Metadata* metadata_at(int which) const {
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 10565
diff changeset
   165
    return (Metadata*)*int_at_addr(which); }
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 10565
diff changeset
   166
  void metadata_at_put(int which, Metadata* contents) {
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 10565
diff changeset
   167
    *int_at_addr(which) = (int)contents;
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 10565
diff changeset
   168
  }
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 10565
diff changeset
   169
#endif // _LP64
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 10565
diff changeset
   170
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   171
  // Sizing
489c9b5090e2 Initial load
duke
parents:
diff changeset
   172
489c9b5090e2 Initial load
duke
parents:
diff changeset
   173
  // Returns the number of words necessary to hold an array of "len"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   174
  // elements each of the given "byte_size".
489c9b5090e2 Initial load
duke
parents:
diff changeset
   175
 private:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   176
  static int object_size(int lh, int length) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   177
    int instance_header_size = Klass::layout_helper_header_size(lh);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   178
    int element_shift = Klass::layout_helper_log2_element_size(lh);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   179
    DEBUG_ONLY(BasicType etype = Klass::layout_helper_element_type(lh));
489c9b5090e2 Initial load
duke
parents:
diff changeset
   180
    assert(length <= arrayOopDesc::max_array_length(etype), "no overflow");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   181
489c9b5090e2 Initial load
duke
parents:
diff changeset
   182
    julong size_in_bytes = length;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   183
    size_in_bytes <<= element_shift;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   184
    size_in_bytes += instance_header_size;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   185
    julong size_in_words = ((size_in_bytes + (HeapWordSize-1)) >> LogHeapWordSize);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   186
    assert(size_in_words <= (julong)max_jint, "no overflow");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   187
489c9b5090e2 Initial load
duke
parents:
diff changeset
   188
    return align_object_size((intptr_t)size_in_words);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   189
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   190
489c9b5090e2 Initial load
duke
parents:
diff changeset
   191
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   192
  int object_size() {
13952
e3cf184080bc 8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents: 13728
diff changeset
   193
    TypeArrayKlass* tk = TypeArrayKlass::cast(klass());
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   194
    return object_size(tk->layout_helper(), length());
489c9b5090e2 Initial load
duke
parents:
diff changeset
   195
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   196
};
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
   197
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
   198
#endif // SHARE_VM_OOPS_TYPEARRAYOOP_HPP