< prev index next >

src/java.base/share/classes/jdk/internal/access/JavaLangInvokeAccess.java

Print this page


   1 /*
   2  * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  93      * user provided.
  94      */
  95     Map.Entry<String, byte[]> generateConcreteBMHClassBytes(
  96             final String types);
  97 
  98     /**
  99      * Returns a {@code byte[]} representation of a class implementing
 100      * the zero and identity forms of all {@code LambdaForm.BasicType}s.
 101      */
 102     byte[] generateBasicFormsClassBytes(final String className);
 103 
 104     /**
 105      * Returns a {@code byte[]} representation of a class implementing
 106      * the invoker forms for the set of supplied {@code invokerMethodTypes}
 107      * and {@code callSiteMethodTypes}.
 108      */
 109     byte[] generateInvokersHolderClassBytes(String className,
 110             MethodType[] invokerMethodTypes,
 111             MethodType[] callSiteMethodTypes);
 112 





 113     /**
 114      * Returns a var handle view of a given memory address.
 115      * Used by {@code jdk.internal.foreign.LayoutPath} and
 116      * {@code jdk.incubator.foreign.MemoryHandles}.
 117      */
 118     VarHandle memoryAccessVarHandle(Class<?> carrier, long alignmentMask,
 119                                     ByteOrder order, long offset, long[] strides);
 120 
 121     /**
 122      * Is {@code handle} a memory access varhandle?
 123      * Used by {@code jdk.incubator.foreign.MemoryHandles}.
 124      */
 125     boolean isMemoryAccessVarHandle(VarHandle handle);
 126 
 127     /**
 128      * Returns the carrier associated with a memory access var handle.
 129      * Used by {@code jdk.incubator.foreign.MemoryHandles}.
 130      */
 131     Class<?> memoryAddressCarrier(VarHandle handle);
 132 


   1 /*
   2  * Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  93      * user provided.
  94      */
  95     Map.Entry<String, byte[]> generateConcreteBMHClassBytes(
  96             final String types);
  97 
  98     /**
  99      * Returns a {@code byte[]} representation of a class implementing
 100      * the zero and identity forms of all {@code LambdaForm.BasicType}s.
 101      */
 102     byte[] generateBasicFormsClassBytes(final String className);
 103 
 104     /**
 105      * Returns a {@code byte[]} representation of a class implementing
 106      * the invoker forms for the set of supplied {@code invokerMethodTypes}
 107      * and {@code callSiteMethodTypes}.
 108      */
 109     byte[] generateInvokersHolderClassBytes(String className,
 110             MethodType[] invokerMethodTypes,
 111             MethodType[] callSiteMethodTypes);
 112 
 113     /**
 114      * Returns a {@code Map<String, byte[]>} represent holder class vs class bytes
 115      * @param lines input as output from TRACE_RESOLVE
 116      */
 117     Map<String, byte[]> generateMethodHandleHolderClasses(String... lines);
 118     /**
 119      * Returns a var handle view of a given memory address.
 120      * Used by {@code jdk.internal.foreign.LayoutPath} and
 121      * {@code jdk.incubator.foreign.MemoryHandles}.
 122      */
 123     VarHandle memoryAccessVarHandle(Class<?> carrier, long alignmentMask,
 124                                     ByteOrder order, long offset, long[] strides);
 125 
 126     /**
 127      * Is {@code handle} a memory access varhandle?
 128      * Used by {@code jdk.incubator.foreign.MemoryHandles}.
 129      */
 130     boolean isMemoryAccessVarHandle(VarHandle handle);
 131 
 132     /**
 133      * Returns the carrier associated with a memory access var handle.
 134      * Used by {@code jdk.incubator.foreign.MemoryHandles}.
 135      */
 136     Class<?> memoryAddressCarrier(VarHandle handle);
 137 


< prev index next >