src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/MetaAccessProvider.java
changeset 54669 ad45b3802d4e
parent 50858 2d3e99a72541
equal deleted inserted replaced
54668:0bda2308eded 54669:ad45b3802d4e
     1 /*
     1 /*
     2  * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
   100      *
   100      *
   101      * @return the encoded value as an integer
   101      * @return the encoded value as an integer
   102      */
   102      */
   103     JavaConstant encodeDeoptActionAndReason(DeoptimizationAction action, DeoptimizationReason reason, int debugId);
   103     JavaConstant encodeDeoptActionAndReason(DeoptimizationAction action, DeoptimizationReason reason, int debugId);
   104 
   104 
       
   105     /**
       
   106      * Gets a constant that denotes {@code speculation}. The constant can passed to the
       
   107      * deoptimization handler (e.g., through a thread local) to indicate a failed speculation.
       
   108      */
   105     JavaConstant encodeSpeculation(Speculation speculation);
   109     JavaConstant encodeSpeculation(Speculation speculation);
       
   110 
       
   111     /**
       
   112      * Decodes {@code constant} back to a {@link Speculation} object.
       
   113      *
       
   114      * @throws IllegalArgumentException if {@code constant} can only be decoded through a
       
   115      *             {@link SpeculationLog} and {@code speculationLog} does not contain the
       
   116      *             speculation denoted by {@code constant}
       
   117      */
       
   118     Speculation decodeSpeculation(JavaConstant constant, SpeculationLog speculationLog);
   106 
   119 
   107     DeoptimizationReason decodeDeoptReason(JavaConstant constant);
   120     DeoptimizationReason decodeDeoptReason(JavaConstant constant);
   108 
   121 
   109     DeoptimizationAction decodeDeoptAction(JavaConstant constant);
   122     DeoptimizationAction decodeDeoptAction(JavaConstant constant);
   110 
       
   111     Speculation decodeSpeculation(JavaConstant constant, SpeculationLog speculationLog);
       
   112 
   123 
   113     int decodeDebugId(JavaConstant constant);
   124     int decodeDebugId(JavaConstant constant);
   114 
   125 
   115     int getArrayBaseOffset(JavaKind elementKind);
   126     int getArrayBaseOffset(JavaKind elementKind);
   116 
   127