3232import org .graalvm .word .WordFactory ;
3333
3434import com .oracle .svm .core .SubstrateOptions ;
35+ import com .oracle .svm .core .c .function .CEntryPointOptions ;
3536import com .oracle .svm .core .graal .meta .SubstrateMemoryAccessProvider ;
3637import com .oracle .svm .core .hub .DynamicHub ;
3738import com .oracle .svm .core .meta .SubstrateObjectConstant ;
@@ -84,7 +85,8 @@ private static JavaConstant read(JavaKind kind, Constant base, long displacement
8485 return ConstantDataConverter .toCompiler (resultData );
8586 }
8687
87- @ CEntryPoint (include = CEntryPoint .NotIncludedAutomatically .class , publishAs = CEntryPoint .Publish .NotPublished )
88+ @ CEntryPoint (exceptionHandler = IsolatedCompileClient .VoidExceptionHandler .class , include = CEntryPoint .NotIncludedAutomatically .class , publishAs = CEntryPoint .Publish .NotPublished )
89+ @ CEntryPointOptions (callerEpilogue = IsolatedCompileClient .ExceptionRethrowCallerEpilogue .class )
8890 private static void read0 (@ SuppressWarnings ("unused" ) ClientIsolateThread client , char kindChar , ConstantData baseData , long displacement ,
8991 int primitiveBits , long compressBase , int compressShift , ConstantData resultData ) {
9092 JavaConstant base = ConstantDataConverter .toClient (baseData );
@@ -129,7 +131,8 @@ public Integer readArrayLength(JavaConstant array) {
129131 return Array .getLength (arrayObj );
130132 }
131133
132- @ CEntryPoint (include = CEntryPoint .NotIncludedAutomatically .class , publishAs = CEntryPoint .Publish .NotPublished )
134+ @ CEntryPoint (exceptionHandler = IsolatedCompileClient .IntExceptionHandler .class , include = CEntryPoint .NotIncludedAutomatically .class , publishAs = CEntryPoint .Publish .NotPublished )
135+ @ CEntryPointOptions (callerEpilogue = IsolatedCompileClient .ExceptionRethrowCallerEpilogue .class )
133136 private static int readArrayLength0 (@ SuppressWarnings ("unused" ) ClientIsolateThread client , ClientHandle <?> arrayHandle ) {
134137 Object array = IsolatedCompileClient .get ().unhand (arrayHandle );
135138 if (!array .getClass ().isArray ()) {
@@ -153,7 +156,8 @@ public JavaConstant readArrayElement(JavaConstant array, int index) {
153156 return ConstantDataConverter .toCompiler (resultData );
154157 }
155158
156- @ CEntryPoint (include = CEntryPoint .NotIncludedAutomatically .class , publishAs = CEntryPoint .Publish .NotPublished )
159+ @ CEntryPoint (exceptionHandler = IsolatedCompileClient .VoidExceptionHandler .class , include = CEntryPoint .NotIncludedAutomatically .class , publishAs = CEntryPoint .Publish .NotPublished )
160+ @ CEntryPointOptions (callerEpilogue = IsolatedCompileClient .ExceptionRethrowCallerEpilogue .class )
157161 private static void readArrayElement0 (@ SuppressWarnings ("unused" ) ClientIsolateThread client , ConstantData arrayData , int index , ConstantData resultData ) {
158162 JavaConstant array = ConstantDataConverter .toClient (arrayData );
159163 Object a = SubstrateObjectConstant .asObject (array );
@@ -181,14 +185,16 @@ public JavaConstant readFieldValue(ResolvedJavaField field, JavaConstant receive
181185 return ConstantDataConverter .toCompiler (resultData );
182186 }
183187
184- @ CEntryPoint (include = CEntryPoint .NotIncludedAutomatically .class , publishAs = CEntryPoint .Publish .NotPublished )
188+ @ CEntryPoint (exceptionHandler = IsolatedCompileClient .VoidExceptionHandler .class , include = CEntryPoint .NotIncludedAutomatically .class , publishAs = CEntryPoint .Publish .NotPublished )
189+ @ CEntryPointOptions (callerEpilogue = IsolatedCompileClient .ExceptionRethrowCallerEpilogue .class )
185190 private static void readFieldValue0 (@ SuppressWarnings ("unused" ) ClientIsolateThread client , ImageHeapRef <SubstrateField > fieldRef , ConstantData receiverData , ConstantData resultData ) {
186191 JavaConstant receiver = ConstantDataConverter .toClient (receiverData );
187192 Constant result = readFieldValue (ImageHeapObjects .deref (fieldRef ), receiver );
188193 ConstantDataConverter .fromClient (result , resultData );
189194 }
190195
191- @ CEntryPoint (include = CEntryPoint .NotIncludedAutomatically .class , publishAs = CEntryPoint .Publish .NotPublished )
196+ @ CEntryPoint (exceptionHandler = IsolatedCompileClient .VoidExceptionHandler .class , include = CEntryPoint .NotIncludedAutomatically .class , publishAs = CEntryPoint .Publish .NotPublished )
197+ @ CEntryPointOptions (callerEpilogue = IsolatedCompileClient .ExceptionRethrowCallerEpilogue .class )
192198 private static void boxPrimitive0 (@ SuppressWarnings ("unused" ) ClientIsolateThread client , ConstantData primitiveData , ConstantData resultData ) {
193199 JavaConstant primitive = ConstantDataConverter .toClient (primitiveData );
194200 Constant result = SubstrateObjectConstant .forObject (primitive .asBoxedPrimitive ());
@@ -208,7 +214,8 @@ public JavaConstant unboxPrimitive(JavaConstant boxed) {
208214 return super .unboxPrimitive (boxed );
209215 }
210216
211- @ CEntryPoint (include = CEntryPoint .NotIncludedAutomatically .class , publishAs = CEntryPoint .Publish .NotPublished )
217+ @ CEntryPoint (exceptionHandler = IsolatedCompileClient .VoidExceptionHandler .class , include = CEntryPoint .NotIncludedAutomatically .class , publishAs = CEntryPoint .Publish .NotPublished )
218+ @ CEntryPointOptions (callerEpilogue = IsolatedCompileClient .ExceptionRethrowCallerEpilogue .class )
212219 private static void unboxPrimitive0 (@ SuppressWarnings ("unused" ) ClientIsolateThread client , ConstantData boxedData , ConstantData resultData ) {
213220 Constant boxed = ConstantDataConverter .toClient (boxedData );
214221 Constant result = JavaConstant .forBoxedPrimitive (SubstrateObjectConstant .asObject (boxed ));
@@ -232,7 +239,8 @@ public ResolvedJavaType asJavaType(Constant hub) {
232239 return super .asJavaType (resolved );
233240 }
234241
235- @ CEntryPoint (include = CEntryPoint .NotIncludedAutomatically .class , publishAs = CEntryPoint .Publish .NotPublished )
242+ @ CEntryPoint (exceptionHandler = IsolatedCompileClient .WordExceptionHandler .class , include = CEntryPoint .NotIncludedAutomatically .class , publishAs = CEntryPoint .Publish .NotPublished )
243+ @ CEntryPointOptions (callerEpilogue = IsolatedCompileClient .ExceptionRethrowCallerEpilogue .class )
236244 private static ImageHeapRef <DynamicHub > getHubConstantAsImageHeapRef (@ SuppressWarnings ("unused" ) ClientIsolateThread client , ConstantData hubData ) {
237245 JavaConstant hub = ConstantDataConverter .toClient (hubData );
238246 Object target = SubstrateObjectConstant .asObject (hub );
@@ -260,7 +268,8 @@ public int getImageHeapOffset(JavaConstant constant) {
260268 return super .getImageHeapOffset (constant );
261269 }
262270
263- @ CEntryPoint (include = CEntryPoint .NotIncludedAutomatically .class , publishAs = CEntryPoint .Publish .NotPublished )
271+ @ CEntryPoint (exceptionHandler = IsolatedCompileClient .IntExceptionHandler .class , include = CEntryPoint .NotIncludedAutomatically .class , publishAs = CEntryPoint .Publish .NotPublished )
272+ @ CEntryPointOptions (callerEpilogue = IsolatedCompileClient .ExceptionRethrowCallerEpilogue .class )
264273 private static int getImageHeapOffset0 (@ SuppressWarnings ("unused" ) ClientIsolateThread client , ConstantData constantData ) {
265274 Constant constant = ConstantDataConverter .toClient (constantData );
266275 return getImageHeapOffsetInternal ((SubstrateObjectConstant ) constant );
0 commit comments