annotate jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotSymbol.java @ 23336:90da61843aa4

Backout removal of HotSpotVMSymbols class.
author Roland Schatz <roland.schatz@oracle.com>
date Fri, 25 Mar 2016 12:40:19 +0100
parents f8178417d018
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
14012
1f34717ccafa remove CompilerToVM.getInstanceFields
twisti
parents:
diff changeset
1 /*
23336
90da61843aa4 Backout removal of HotSpotVMSymbols class.
Roland Schatz <roland.schatz@oracle.com>
parents: 23322
diff changeset
2 * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
14012
1f34717ccafa remove CompilerToVM.getInstanceFields
twisti
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
1f34717ccafa remove CompilerToVM.getInstanceFields
twisti
parents:
diff changeset
4 *
1f34717ccafa remove CompilerToVM.getInstanceFields
twisti
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
1f34717ccafa remove CompilerToVM.getInstanceFields
twisti
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
1f34717ccafa remove CompilerToVM.getInstanceFields
twisti
parents:
diff changeset
7 * published by the Free Software Foundation.
1f34717ccafa remove CompilerToVM.getInstanceFields
twisti
parents:
diff changeset
8 *
1f34717ccafa remove CompilerToVM.getInstanceFields
twisti
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
1f34717ccafa remove CompilerToVM.getInstanceFields
twisti
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1f34717ccafa remove CompilerToVM.getInstanceFields
twisti
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
1f34717ccafa remove CompilerToVM.getInstanceFields
twisti
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
1f34717ccafa remove CompilerToVM.getInstanceFields
twisti
parents:
diff changeset
13 * accompanied this code).
1f34717ccafa remove CompilerToVM.getInstanceFields
twisti
parents:
diff changeset
14 *
1f34717ccafa remove CompilerToVM.getInstanceFields
twisti
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
1f34717ccafa remove CompilerToVM.getInstanceFields
twisti
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
1f34717ccafa remove CompilerToVM.getInstanceFields
twisti
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1f34717ccafa remove CompilerToVM.getInstanceFields
twisti
parents:
diff changeset
18 *
1f34717ccafa remove CompilerToVM.getInstanceFields
twisti
parents:
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
1f34717ccafa remove CompilerToVM.getInstanceFields
twisti
parents:
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
1f34717ccafa remove CompilerToVM.getInstanceFields
twisti
parents:
diff changeset
21 * questions.
1f34717ccafa remove CompilerToVM.getInstanceFields
twisti
parents:
diff changeset
22 */
22672
1bbd4a7c274b Rename jdk.internal.jvmci to jdk.vm.ci
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 22598
diff changeset
23 package jdk.vm.ci.hotspot;
14012
1f34717ccafa remove CompilerToVM.getInstanceFields
twisti
parents:
diff changeset
24
23322
f8178417d018 Expose SharedRuntime::throw_and_post_jvmti_exception to JVMCI compilers.
Roland Schatz <roland.schatz@oracle.com>
parents: 22672
diff changeset
25 import jdk.vm.ci.meta.Constant;
14012
1f34717ccafa remove CompilerToVM.getInstanceFields
twisti
parents:
diff changeset
26
1f34717ccafa remove CompilerToVM.getInstanceFields
twisti
parents:
diff changeset
27 /**
1f34717ccafa remove CompilerToVM.getInstanceFields
twisti
parents:
diff changeset
28 * Class to access the C++ {@code vmSymbols} table.
1f34717ccafa remove CompilerToVM.getInstanceFields
twisti
parents:
diff changeset
29 */
23322
f8178417d018 Expose SharedRuntime::throw_and_post_jvmti_exception to JVMCI compilers.
Roland Schatz <roland.schatz@oracle.com>
parents: 22672
diff changeset
30 public final class HotSpotSymbol implements MetaspaceWrapperObject {
f8178417d018 Expose SharedRuntime::throw_and_post_jvmti_exception to JVMCI compilers.
Roland Schatz <roland.schatz@oracle.com>
parents: 22672
diff changeset
31
f8178417d018 Expose SharedRuntime::throw_and_post_jvmti_exception to JVMCI compilers.
Roland Schatz <roland.schatz@oracle.com>
parents: 22672
diff changeset
32 private final String symbol;
f8178417d018 Expose SharedRuntime::throw_and_post_jvmti_exception to JVMCI compilers.
Roland Schatz <roland.schatz@oracle.com>
parents: 22672
diff changeset
33 private final long pointer;
f8178417d018 Expose SharedRuntime::throw_and_post_jvmti_exception to JVMCI compilers.
Roland Schatz <roland.schatz@oracle.com>
parents: 22672
diff changeset
34
f8178417d018 Expose SharedRuntime::throw_and_post_jvmti_exception to JVMCI compilers.
Roland Schatz <roland.schatz@oracle.com>
parents: 22672
diff changeset
35 HotSpotSymbol(String symbol, long pointer) {
f8178417d018 Expose SharedRuntime::throw_and_post_jvmti_exception to JVMCI compilers.
Roland Schatz <roland.schatz@oracle.com>
parents: 22672
diff changeset
36 this.symbol = symbol;
f8178417d018 Expose SharedRuntime::throw_and_post_jvmti_exception to JVMCI compilers.
Roland Schatz <roland.schatz@oracle.com>
parents: 22672
diff changeset
37 this.pointer = pointer;
f8178417d018 Expose SharedRuntime::throw_and_post_jvmti_exception to JVMCI compilers.
Roland Schatz <roland.schatz@oracle.com>
parents: 22672
diff changeset
38 }
f8178417d018 Expose SharedRuntime::throw_and_post_jvmti_exception to JVMCI compilers.
Roland Schatz <roland.schatz@oracle.com>
parents: 22672
diff changeset
39
f8178417d018 Expose SharedRuntime::throw_and_post_jvmti_exception to JVMCI compilers.
Roland Schatz <roland.schatz@oracle.com>
parents: 22672
diff changeset
40 public String getSymbol() {
f8178417d018 Expose SharedRuntime::throw_and_post_jvmti_exception to JVMCI compilers.
Roland Schatz <roland.schatz@oracle.com>
parents: 22672
diff changeset
41 return symbol;
f8178417d018 Expose SharedRuntime::throw_and_post_jvmti_exception to JVMCI compilers.
Roland Schatz <roland.schatz@oracle.com>
parents: 22672
diff changeset
42 }
f8178417d018 Expose SharedRuntime::throw_and_post_jvmti_exception to JVMCI compilers.
Roland Schatz <roland.schatz@oracle.com>
parents: 22672
diff changeset
43
f8178417d018 Expose SharedRuntime::throw_and_post_jvmti_exception to JVMCI compilers.
Roland Schatz <roland.schatz@oracle.com>
parents: 22672
diff changeset
44 public Constant asConstant() {
f8178417d018 Expose SharedRuntime::throw_and_post_jvmti_exception to JVMCI compilers.
Roland Schatz <roland.schatz@oracle.com>
parents: 22672
diff changeset
45 return HotSpotMetaspaceConstantImpl.forMetaspaceObject(this, false);
f8178417d018 Expose SharedRuntime::throw_and_post_jvmti_exception to JVMCI compilers.
Roland Schatz <roland.schatz@oracle.com>
parents: 22672
diff changeset
46 }
f8178417d018 Expose SharedRuntime::throw_and_post_jvmti_exception to JVMCI compilers.
Roland Schatz <roland.schatz@oracle.com>
parents: 22672
diff changeset
47
f8178417d018 Expose SharedRuntime::throw_and_post_jvmti_exception to JVMCI compilers.
Roland Schatz <roland.schatz@oracle.com>
parents: 22672
diff changeset
48 @Override
f8178417d018 Expose SharedRuntime::throw_and_post_jvmti_exception to JVMCI compilers.
Roland Schatz <roland.schatz@oracle.com>
parents: 22672
diff changeset
49 public long getMetaspacePointer() {
f8178417d018 Expose SharedRuntime::throw_and_post_jvmti_exception to JVMCI compilers.
Roland Schatz <roland.schatz@oracle.com>
parents: 22672
diff changeset
50 return pointer;
f8178417d018 Expose SharedRuntime::throw_and_post_jvmti_exception to JVMCI compilers.
Roland Schatz <roland.schatz@oracle.com>
parents: 22672
diff changeset
51 }
f8178417d018 Expose SharedRuntime::throw_and_post_jvmti_exception to JVMCI compilers.
Roland Schatz <roland.schatz@oracle.com>
parents: 22672
diff changeset
52
f8178417d018 Expose SharedRuntime::throw_and_post_jvmti_exception to JVMCI compilers.
Roland Schatz <roland.schatz@oracle.com>
parents: 22672
diff changeset
53 @Override
f8178417d018 Expose SharedRuntime::throw_and_post_jvmti_exception to JVMCI compilers.
Roland Schatz <roland.schatz@oracle.com>
parents: 22672
diff changeset
54 public String toString() {
f8178417d018 Expose SharedRuntime::throw_and_post_jvmti_exception to JVMCI compilers.
Roland Schatz <roland.schatz@oracle.com>
parents: 22672
diff changeset
55 return "Symbol<" + symbol + ">";
f8178417d018 Expose SharedRuntime::throw_and_post_jvmti_exception to JVMCI compilers.
Roland Schatz <roland.schatz@oracle.com>
parents: 22672
diff changeset
56 }
14012
1f34717ccafa remove CompilerToVM.getInstanceFields
twisti
parents:
diff changeset
57 }