Mercurial > hg > truffle
comparison graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotObjectConstantImpl.java @ 18280:c7e0405a35d8
added HotSpotObjectConstant.getClassLoader()
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Thu, 06 Nov 2014 13:19:25 +0100 |
parents | f7d45e2426d4 |
children | ecf3de366ecc |
comparison
equal
deleted
inserted
replaced
18279:46e10fe1ade1 | 18280:c7e0405a35d8 |
---|---|
92 public JavaConstant uncompress() { | 92 public JavaConstant uncompress() { |
93 assert compressed; | 93 assert compressed; |
94 return new HotSpotObjectConstantImpl(object, false); | 94 return new HotSpotObjectConstantImpl(object, false); |
95 } | 95 } |
96 | 96 |
97 public JavaConstant getClassLoader() { | |
98 if (object instanceof Class) { | |
99 /* | |
100 * This is an intrinsic for getClassLoader0, which occurs after any security checks. We | |
101 * can't call that directly so just call getClassLoader. | |
102 */ | |
103 return HotSpotObjectConstantImpl.forObject(((Class<?>) object).getClassLoader()); | |
104 } | |
105 return null; | |
106 } | |
107 | |
97 @Override | 108 @Override |
98 public boolean isNull() { | 109 public boolean isNull() { |
99 return false; | 110 return false; |
100 } | 111 } |
101 | 112 |