Mercurial > hg > truffle
annotate src/share/vm/gc_implementation/g1/heapRegionType.cpp @ 21209:629cc690c4c6
Fix instanceof with checking arrays of interface
author | Stefan Anzinger <stefan.anzinger@oracle.com> |
---|---|
date | Thu, 30 Apr 2015 18:09:36 +0200 |
parents | c02ec279b062 |
children |
rev | line source |
---|---|
20481
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
1 /* |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
2 * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
4 * |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
8 * |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
13 * accompanied this code). |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
14 * |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
18 * |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
21 * questions. |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
22 * |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
23 */ |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
24 |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
25 #include "precompiled.hpp" |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
26 #include "gc_implementation/g1/heapRegionType.hpp" |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
27 |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
28 bool HeapRegionType::is_valid(Tag tag) { |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
29 switch (tag) { |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
30 case FreeTag: |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
31 case EdenTag: |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
32 case SurvTag: |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
33 case HumStartsTag: |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
34 case HumContTag: |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
35 case OldTag: |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
36 return true; |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
37 } |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
38 return false; |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
39 } |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
40 |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
41 const char* HeapRegionType::get_str() const { |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
42 hrt_assert_is_valid(_tag); |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
43 switch (_tag) { |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
44 case FreeTag: return "FREE"; |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
45 case EdenTag: return "EDEN"; |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
46 case SurvTag: return "SURV"; |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
47 case HumStartsTag: return "HUMS"; |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
48 case HumContTag: return "HUMC"; |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
49 case OldTag: return "OLD"; |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
50 } |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
51 ShouldNotReachHere(); |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
52 // keep some compilers happy |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
53 return NULL; |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
54 } |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
55 |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
56 const char* HeapRegionType::get_short_str() const { |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
57 hrt_assert_is_valid(_tag); |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
58 switch (_tag) { |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
59 case FreeTag: return "F"; |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
60 case EdenTag: return "E"; |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
61 case SurvTag: return "S"; |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
62 case HumStartsTag: return "HS"; |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
63 case HumContTag: return "HC"; |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
64 case OldTag: return "O"; |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
65 } |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
66 ShouldNotReachHere(); |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
67 // keep some compilers happy |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
68 return NULL; |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
diff
changeset
|
69 } |