Path: blob/master/runtime/compiler/exceptions/AOTFailure.hpp
6000 views
/*******************************************************************************1* Copyright (c) 2000, 2021 IBM Corp. and others2*3* This program and the accompanying materials are made available under4* the terms of the Eclipse Public License 2.0 which accompanies this5* distribution and is available at https://www.eclipse.org/legal/epl-2.0/6* or the Apache License, Version 2.0 which accompanies this distribution and7* is available at https://www.apache.org/licenses/LICENSE-2.0.8*9* This Source Code may also be made available under the following10* Secondary Licenses when the conditions for such availability set11* forth in the Eclipse Public License, v. 2.0 are satisfied: GNU12* General Public License, version 2 with the GNU Classpath13* Exception [1] and GNU General Public License, version 2 with the14* OpenJDK Assembly Exception [2].15*16* [1] https://www.gnu.org/software/classpath/license.html17* [2] http://openjdk.java.net/legal/assembly-exception.html18*19* 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-exception20*******************************************************************************/2122#ifndef AOT_FAILURE_HPP23#define AOT_FAILURE_HPP2425#pragma once2627#include "compile/CompilationException.hpp"28#include "exceptions/RuntimeFailure.hpp"2930namespace J9 {3132/**33* AOT Has Invoke Handle exception type.34*35* Thrown when a method that has an invoke handle is AOT Compiled.36*/37class AOTHasInvokeHandle : public virtual TR::RecoverableILGenException38{39virtual const char* what() const throw() { return "AOT Has Invoke Handle"; }40};4142/**43* AOT Has Invoke VarHandle exception type.44*45* Thrown when a method that has an invoke varhandle is AOT Compiled.46*/47class AOTHasInvokeVarHandle : public virtual TR::RecoverableILGenException48{49virtual const char* what() const throw() { return "AOT Has Invoke VarHandle"; }50};5152/**53* AOT Has Invoke Special in Interface exception type.54*55* Thrown when a method that has an invoke special in an interface is AOT Compiled.56*/57class AOTHasInvokeSpecialInInterface : public virtual TR::RecoverableILGenException58{59virtual const char* what() const throw() { return "AOT Has Invoke Special in Interface"; }60};6162/**63* AOT Has Constant Dynamic exception type.64*65* Thrown when a method that has a constant dynamic is AOT Compiled.66*/67class AOTHasConstantDynamic : public virtual TR::RecoverableILGenException68{69virtual const char* what() const throw() { return "AOT Has Constant Dynamic"; }70};7172/**73* AOT Has Method Handle Constant exception type.74*75* Thrown when a method that has a method handle constant is AOT Compiled.76*/77class AOTHasMethodHandleConstant : public virtual TR::RecoverableILGenException78{79virtual const char* what() const throw() { return "AOT Has Method Handle Constant"; }80};8182/**83* AOT Has Method Type Constant exception type.84*85* Thrown when a method that has a method type constant is AOT Compiled.86*/87class AOTHasMethodTypeConstant : public virtual TR::RecoverableILGenException88{89virtual const char* what() const throw() { return "AOT Has Method Type Constant"; }90};9192/**93* AOT Has patched CP constant exception type.94*95* Thrown when a method that has a constant object in CP entry patched to a different type is AOT Compiled.96*/97class AOTHasPatchedCPConstant: public virtual TR::RecoverableILGenException98{99virtual const char* what() const throw() { return "AOT Has Patched CP Constant"; }100};101102/**103* AOT Relocation Failure exception type.104*105* Thrown when an AOT compilation fails in the relocation phase.106*/107class AOTRelocationFailed : public virtual RuntimeFailure108{109virtual const char* what() const throw() { return "AOT Relocation Failed"; }110};111112/**113* AOT Symbol Validation Failure exception type.114*115* Thrown when an AOT validation record that should succeed fails.116*/117class AOTSymbolValidationManagerFailure : public virtual TR::CompilationException118{119virtual const char* what() const throw() { return "AOT Symbol Validation Manager Failure"; }120};121122/**123* Thrown when certain code path doesn't fully support AOT.124*/125class AOTNoSupportForAOTFailure : public virtual TR::CompilationException126{127virtual const char* what() const throw() { return "This code doesn't support AOT"; }128};129130/**131* AOT Relocation Record Generation Failure exception type.132*133* Thrown when an AOT compilation fails in relocation record generation phase.134*/135class AOTRelocationRecordGenerationFailure: public virtual TR::CompilationException136{137virtual const char* what() const throw() { return "AOT Relocation Record Generation Failed"; }138};139140#if defined(J9VM_OPT_JITSERVER)141/**142* AOT Cache Deserialization Failure exception type.143*144* Thrown when the client JVM fails to deserialize an AOT method received from the JITServer AOT cache.145*/146class AOTCacheDeserializationFailure : public virtual RuntimeFailure147{148virtual const char *what() const throw() { return "AOT cache deserialization failure"; }149};150#endif /* defined(J9VM_OPT_JITSERVER) */151}152153#endif // AOT_FAILURE_HPP154155156