annotate src/share/vm/shark/sharkType.hpp @ 1972:f95d63e2154a

6989984: Use standard include model for Hospot Summary: Replaced MakeDeps and the includeDB files with more standardized solutions. Reviewed-by: coleenp, kvn, kamg
author stefank
date Tue, 23 Nov 2010 13:22:55 -0800
parents d2ede61b7a12
children da91efe96a93
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1692
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
1 /*
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1692
diff changeset
2 * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
1692
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
3 * Copyright 2008, 2009 Red Hat, Inc.
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
5 *
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
6 * This code is free software; you can redistribute it and/or modify it
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
7 * under the terms of the GNU General Public License version 2 only, as
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
8 * published by the Free Software Foundation.
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
9 *
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
10 * This code is distributed in the hope that it will be useful, but WITHOUT
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
13 * version 2 for more details (a copy is included in the LICENSE file that
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
14 * accompanied this code).
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
15 *
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
16 * You should have received a copy of the GNU General Public License version
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
17 * 2 along with this work; if not, write to the Free Software Foundation,
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
18 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
19 *
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
20 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
21 * or visit www.oracle.com if you need additional information or have any
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
22 * questions.
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
23 *
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
24 */
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
25
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1692
diff changeset
26 #ifndef SHARE_VM_SHARK_SHARKTYPE_HPP
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1692
diff changeset
27 #define SHARE_VM_SHARK_SHARKTYPE_HPP
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1692
diff changeset
28
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1692
diff changeset
29 #include "ci/ciType.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1692
diff changeset
30 #include "memory/allocation.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1692
diff changeset
31 #include "shark/llvmHeaders.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1692
diff changeset
32 #include "shark/sharkContext.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1692
diff changeset
33 #include "utilities/globalDefinitions.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1692
diff changeset
34
1692
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
35 class SharkType : public AllStatic {
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
36 private:
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
37 static SharkContext& context() {
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
38 return SharkContext::current();
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
39 }
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
40
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
41 // Basic types
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
42 public:
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
43 static const llvm::Type* void_type() {
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
44 return context().void_type();
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
45 }
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
46 static const llvm::IntegerType* bit_type() {
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
47 return context().bit_type();
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
48 }
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
49 static const llvm::IntegerType* jbyte_type() {
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
50 return context().jbyte_type();
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
51 }
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
52 static const llvm::IntegerType* jshort_type() {
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
53 return context().jshort_type();
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
54 }
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
55 static const llvm::IntegerType* jint_type() {
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
56 return context().jint_type();
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
57 }
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
58 static const llvm::IntegerType* jlong_type() {
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
59 return context().jlong_type();
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
60 }
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
61 static const llvm::Type* jfloat_type() {
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
62 return context().jfloat_type();
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
63 }
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
64 static const llvm::Type* jdouble_type() {
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
65 return context().jdouble_type();
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
66 }
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
67 static const llvm::IntegerType* intptr_type() {
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
68 return context().intptr_type();
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
69 }
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
70
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
71 // Compound types
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
72 public:
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
73 static const llvm::PointerType* itableOffsetEntry_type() {
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
74 return context().itableOffsetEntry_type();
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
75 }
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
76 static const llvm::PointerType* jniEnv_type() {
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
77 return context().jniEnv_type();
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
78 }
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
79 static const llvm::PointerType* jniHandleBlock_type() {
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
80 return context().jniHandleBlock_type();
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
81 }
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
82 static const llvm::PointerType* klass_type() {
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
83 return context().klass_type();
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
84 }
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
85 static const llvm::PointerType* methodOop_type() {
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
86 return context().methodOop_type();
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
87 }
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
88 static const llvm::ArrayType* monitor_type() {
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
89 return context().monitor_type();
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
90 }
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
91 static const llvm::PointerType* oop_type() {
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
92 return context().oop_type();
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
93 }
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
94 static const llvm::PointerType* thread_type() {
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
95 return context().thread_type();
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
96 }
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
97 static const llvm::PointerType* zeroStack_type() {
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
98 return context().zeroStack_type();
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
99 }
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
100 static const llvm::FunctionType* entry_point_type() {
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
101 return context().entry_point_type();
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
102 }
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
103 static const llvm::FunctionType* osr_entry_point_type() {
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
104 return context().osr_entry_point_type();
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
105 }
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
106
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
107 // Mappings
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
108 public:
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
109 static const llvm::Type* to_stackType(BasicType type) {
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
110 return context().to_stackType(type);
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
111 }
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
112 static const llvm::Type* to_stackType(ciType* type) {
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
113 return to_stackType(type->basic_type());
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
114 }
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
115 static const llvm::Type* to_arrayType(BasicType type) {
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
116 return context().to_arrayType(type);
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
117 }
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
118 static const llvm::Type* to_arrayType(ciType* type) {
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
119 return to_arrayType(type->basic_type());
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
120 }
d2ede61b7a12 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
121 };
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1692
diff changeset
122
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1692
diff changeset
123 #endif // SHARE_VM_SHARK_SHARKTYPE_HPP