annotate graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotObjectConstant.java @ 18283:b2eb7302706c

added HotSpotObjectConstant.getNodeClass()
author Doug Simon <doug.simon@oracle.com>
date Thu, 06 Nov 2014 13:26:33 +0100
parents ecf3de366ecc
children 29ba2a7cdfcb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15018
db4254246f9a Remove Constant.forObject and Constant.asObject to improve compiler/VM separation
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
1 /*
16094
c0b8d395368b Introduce LIRKind to accurately track oop references in backend.
Roland Schatz <roland.schatz@oracle.com>
parents: 15909
diff changeset
2 * Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.
15018
db4254246f9a Remove Constant.forObject and Constant.asObject to improve compiler/VM separation
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
db4254246f9a Remove Constant.forObject and Constant.asObject to improve compiler/VM separation
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
4 *
db4254246f9a Remove Constant.forObject and Constant.asObject to improve compiler/VM separation
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
db4254246f9a Remove Constant.forObject and Constant.asObject to improve compiler/VM separation
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
db4254246f9a Remove Constant.forObject and Constant.asObject to improve compiler/VM separation
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
7 * published by the Free Software Foundation.
db4254246f9a Remove Constant.forObject and Constant.asObject to improve compiler/VM separation
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
8 *
db4254246f9a Remove Constant.forObject and Constant.asObject to improve compiler/VM separation
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
db4254246f9a Remove Constant.forObject and Constant.asObject to improve compiler/VM separation
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
db4254246f9a Remove Constant.forObject and Constant.asObject to improve compiler/VM separation
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
db4254246f9a Remove Constant.forObject and Constant.asObject to improve compiler/VM separation
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
db4254246f9a Remove Constant.forObject and Constant.asObject to improve compiler/VM separation
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
13 * accompanied this code).
db4254246f9a Remove Constant.forObject and Constant.asObject to improve compiler/VM separation
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
14 *
db4254246f9a Remove Constant.forObject and Constant.asObject to improve compiler/VM separation
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
db4254246f9a Remove Constant.forObject and Constant.asObject to improve compiler/VM separation
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
db4254246f9a Remove Constant.forObject and Constant.asObject to improve compiler/VM separation
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
db4254246f9a Remove Constant.forObject and Constant.asObject to improve compiler/VM separation
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
18 *
db4254246f9a Remove Constant.forObject and Constant.asObject to improve compiler/VM separation
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
db4254246f9a Remove Constant.forObject and Constant.asObject to improve compiler/VM separation
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
db4254246f9a Remove Constant.forObject and Constant.asObject to improve compiler/VM separation
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
21 * questions.
db4254246f9a Remove Constant.forObject and Constant.asObject to improve compiler/VM separation
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
22 */
db4254246f9a Remove Constant.forObject and Constant.asObject to improve compiler/VM separation
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
23 package com.oracle.graal.hotspot.meta;
db4254246f9a Remove Constant.forObject and Constant.asObject to improve compiler/VM separation
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
24
db4254246f9a Remove Constant.forObject and Constant.asObject to improve compiler/VM separation
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
25 import com.oracle.graal.api.meta.*;
18283
b2eb7302706c added HotSpotObjectConstant.getNodeClass()
Doug Simon <doug.simon@oracle.com>
parents: 18282
diff changeset
26 import com.oracle.graal.graph.*;
15018
db4254246f9a Remove Constant.forObject and Constant.asObject to improve compiler/VM separation
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
27
db4254246f9a Remove Constant.forObject and Constant.asObject to improve compiler/VM separation
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
28 /**
db4254246f9a Remove Constant.forObject and Constant.asObject to improve compiler/VM separation
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
29 * Represents a constant non-{@code null} object reference, within the compiler and across the
db4254246f9a Remove Constant.forObject and Constant.asObject to improve compiler/VM separation
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
30 * compiler/runtime interface.
db4254246f9a Remove Constant.forObject and Constant.asObject to improve compiler/VM separation
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
31 */
18267
fa6c97ede679 added Remote interface and applied it to API types that will be proxied for the purpose of replay/remote compilation
Doug Simon <doug.simon@oracle.com>
parents: 18265
diff changeset
32 public interface HotSpotObjectConstant extends JavaValue, HotSpotConstant, VMConstant, Remote {
15018
db4254246f9a Remove Constant.forObject and Constant.asObject to improve compiler/VM separation
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
33
18262
f7d45e2426d4 converted HotSpotObjectConstant to an interface
Doug Simon <doug.simon@oracle.com>
parents: 18188
diff changeset
34 JavaConstant compress();
15909
e43591136d9f Support for compressed constants.
Roland Schatz <roland.schatz@oracle.com>
parents: 15018
diff changeset
35
18262
f7d45e2426d4 converted HotSpotObjectConstant to an interface
Doug Simon <doug.simon@oracle.com>
parents: 18188
diff changeset
36 JavaConstant uncompress();
18186
ef357effbda7 Backout of changeset 9a804ec7f707 (converted Constant and Value to be interfaces).
Roland Schatz <roland.schatz@oracle.com>
parents: 18176
diff changeset
37
18280
c7e0405a35d8 added HotSpotObjectConstant.getClassLoader()
Doug Simon <doug.simon@oracle.com>
parents: 18267
diff changeset
38 /**
c7e0405a35d8 added HotSpotObjectConstant.getClassLoader()
Doug Simon <doug.simon@oracle.com>
parents: 18267
diff changeset
39 * Gets the result of {@link Class#getClassLoader()} for the {@link Class} object represented by
c7e0405a35d8 added HotSpotObjectConstant.getClassLoader()
Doug Simon <doug.simon@oracle.com>
parents: 18267
diff changeset
40 * this constant.
c7e0405a35d8 added HotSpotObjectConstant.getClassLoader()
Doug Simon <doug.simon@oracle.com>
parents: 18267
diff changeset
41 *
c7e0405a35d8 added HotSpotObjectConstant.getClassLoader()
Doug Simon <doug.simon@oracle.com>
parents: 18267
diff changeset
42 * @return {@code null} if this constant does not represent a {@link Class} object
c7e0405a35d8 added HotSpotObjectConstant.getClassLoader()
Doug Simon <doug.simon@oracle.com>
parents: 18267
diff changeset
43 */
18282
ecf3de366ecc added HotSpotObjectConstant.getIdentityHashCode()
Doug Simon <doug.simon@oracle.com>
parents: 18280
diff changeset
44 @PureFunction
18280
c7e0405a35d8 added HotSpotObjectConstant.getClassLoader()
Doug Simon <doug.simon@oracle.com>
parents: 18267
diff changeset
45 JavaConstant getClassLoader();
18282
ecf3de366ecc added HotSpotObjectConstant.getIdentityHashCode()
Doug Simon <doug.simon@oracle.com>
parents: 18280
diff changeset
46
ecf3de366ecc added HotSpotObjectConstant.getIdentityHashCode()
Doug Simon <doug.simon@oracle.com>
parents: 18280
diff changeset
47 /**
ecf3de366ecc added HotSpotObjectConstant.getIdentityHashCode()
Doug Simon <doug.simon@oracle.com>
parents: 18280
diff changeset
48 * Gets the {@linkplain System#identityHashCode(Object) identity} has code for the object
ecf3de366ecc added HotSpotObjectConstant.getIdentityHashCode()
Doug Simon <doug.simon@oracle.com>
parents: 18280
diff changeset
49 * represented by this constant.
ecf3de366ecc added HotSpotObjectConstant.getIdentityHashCode()
Doug Simon <doug.simon@oracle.com>
parents: 18280
diff changeset
50 */
ecf3de366ecc added HotSpotObjectConstant.getIdentityHashCode()
Doug Simon <doug.simon@oracle.com>
parents: 18280
diff changeset
51 @PureFunction
ecf3de366ecc added HotSpotObjectConstant.getIdentityHashCode()
Doug Simon <doug.simon@oracle.com>
parents: 18280
diff changeset
52 int getIdentityHashCode();
18283
b2eb7302706c added HotSpotObjectConstant.getNodeClass()
Doug Simon <doug.simon@oracle.com>
parents: 18282
diff changeset
53
b2eb7302706c added HotSpotObjectConstant.getNodeClass()
Doug Simon <doug.simon@oracle.com>
parents: 18282
diff changeset
54 /**
b2eb7302706c added HotSpotObjectConstant.getNodeClass()
Doug Simon <doug.simon@oracle.com>
parents: 18282
diff changeset
55 * Gets the result of {@link NodeClass#get(Class)} for the {@link Class} object represented by
b2eb7302706c added HotSpotObjectConstant.getNodeClass()
Doug Simon <doug.simon@oracle.com>
parents: 18282
diff changeset
56 * this constant.
b2eb7302706c added HotSpotObjectConstant.getNodeClass()
Doug Simon <doug.simon@oracle.com>
parents: 18282
diff changeset
57 *
b2eb7302706c added HotSpotObjectConstant.getNodeClass()
Doug Simon <doug.simon@oracle.com>
parents: 18282
diff changeset
58 * @return {@code null} if this constant does not represent a {@link Class} object
b2eb7302706c added HotSpotObjectConstant.getNodeClass()
Doug Simon <doug.simon@oracle.com>
parents: 18282
diff changeset
59 */
b2eb7302706c added HotSpotObjectConstant.getNodeClass()
Doug Simon <doug.simon@oracle.com>
parents: 18282
diff changeset
60 JavaConstant getNodeClass();
15018
db4254246f9a Remove Constant.forObject and Constant.asObject to improve compiler/VM separation
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
61 }