src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotForeignCallLinkage.java
changeset 51436 091c0d22e735
parent 50858 2d3e99a72541
child 52910 583fd71c47d6
equal deleted inserted replaced
51435:72c82bd05971 51436:091c0d22e735
    81          */
    81          */
    82         SAFEPOINT,
    82         SAFEPOINT,
    83     }
    83     }
    84 
    84 
    85     /**
    85     /**
       
    86      * Constants specifying when a foreign call or stub call is re-executable.
       
    87      */
       
    88     enum Reexecutability {
       
    89         /**
       
    90          * Denotes a call that cannot be re-executed. If an exception is raised, the call is
       
    91          * deoptimized and the exception is passed on to be dispatched. If the call can throw an
       
    92          * exception it needs to have a precise frame state.
       
    93          */
       
    94         NOT_REEXECUTABLE,
       
    95 
       
    96         /**
       
    97          * Denotes a call that can only be re-executed if it returns with a pending exception. This
       
    98          * type of call models a function that may throw exceptions before any side effects happen.
       
    99          * In this case if an exception is raised the call may be deoptimized and reexecuted. It
       
   100          * also means that while the call has side effects and may deoptimize it doesn't necessarily
       
   101          * need to have a precise frame state.
       
   102          */
       
   103         REEXECUTABLE_ONLY_AFTER_EXCEPTION,
       
   104 
       
   105         /**
       
   106          * Denotes a call that can always be re-executed. If an exception is raised by the call it
       
   107          * may be cleared, compiled code deoptimized and reexecuted. Since the call has no side
       
   108          * effects it is assumed that the same exception will be thrown.
       
   109          */
       
   110         REEXECUTABLE
       
   111     }
       
   112 
       
   113     /**
    86      * Sentinel marker for a computed jump address.
   114      * Sentinel marker for a computed jump address.
    87      */
   115      */
    88     long JUMP_ADDRESS = 0xDEADDEADBEEFBEEFL;
   116     long JUMP_ADDRESS = 0xDEADDEADBEEFBEEFL;
    89 
   117 
       
   118     /**
       
   119      * Determines if the call has side effects.
       
   120      */
    90     boolean isReexecutable();
   121     boolean isReexecutable();
       
   122 
       
   123     /**
       
   124      * Determines if the call returning a pending exception implies it is side-effect free.
       
   125      */
       
   126     boolean isReexecutableOnlyAfterException();
    91 
   127 
    92     LocationIdentity[] getKilledLocations();
   128     LocationIdentity[] getKilledLocations();
    93 
   129 
    94     void setCompiledStub(Stub stub);
   130     void setCompiledStub(Stub stub);
    95 
   131