annotate graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotObjectConstant.java @ 19800:3362ba500371

Connect required Assumptions with answer to CHA query
author Tom Rodriguez <tom.rodriguez@oracle.com>
date Wed, 11 Mar 2015 17:32:04 -0700
parents 8fc336a04d77
children 51da1608115e
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
18286
ffcbc50063a3 added HotSpotObjectConstant.getCallSiteTarget()
Doug Simon <doug.simon@oracle.com>
parents: 18285
diff changeset
25 import java.lang.invoke.*;
18533
25a21e1794ec modified SnippetReflectionProvider to support both VM-side and compiler-side constants in a compilation replay context
Doug Simon <doug.simon@oracle.com>
parents: 18530
diff changeset
26 import java.util.*;
18286
ffcbc50063a3 added HotSpotObjectConstant.getCallSiteTarget()
Doug Simon <doug.simon@oracle.com>
parents: 18285
diff changeset
27
15018
db4254246f9a Remove Constant.forObject and Constant.asObject to improve compiler/VM separation
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
28 import com.oracle.graal.api.meta.*;
18287
b7461f7fa8a0 added HotSpotObjectConstant.getCompositeValueClass()
Doug Simon <doug.simon@oracle.com>
parents: 18286
diff changeset
29 import com.oracle.graal.lir.*;
15018
db4254246f9a Remove Constant.forObject and Constant.asObject to improve compiler/VM separation
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
30
db4254246f9a Remove Constant.forObject and Constant.asObject to improve compiler/VM separation
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
31 /**
db4254246f9a Remove Constant.forObject and Constant.asObject to improve compiler/VM separation
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
32 * 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
33 * compiler/runtime interface.
db4254246f9a Remove Constant.forObject and Constant.asObject to improve compiler/VM separation
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
34 */
18530
2906b3cc3e2f moved application of Remote marker interface to implementation classes only
Doug Simon <doug.simon@oracle.com>
parents: 18324
diff changeset
35 public interface HotSpotObjectConstant extends JavaConstant, HotSpotConstant, VMConstant {
15018
db4254246f9a Remove Constant.forObject and Constant.asObject to improve compiler/VM separation
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
36
18262
f7d45e2426d4 converted HotSpotObjectConstant to an interface
Doug Simon <doug.simon@oracle.com>
parents: 18188
diff changeset
37 JavaConstant compress();
15909
e43591136d9f Support for compressed constants.
Roland Schatz <roland.schatz@oracle.com>
parents: 15018
diff changeset
38
18262
f7d45e2426d4 converted HotSpotObjectConstant to an interface
Doug Simon <doug.simon@oracle.com>
parents: 18188
diff changeset
39 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
40
18289
7acff34abbf7 replaced HotSpotObjectConstantImpl.isCompressed() with HotSpotObjectConstant.isCompressed()
Doug Simon <doug.simon@oracle.com>
parents: 18288
diff changeset
41 boolean isCompressed();
7acff34abbf7 replaced HotSpotObjectConstantImpl.isCompressed() with HotSpotObjectConstant.isCompressed()
Doug Simon <doug.simon@oracle.com>
parents: 18288
diff changeset
42
18280
c7e0405a35d8 added HotSpotObjectConstant.getClassLoader()
Doug Simon <doug.simon@oracle.com>
parents: 18267
diff changeset
43 /**
18543
0ec7e37451c7 added HotSpotObjectConstant.getType() and restricted access to some static methods in HotSpotObjectConstantImpl
Doug Simon <doug.simon@oracle.com>
parents: 18533
diff changeset
44 * Gets the resolved Java type of the object represented by this constant.
0ec7e37451c7 added HotSpotObjectConstant.getType() and restricted access to some static methods in HotSpotObjectConstantImpl
Doug Simon <doug.simon@oracle.com>
parents: 18533
diff changeset
45 */
0ec7e37451c7 added HotSpotObjectConstant.getType() and restricted access to some static methods in HotSpotObjectConstantImpl
Doug Simon <doug.simon@oracle.com>
parents: 18533
diff changeset
46 HotSpotResolvedObjectType getType();
0ec7e37451c7 added HotSpotObjectConstant.getType() and restricted access to some static methods in HotSpotObjectConstantImpl
Doug Simon <doug.simon@oracle.com>
parents: 18533
diff changeset
47
0ec7e37451c7 added HotSpotObjectConstant.getType() and restricted access to some static methods in HotSpotObjectConstantImpl
Doug Simon <doug.simon@oracle.com>
parents: 18533
diff changeset
48 /**
18280
c7e0405a35d8 added HotSpotObjectConstant.getClassLoader()
Doug Simon <doug.simon@oracle.com>
parents: 18267
diff changeset
49 * 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
50 * this constant.
c7e0405a35d8 added HotSpotObjectConstant.getClassLoader()
Doug Simon <doug.simon@oracle.com>
parents: 18267
diff changeset
51 *
c7e0405a35d8 added HotSpotObjectConstant.getClassLoader()
Doug Simon <doug.simon@oracle.com>
parents: 18267
diff changeset
52 * @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
53 */
c7e0405a35d8 added HotSpotObjectConstant.getClassLoader()
Doug Simon <doug.simon@oracle.com>
parents: 18267
diff changeset
54 JavaConstant getClassLoader();
18282
ecf3de366ecc added HotSpotObjectConstant.getIdentityHashCode()
Doug Simon <doug.simon@oracle.com>
parents: 18280
diff changeset
55
ecf3de366ecc added HotSpotObjectConstant.getIdentityHashCode()
Doug Simon <doug.simon@oracle.com>
parents: 18280
diff changeset
56 /**
ecf3de366ecc added HotSpotObjectConstant.getIdentityHashCode()
Doug Simon <doug.simon@oracle.com>
parents: 18280
diff changeset
57 * 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
58 * represented by this constant.
ecf3de366ecc added HotSpotObjectConstant.getIdentityHashCode()
Doug Simon <doug.simon@oracle.com>
parents: 18280
diff changeset
59 */
ecf3de366ecc added HotSpotObjectConstant.getIdentityHashCode()
Doug Simon <doug.simon@oracle.com>
parents: 18280
diff changeset
60 int getIdentityHashCode();
18283
b2eb7302706c added HotSpotObjectConstant.getNodeClass()
Doug Simon <doug.simon@oracle.com>
parents: 18282
diff changeset
61
b2eb7302706c added HotSpotObjectConstant.getNodeClass()
Doug Simon <doug.simon@oracle.com>
parents: 18282
diff changeset
62 /**
18284
29ba2a7cdfcb added HotSpotObjectConstant.getComponentType()
Doug Simon <doug.simon@oracle.com>
parents: 18283
diff changeset
63 * Gets the result of {@link Class#getComponentType()} for the {@link Class} object represented
29ba2a7cdfcb added HotSpotObjectConstant.getComponentType()
Doug Simon <doug.simon@oracle.com>
parents: 18283
diff changeset
64 * by this constant.
29ba2a7cdfcb added HotSpotObjectConstant.getComponentType()
Doug Simon <doug.simon@oracle.com>
parents: 18283
diff changeset
65 *
29ba2a7cdfcb added HotSpotObjectConstant.getComponentType()
Doug Simon <doug.simon@oracle.com>
parents: 18283
diff changeset
66 * @return {@code null} if this constant does not represent a {@link Class} object
29ba2a7cdfcb added HotSpotObjectConstant.getComponentType()
Doug Simon <doug.simon@oracle.com>
parents: 18283
diff changeset
67 */
29ba2a7cdfcb added HotSpotObjectConstant.getComponentType()
Doug Simon <doug.simon@oracle.com>
parents: 18283
diff changeset
68 JavaConstant getComponentType();
18285
420161aee840 added HotSpotObjectConstant.getSuperclass()
Doug Simon <doug.simon@oracle.com>
parents: 18284
diff changeset
69
420161aee840 added HotSpotObjectConstant.getSuperclass()
Doug Simon <doug.simon@oracle.com>
parents: 18284
diff changeset
70 /**
420161aee840 added HotSpotObjectConstant.getSuperclass()
Doug Simon <doug.simon@oracle.com>
parents: 18284
diff changeset
71 * Gets the result of {@link Class#getSuperclass()} for the {@link Class} object represented by
420161aee840 added HotSpotObjectConstant.getSuperclass()
Doug Simon <doug.simon@oracle.com>
parents: 18284
diff changeset
72 * this constant.
420161aee840 added HotSpotObjectConstant.getSuperclass()
Doug Simon <doug.simon@oracle.com>
parents: 18284
diff changeset
73 *
420161aee840 added HotSpotObjectConstant.getSuperclass()
Doug Simon <doug.simon@oracle.com>
parents: 18284
diff changeset
74 * @return {@code null} if this constant does not represent a {@link Class} object
420161aee840 added HotSpotObjectConstant.getSuperclass()
Doug Simon <doug.simon@oracle.com>
parents: 18284
diff changeset
75 */
420161aee840 added HotSpotObjectConstant.getSuperclass()
Doug Simon <doug.simon@oracle.com>
parents: 18284
diff changeset
76 JavaConstant getSuperclass();
18286
ffcbc50063a3 added HotSpotObjectConstant.getCallSiteTarget()
Doug Simon <doug.simon@oracle.com>
parents: 18285
diff changeset
77
ffcbc50063a3 added HotSpotObjectConstant.getCallSiteTarget()
Doug Simon <doug.simon@oracle.com>
parents: 18285
diff changeset
78 /**
ffcbc50063a3 added HotSpotObjectConstant.getCallSiteTarget()
Doug Simon <doug.simon@oracle.com>
parents: 18285
diff changeset
79 * Gets the result of {@link CallSite#getTarget()} for the {@link CallSite} object represented
ffcbc50063a3 added HotSpotObjectConstant.getCallSiteTarget()
Doug Simon <doug.simon@oracle.com>
parents: 18285
diff changeset
80 * by this constant.
ffcbc50063a3 added HotSpotObjectConstant.getCallSiteTarget()
Doug Simon <doug.simon@oracle.com>
parents: 18285
diff changeset
81 *
ffcbc50063a3 added HotSpotObjectConstant.getCallSiteTarget()
Doug Simon <doug.simon@oracle.com>
parents: 18285
diff changeset
82 * @param assumptions used to register an assumption that the {@link CallSite}'s target does not
ffcbc50063a3 added HotSpotObjectConstant.getCallSiteTarget()
Doug Simon <doug.simon@oracle.com>
parents: 18285
diff changeset
83 * change
ffcbc50063a3 added HotSpotObjectConstant.getCallSiteTarget()
Doug Simon <doug.simon@oracle.com>
parents: 18285
diff changeset
84 * @return {@code null} if this constant does not represent a {@link CallSite} object
ffcbc50063a3 added HotSpotObjectConstant.getCallSiteTarget()
Doug Simon <doug.simon@oracle.com>
parents: 18285
diff changeset
85 */
ffcbc50063a3 added HotSpotObjectConstant.getCallSiteTarget()
Doug Simon <doug.simon@oracle.com>
parents: 18285
diff changeset
86 JavaConstant getCallSiteTarget(Assumptions assumptions);
ffcbc50063a3 added HotSpotObjectConstant.getCallSiteTarget()
Doug Simon <doug.simon@oracle.com>
parents: 18285
diff changeset
87
18287
b7461f7fa8a0 added HotSpotObjectConstant.getCompositeValueClass()
Doug Simon <doug.simon@oracle.com>
parents: 18286
diff changeset
88 /**
19529
8fc336a04d77 Create TYPE fields for LIRInstruction and CompositeValue. Renaming NodeClass#get to NodeClass#create.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 19412
diff changeset
89 * Gets the result of {@link CompositeValueClass#create(Class)} for the {@link Class} object
18287
b7461f7fa8a0 added HotSpotObjectConstant.getCompositeValueClass()
Doug Simon <doug.simon@oracle.com>
parents: 18286
diff changeset
90 * represented by this constant.
b7461f7fa8a0 added HotSpotObjectConstant.getCompositeValueClass()
Doug Simon <doug.simon@oracle.com>
parents: 18286
diff changeset
91 *
b7461f7fa8a0 added HotSpotObjectConstant.getCompositeValueClass()
Doug Simon <doug.simon@oracle.com>
parents: 18286
diff changeset
92 * @return {@code null} if this constant does not represent a {@link Class} object
b7461f7fa8a0 added HotSpotObjectConstant.getCompositeValueClass()
Doug Simon <doug.simon@oracle.com>
parents: 18286
diff changeset
93 */
b7461f7fa8a0 added HotSpotObjectConstant.getCompositeValueClass()
Doug Simon <doug.simon@oracle.com>
parents: 18286
diff changeset
94 JavaConstant getCompositeValueClass();
18288
feef9ed5fc56 added HotSpotObjectConstant.isInternedString()
Doug Simon <doug.simon@oracle.com>
parents: 18287
diff changeset
95
feef9ed5fc56 added HotSpotObjectConstant.isInternedString()
Doug Simon <doug.simon@oracle.com>
parents: 18287
diff changeset
96 /**
feef9ed5fc56 added HotSpotObjectConstant.isInternedString()
Doug Simon <doug.simon@oracle.com>
parents: 18287
diff changeset
97 * Determines if this constant represents an {@linkplain String#intern() interned} string.
feef9ed5fc56 added HotSpotObjectConstant.isInternedString()
Doug Simon <doug.simon@oracle.com>
parents: 18287
diff changeset
98 */
feef9ed5fc56 added HotSpotObjectConstant.isInternedString()
Doug Simon <doug.simon@oracle.com>
parents: 18287
diff changeset
99 boolean isInternedString();
18533
25a21e1794ec modified SnippetReflectionProvider to support both VM-side and compiler-side constants in a compilation replay context
Doug Simon <doug.simon@oracle.com>
parents: 18530
diff changeset
100
25a21e1794ec modified SnippetReflectionProvider to support both VM-side and compiler-side constants in a compilation replay context
Doug Simon <doug.simon@oracle.com>
parents: 18530
diff changeset
101 /**
25a21e1794ec modified SnippetReflectionProvider to support both VM-side and compiler-side constants in a compilation replay context
Doug Simon <doug.simon@oracle.com>
parents: 18530
diff changeset
102 * Gets the object represented by this constant represents if it is of a given type.
25a21e1794ec modified SnippetReflectionProvider to support both VM-side and compiler-side constants in a compilation replay context
Doug Simon <doug.simon@oracle.com>
parents: 18530
diff changeset
103 *
25a21e1794ec modified SnippetReflectionProvider to support both VM-side and compiler-side constants in a compilation replay context
Doug Simon <doug.simon@oracle.com>
parents: 18530
diff changeset
104 * @param type the expected type of the object represented by this constant. If the object is
25a21e1794ec modified SnippetReflectionProvider to support both VM-side and compiler-side constants in a compilation replay context
Doug Simon <doug.simon@oracle.com>
parents: 18530
diff changeset
105 * required to be of this type, then wrap the call to this method in
25a21e1794ec modified SnippetReflectionProvider to support both VM-side and compiler-side constants in a compilation replay context
Doug Simon <doug.simon@oracle.com>
parents: 18530
diff changeset
106 * {@link Objects#requireNonNull(Object)}.
25a21e1794ec modified SnippetReflectionProvider to support both VM-side and compiler-side constants in a compilation replay context
Doug Simon <doug.simon@oracle.com>
parents: 18530
diff changeset
107 * @return the object value represented by this constant if it is an
25a21e1794ec modified SnippetReflectionProvider to support both VM-side and compiler-side constants in a compilation replay context
Doug Simon <doug.simon@oracle.com>
parents: 18530
diff changeset
108 * {@link ResolvedJavaType#isInstance(JavaConstant) instance of} {@code type} otherwise
25a21e1794ec modified SnippetReflectionProvider to support both VM-side and compiler-side constants in a compilation replay context
Doug Simon <doug.simon@oracle.com>
parents: 18530
diff changeset
109 * {@code null}
25a21e1794ec modified SnippetReflectionProvider to support both VM-side and compiler-side constants in a compilation replay context
Doug Simon <doug.simon@oracle.com>
parents: 18530
diff changeset
110 */
25a21e1794ec modified SnippetReflectionProvider to support both VM-side and compiler-side constants in a compilation replay context
Doug Simon <doug.simon@oracle.com>
parents: 18530
diff changeset
111 <T> T asObject(Class<T> type);
25a21e1794ec modified SnippetReflectionProvider to support both VM-side and compiler-side constants in a compilation replay context
Doug Simon <doug.simon@oracle.com>
parents: 18530
diff changeset
112
25a21e1794ec modified SnippetReflectionProvider to support both VM-side and compiler-side constants in a compilation replay context
Doug Simon <doug.simon@oracle.com>
parents: 18530
diff changeset
113 /**
25a21e1794ec modified SnippetReflectionProvider to support both VM-side and compiler-side constants in a compilation replay context
Doug Simon <doug.simon@oracle.com>
parents: 18530
diff changeset
114 * Gets the object represented by this constant represents if it is of a given type.
25a21e1794ec modified SnippetReflectionProvider to support both VM-side and compiler-side constants in a compilation replay context
Doug Simon <doug.simon@oracle.com>
parents: 18530
diff changeset
115 *
25a21e1794ec modified SnippetReflectionProvider to support both VM-side and compiler-side constants in a compilation replay context
Doug Simon <doug.simon@oracle.com>
parents: 18530
diff changeset
116 * @param type the expected type of the object represented by this constant. If the object is
25a21e1794ec modified SnippetReflectionProvider to support both VM-side and compiler-side constants in a compilation replay context
Doug Simon <doug.simon@oracle.com>
parents: 18530
diff changeset
117 * required to be of this type, then wrap the call to this method in
25a21e1794ec modified SnippetReflectionProvider to support both VM-side and compiler-side constants in a compilation replay context
Doug Simon <doug.simon@oracle.com>
parents: 18530
diff changeset
118 * {@link Objects#requireNonNull(Object)}.
25a21e1794ec modified SnippetReflectionProvider to support both VM-side and compiler-side constants in a compilation replay context
Doug Simon <doug.simon@oracle.com>
parents: 18530
diff changeset
119 * @return the object value represented by this constant if it is an
25a21e1794ec modified SnippetReflectionProvider to support both VM-side and compiler-side constants in a compilation replay context
Doug Simon <doug.simon@oracle.com>
parents: 18530
diff changeset
120 * {@link ResolvedJavaType#isInstance(JavaConstant) instance of} {@code type} otherwise
25a21e1794ec modified SnippetReflectionProvider to support both VM-side and compiler-side constants in a compilation replay context
Doug Simon <doug.simon@oracle.com>
parents: 18530
diff changeset
121 * {@code null}
25a21e1794ec modified SnippetReflectionProvider to support both VM-side and compiler-side constants in a compilation replay context
Doug Simon <doug.simon@oracle.com>
parents: 18530
diff changeset
122 */
25a21e1794ec modified SnippetReflectionProvider to support both VM-side and compiler-side constants in a compilation replay context
Doug Simon <doug.simon@oracle.com>
parents: 18530
diff changeset
123 Object asObject(ResolvedJavaType type);
15018
db4254246f9a Remove Constant.forObject and Constant.asObject to improve compiler/VM separation
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
124 }