Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/openj9
Path: blob/master/runtime/compiler/exceptions/AOTFailure.hpp
6000 views
1
/*******************************************************************************
2
* Copyright (c) 2000, 2021 IBM Corp. and others
3
*
4
* This program and the accompanying materials are made available under
5
* the terms of the Eclipse Public License 2.0 which accompanies this
6
* distribution and is available at https://www.eclipse.org/legal/epl-2.0/
7
* or the Apache License, Version 2.0 which accompanies this distribution and
8
* is available at https://www.apache.org/licenses/LICENSE-2.0.
9
*
10
* This Source Code may also be made available under the following
11
* Secondary Licenses when the conditions for such availability set
12
* forth in the Eclipse Public License, v. 2.0 are satisfied: GNU
13
* General Public License, version 2 with the GNU Classpath
14
* Exception [1] and GNU General Public License, version 2 with the
15
* OpenJDK Assembly Exception [2].
16
*
17
* [1] https://www.gnu.org/software/classpath/license.html
18
* [2] http://openjdk.java.net/legal/assembly-exception.html
19
*
20
* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception
21
*******************************************************************************/
22
23
#ifndef AOT_FAILURE_HPP
24
#define AOT_FAILURE_HPP
25
26
#pragma once
27
28
#include "compile/CompilationException.hpp"
29
#include "exceptions/RuntimeFailure.hpp"
30
31
namespace J9 {
32
33
/**
34
* AOT Has Invoke Handle exception type.
35
*
36
* Thrown when a method that has an invoke handle is AOT Compiled.
37
*/
38
class AOTHasInvokeHandle : public virtual TR::RecoverableILGenException
39
{
40
virtual const char* what() const throw() { return "AOT Has Invoke Handle"; }
41
};
42
43
/**
44
* AOT Has Invoke VarHandle exception type.
45
*
46
* Thrown when a method that has an invoke varhandle is AOT Compiled.
47
*/
48
class AOTHasInvokeVarHandle : public virtual TR::RecoverableILGenException
49
{
50
virtual const char* what() const throw() { return "AOT Has Invoke VarHandle"; }
51
};
52
53
/**
54
* AOT Has Invoke Special in Interface exception type.
55
*
56
* Thrown when a method that has an invoke special in an interface is AOT Compiled.
57
*/
58
class AOTHasInvokeSpecialInInterface : public virtual TR::RecoverableILGenException
59
{
60
virtual const char* what() const throw() { return "AOT Has Invoke Special in Interface"; }
61
};
62
63
/**
64
* AOT Has Constant Dynamic exception type.
65
*
66
* Thrown when a method that has a constant dynamic is AOT Compiled.
67
*/
68
class AOTHasConstantDynamic : public virtual TR::RecoverableILGenException
69
{
70
virtual const char* what() const throw() { return "AOT Has Constant Dynamic"; }
71
};
72
73
/**
74
* AOT Has Method Handle Constant exception type.
75
*
76
* Thrown when a method that has a method handle constant is AOT Compiled.
77
*/
78
class AOTHasMethodHandleConstant : public virtual TR::RecoverableILGenException
79
{
80
virtual const char* what() const throw() { return "AOT Has Method Handle Constant"; }
81
};
82
83
/**
84
* AOT Has Method Type Constant exception type.
85
*
86
* Thrown when a method that has a method type constant is AOT Compiled.
87
*/
88
class AOTHasMethodTypeConstant : public virtual TR::RecoverableILGenException
89
{
90
virtual const char* what() const throw() { return "AOT Has Method Type Constant"; }
91
};
92
93
/**
94
* AOT Has patched CP constant exception type.
95
*
96
* Thrown when a method that has a constant object in CP entry patched to a different type is AOT Compiled.
97
*/
98
class AOTHasPatchedCPConstant: public virtual TR::RecoverableILGenException
99
{
100
virtual const char* what() const throw() { return "AOT Has Patched CP Constant"; }
101
};
102
103
/**
104
* AOT Relocation Failure exception type.
105
*
106
* Thrown when an AOT compilation fails in the relocation phase.
107
*/
108
class AOTRelocationFailed : public virtual RuntimeFailure
109
{
110
virtual const char* what() const throw() { return "AOT Relocation Failed"; }
111
};
112
113
/**
114
* AOT Symbol Validation Failure exception type.
115
*
116
* Thrown when an AOT validation record that should succeed fails.
117
*/
118
class AOTSymbolValidationManagerFailure : public virtual TR::CompilationException
119
{
120
virtual const char* what() const throw() { return "AOT Symbol Validation Manager Failure"; }
121
};
122
123
/**
124
* Thrown when certain code path doesn't fully support AOT.
125
*/
126
class AOTNoSupportForAOTFailure : public virtual TR::CompilationException
127
{
128
virtual const char* what() const throw() { return "This code doesn't support AOT"; }
129
};
130
131
/**
132
* AOT Relocation Record Generation Failure exception type.
133
*
134
* Thrown when an AOT compilation fails in relocation record generation phase.
135
*/
136
class AOTRelocationRecordGenerationFailure: public virtual TR::CompilationException
137
{
138
virtual const char* what() const throw() { return "AOT Relocation Record Generation Failed"; }
139
};
140
141
#if defined(J9VM_OPT_JITSERVER)
142
/**
143
* AOT Cache Deserialization Failure exception type.
144
*
145
* Thrown when the client JVM fails to deserialize an AOT method received from the JITServer AOT cache.
146
*/
147
class AOTCacheDeserializationFailure : public virtual RuntimeFailure
148
{
149
virtual const char *what() const throw() { return "AOT cache deserialization failure"; }
150
};
151
#endif /* defined(J9VM_OPT_JITSERVER) */
152
}
153
154
#endif // AOT_FAILURE_HPP
155
156