annotate src/share/vm/shark/sharkType.hpp @ 3602:da91efe96a93

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