Mercurial > hg > graal-jvmci-8
comparison src/share/vm/oops/arrayOop.hpp @ 6948:e522a00b91aa
Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/ after NPG - C++ build works
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Mon, 12 Nov 2012 23:14:12 +0100 |
parents | da91efe96a93 |
children | 7944aba7ba41 |
comparison
equal
deleted
inserted
replaced
6711:ae13cc658b80 | 6948:e522a00b91aa |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1997, 2012, 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. |
33 // in each instance, which we don't want. | 33 // in each instance, which we don't want. |
34 | 34 |
35 // The layout of array Oops is: | 35 // The layout of array Oops is: |
36 // | 36 // |
37 // markOop | 37 // markOop |
38 // klassOop // 32 bits if compressed but declared 64 in LP64. | 38 // Klass* // 32 bits if compressed but declared 64 in LP64. |
39 // length // shares klass memory or allocated after declared fields. | 39 // length // shares klass memory or allocated after declared fields. |
40 | 40 |
41 | 41 |
42 class arrayOopDesc : public oopDesc { | 42 class arrayOopDesc : public oopDesc { |
43 friend class VMStructs; | 43 friend class VMStructs; |
63 public: | 63 public: |
64 // The _length field is not declared in C++. It is allocated after the | 64 // The _length field is not declared in C++. It is allocated after the |
65 // declared nonstatic fields in arrayOopDesc if not compressed, otherwise | 65 // declared nonstatic fields in arrayOopDesc if not compressed, otherwise |
66 // it occupies the second half of the _klass field in oopDesc. | 66 // it occupies the second half of the _klass field in oopDesc. |
67 static int length_offset_in_bytes() { | 67 static int length_offset_in_bytes() { |
68 return UseCompressedOops ? klass_gap_offset_in_bytes() : | 68 return UseCompressedKlassPointers ? klass_gap_offset_in_bytes() : |
69 sizeof(arrayOopDesc); | 69 sizeof(arrayOopDesc); |
70 } | 70 } |
71 | 71 |
72 // Returns the offset of the first element. | 72 // Returns the offset of the first element. |
73 static int base_offset_in_bytes(BasicType type) { | 73 static int base_offset_in_bytes(BasicType type) { |