Mercurial > hg > truffle
comparison src/share/vm/graal/graalRuntime.hpp @ 19920:7366593c0610
Make the native initialization path for Graal more robust
author | Tom Rodriguez <tom.rodriguez@oracle.com> |
---|---|
date | Mon, 16 Mar 2015 17:37:32 -0700 |
parents | 9c2396ef02db |
children | 923c37b10fb4 1ab7802d35c9 |
comparison
equal
deleted
inserted
replaced
19919:df0608c34899 | 19920:7366593c0610 |
---|---|
136 static bool is_HotSpotGraalRuntime_initialized() { return _HotSpotGraalRuntime_initialized; } | 136 static bool is_HotSpotGraalRuntime_initialized() { return _HotSpotGraalRuntime_initialized; } |
137 | 137 |
138 /** | 138 /** |
139 * Gets the singleton HotSpotGraalRuntime instance, initializing it if necessary | 139 * Gets the singleton HotSpotGraalRuntime instance, initializing it if necessary |
140 */ | 140 */ |
141 static Handle get_HotSpotGraalRuntime(); | 141 static Handle get_HotSpotGraalRuntime() { |
142 initialize_Graal(); | |
143 return Handle(JNIHandles::resolve_non_null(_HotSpotGraalRuntime_instance)); | |
144 } | |
142 | 145 |
143 static jobject get_HotSpotGraalRuntime_jobject() { | 146 static jobject get_HotSpotGraalRuntime_jobject() { |
144 get_HotSpotGraalRuntime(); | 147 initialize_Graal(); |
148 assert(_HotSpotGraalRuntime_initialized, "must be"); | |
145 return _HotSpotGraalRuntime_instance; | 149 return _HotSpotGraalRuntime_instance; |
146 } | 150 } |
151 | |
152 static Handle callInitializer(const char* className, const char* methodName, const char* returnType); | |
153 | |
154 /** | |
155 * Trigger initialization of HotSpotGraalRuntime through Graal.runtime() | |
156 */ | |
157 static void initialize_Graal(); | |
158 | |
159 /** | |
160 * Explicitly initialize HotSpotGraalRuntime itself | |
161 */ | |
162 static void initialize_HotSpotGraalRuntime(); | |
147 | 163 |
148 static void shutdown(); | 164 static void shutdown(); |
149 | 165 |
150 static bool shutdown_called() { | 166 static bool shutdown_called() { |
151 return _shutdown_called; | 167 return _shutdown_called; |