src/share/vm/shark/sharkType.hpp

Tue, 27 Nov 2012 12:48:52 -0800

author
twisti
date
Tue, 27 Nov 2012 12:48:52 -0800
changeset 4314
2cd5e15048e6
parent 4037
da91efe96a93
child 6876
710a3c8b516e
permissions
-rw-r--r--

8003868: fix shark for latest HotSpot and LLVM
Reviewed-by: twisti
Contributed-by: Roman Kennke <rkennke@redhat.com>

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

mercurial