src/hotspot/share/jvmci/jvmciEnv.hpp
author chegar
Thu, 17 Oct 2019 20:54:25 +0100
branchdatagramsocketimpl-branch
changeset 58679 9c3209ff7550
parent 58678 9cf78a70fa4f
parent 58358 d658f4379c63
permissions -rw-r--r--
datagramsocketimpl-branch: merge with default
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
     1
/*
53425
312880c38a7f 8215375: [Graal] jck:vm/jvmti/Exception/excp001/excp00101 fails in Graal as JIT mode and -Xcomp mode
dnsimon
parents: 48299
diff changeset
     2
 * Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved.
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
     4
 *
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
     7
 * published by the Free Software Foundation.
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
     8
 *
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    13
 * accompanied this code).
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    14
 *
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    18
 *
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    21
 * questions.
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    22
 *
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    23
 */
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    24
53244
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 48299
diff changeset
    25
#ifndef SHARE_JVMCI_JVMCIENV_HPP
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 48299
diff changeset
    26
#define SHARE_JVMCI_JVMCIENV_HPP
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    27
54669
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
    28
#include "classfile/javaClasses.hpp"
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
    29
#include "jvmci/jvmciJavaClasses.hpp"
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    30
#include "runtime/thread.hpp"
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    31
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    32
class CompileTask;
54669
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
    33
class JVMCIObject;
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
    34
class JVMCIObjectArray;
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
    35
class JVMCIPrimitiveArray;
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
    36
class JVMCICompiler;
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
    37
class JVMCIRuntime;
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    38
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    39
#define JVMCI_EXCEPTION_CONTEXT \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    40
  JavaThread* thread=JavaThread::current(); \
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    41
  Thread* THREAD = thread;
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    42
54669
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
    43
// Helper to log more context on a JNI exception
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
    44
#define JVMCI_EXCEPTION_CHECK(env, ...) \
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
    45
  do { \
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
    46
    if (env->ExceptionCheck()) { \
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
    47
      if (env != JavaThread::current()->jni_environment() && JVMCIEnv::get_shared_library_path() != NULL) { \
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
    48
        tty->print_cr("In JVMCI shared library (%s):", JVMCIEnv::get_shared_library_path()); \
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
    49
      } \
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
    50
      tty->print_cr(__VA_ARGS__); \
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
    51
      return; \
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
    52
    } \
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
    53
  } while(0)
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    54
54669
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
    55
// Helper class to ensure that references to Klass* are kept alive for G1
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
    56
class JVMCIKlassHandle : public StackObj {
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
    57
 private:
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
    58
  Klass*     _klass;
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
    59
  Handle     _holder;
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
    60
  Thread*    _thread;
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    61
54669
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
    62
  Klass*        klass() const                     { return _klass; }
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
    63
  Klass*        non_null_klass() const            { assert(_klass != NULL, "resolving NULL _klass"); return _klass; }
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    64
54669
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
    65
 public:
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
    66
  /* Constructors */
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
    67
  JVMCIKlassHandle (Thread* thread) : _klass(NULL), _thread(thread) {}
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
    68
  JVMCIKlassHandle (Thread* thread, Klass* klass);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
    69
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
    70
  JVMCIKlassHandle (const JVMCIKlassHandle &h): _klass(h._klass), _holder(h._holder), _thread(h._thread) {}
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
    71
  JVMCIKlassHandle& operator=(const JVMCIKlassHandle &s);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
    72
  JVMCIKlassHandle& operator=(Klass* klass);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
    73
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
    74
  /* Operators for ease of use */
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
    75
  Klass*        operator () () const            { return klass(); }
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
    76
  Klass*        operator -> () const            { return non_null_klass(); }
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    77
54669
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
    78
  bool    operator == (Klass* o) const          { return klass() == o; }
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
    79
  bool    operator == (const JVMCIKlassHandle& h) const  { return klass() == h.klass(); }
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    80
54669
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
    81
  /* Null checks */
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
    82
  bool    is_null() const                      { return _klass == NULL; }
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
    83
  bool    not_null() const                     { return _klass != NULL; }
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
    84
};
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    85
54669
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
    86
// A class that maintains the state needed for compilations requested
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
    87
// by the CompileBroker.  It is created in the broker and passed through
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
    88
// into the code installation step.
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
    89
class JVMCICompileState : public ResourceObj {
54812
f2d5f44d994e 8223531: [Graal] assert(type() == T_INT) failed: type check
dnsimon
parents: 54732
diff changeset
    90
  friend class JVMCIVMStructs;
54669
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
    91
 private:
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    92
  CompileTask*     _task;
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    93
53425
312880c38a7f 8215375: [Graal] jck:vm/jvmti/Exception/excp001/excp00101 fails in Graal as JIT mode and -Xcomp mode
dnsimon
parents: 48299
diff changeset
    94
  // Cache JVMTI state. Defined as bytes so that reading them from Java
312880c38a7f 8215375: [Graal] jck:vm/jvmti/Exception/excp001/excp00101 fails in Graal as JIT mode and -Xcomp mode
dnsimon
parents: 48299
diff changeset
    95
  // via Unsafe is well defined (the C++ type for bool is implementation
312880c38a7f 8215375: [Graal] jck:vm/jvmti/Exception/excp001/excp00101 fails in Graal as JIT mode and -Xcomp mode
dnsimon
parents: 48299
diff changeset
    96
  // defined and may not be the same as a Java boolean).
58358
d658f4379c63 8226690: SIGSEGV in MetadataOnStackClosure::do_metadata
coleenp
parents: 55635
diff changeset
    97
  uint64_t _jvmti_redefinition_count;
53425
312880c38a7f 8215375: [Graal] jck:vm/jvmti/Exception/excp001/excp00101 fails in Graal as JIT mode and -Xcomp mode
dnsimon
parents: 48299
diff changeset
    98
  jbyte  _jvmti_can_hotswap_or_post_breakpoint;
312880c38a7f 8215375: [Graal] jck:vm/jvmti/Exception/excp001/excp00101 fails in Graal as JIT mode and -Xcomp mode
dnsimon
parents: 48299
diff changeset
    99
  jbyte  _jvmti_can_access_local_variables;
312880c38a7f 8215375: [Graal] jck:vm/jvmti/Exception/excp001/excp00101 fails in Graal as JIT mode and -Xcomp mode
dnsimon
parents: 48299
diff changeset
   100
  jbyte  _jvmti_can_post_on_exceptions;
312880c38a7f 8215375: [Graal] jck:vm/jvmti/Exception/excp001/excp00101 fails in Graal as JIT mode and -Xcomp mode
dnsimon
parents: 48299
diff changeset
   101
  jbyte  _jvmti_can_pop_frame;
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   102
54669
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   103
  // Compilation result values.
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   104
  bool             _retryable;
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   105
  const char*      _failure_reason;
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   106
54669
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   107
  // Specifies if _failure_reason is on the C heap. If so, it is allocated
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   108
  // with the mtJVMCI NMT flag.
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   109
  bool             _failure_reason_on_C_heap;
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   110
54669
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   111
 public:
55635
0fb70c9118ce 8222446: assert(C->env()->system_dictionary_modification_counter_changed()) failed: Must invalidate if TypeFuncs differ
coleenp
parents: 54812
diff changeset
   112
  JVMCICompileState(CompileTask* task);
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   113
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   114
  CompileTask* task() { return _task; }
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   115
53425
312880c38a7f 8215375: [Graal] jck:vm/jvmti/Exception/excp001/excp00101 fails in Graal as JIT mode and -Xcomp mode
dnsimon
parents: 48299
diff changeset
   116
  bool  jvmti_state_changed() const;
58358
d658f4379c63 8226690: SIGSEGV in MetadataOnStackClosure::do_metadata
coleenp
parents: 55635
diff changeset
   117
  uint64_t jvmti_redefinition_count() const          { return  _jvmti_redefinition_count; }
53425
312880c38a7f 8215375: [Graal] jck:vm/jvmti/Exception/excp001/excp00101 fails in Graal as JIT mode and -Xcomp mode
dnsimon
parents: 48299
diff changeset
   118
  bool  jvmti_can_hotswap_or_post_breakpoint() const { return  _jvmti_can_hotswap_or_post_breakpoint != 0; }
312880c38a7f 8215375: [Graal] jck:vm/jvmti/Exception/excp001/excp00101 fails in Graal as JIT mode and -Xcomp mode
dnsimon
parents: 48299
diff changeset
   119
  bool  jvmti_can_access_local_variables() const     { return  _jvmti_can_access_local_variables != 0; }
312880c38a7f 8215375: [Graal] jck:vm/jvmti/Exception/excp001/excp00101 fails in Graal as JIT mode and -Xcomp mode
dnsimon
parents: 48299
diff changeset
   120
  bool  jvmti_can_post_on_exceptions() const         { return  _jvmti_can_post_on_exceptions != 0; }
312880c38a7f 8215375: [Graal] jck:vm/jvmti/Exception/excp001/excp00101 fails in Graal as JIT mode and -Xcomp mode
dnsimon
parents: 48299
diff changeset
   121
  bool  jvmti_can_pop_frame() const                  { return  _jvmti_can_pop_frame != 0; }
312880c38a7f 8215375: [Graal] jck:vm/jvmti/Exception/excp001/excp00101 fails in Graal as JIT mode and -Xcomp mode
dnsimon
parents: 48299
diff changeset
   122
35592
5814f874d736 8147432: JVMCI should report bailouts in PrintCompilation output
never
parents: 35123
diff changeset
   123
  const char* failure_reason() { return _failure_reason; }
53417
126c5e7b97b1 8217445: [JVMCI] incorrect management of JVMCI compilation failure reason string
dnsimon
parents: 53244
diff changeset
   124
  bool failure_reason_on_C_heap() { return _failure_reason_on_C_heap; }
35592
5814f874d736 8147432: JVMCI should report bailouts in PrintCompilation output
never
parents: 35123
diff changeset
   125
  bool retryable() { return _retryable; }
5814f874d736 8147432: JVMCI should report bailouts in PrintCompilation output
never
parents: 35123
diff changeset
   126
53417
126c5e7b97b1 8217445: [JVMCI] incorrect management of JVMCI compilation failure reason string
dnsimon
parents: 53244
diff changeset
   127
  void set_failure(bool retryable, const char* reason, bool reason_on_C_heap = false) {
35592
5814f874d736 8147432: JVMCI should report bailouts in PrintCompilation output
never
parents: 35123
diff changeset
   128
    _failure_reason = reason;
53417
126c5e7b97b1 8217445: [JVMCI] incorrect management of JVMCI compilation failure reason string
dnsimon
parents: 53244
diff changeset
   129
    _failure_reason_on_C_heap = reason_on_C_heap;
35592
5814f874d736 8147432: JVMCI should report bailouts in PrintCompilation output
never
parents: 35123
diff changeset
   130
    _retryable = retryable;
5814f874d736 8147432: JVMCI should report bailouts in PrintCompilation output
never
parents: 35123
diff changeset
   131
  }
54669
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   132
};
35592
5814f874d736 8147432: JVMCI should report bailouts in PrintCompilation output
never
parents: 35123
diff changeset
   133
54669
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   134
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   135
// This class is a top level wrapper around interactions between HotSpot
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   136
// and the JVMCI Java code.  It supports both a HotSpot heap based
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   137
// runtime with HotSpot oop based accessors as well as a shared library
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   138
// based runtime that is accessed through JNI. It abstracts away all
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   139
// interactions with JVMCI objects so that a single version of the
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   140
// HotSpot C++ code can can work with either runtime.
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   141
class JVMCIEnv : public ResourceObj {
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   142
  friend class JNIAccessMark;
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   143
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   144
  static char*   _shared_library_path;   // argument to os:dll_load
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   145
  static void*   _shared_library_handle; // result of os::dll_load
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   146
  static JavaVM* _shared_library_javavm; // result of calling JNI_CreateJavaVM in shared library
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   147
54732
2d012a75d35c 8223332: Update JVMCI
kvn
parents: 54669
diff changeset
   148
  // Initializes the shared library JavaVM if not already initialized.
2d012a75d35c 8223332: Update JVMCI
kvn
parents: 54669
diff changeset
   149
  // Returns the JNI interface pointer for the current thread
2d012a75d35c 8223332: Update JVMCI
kvn
parents: 54669
diff changeset
   150
  // if initialization was performed by this call, NULL if
2d012a75d35c 8223332: Update JVMCI
kvn
parents: 54669
diff changeset
   151
  // initialization was performed by a previous call.
2d012a75d35c 8223332: Update JVMCI
kvn
parents: 54669
diff changeset
   152
  static JNIEnv* init_shared_library(JavaThread* thread);
54669
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   153
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   154
  // Initializes the _env, _mode and _runtime fields.
54732
2d012a75d35c 8223332: Update JVMCI
kvn
parents: 54669
diff changeset
   155
  void init_env_mode_runtime(JavaThread* thread, JNIEnv* parent_env);
54669
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   156
54732
2d012a75d35c 8223332: Update JVMCI
kvn
parents: 54669
diff changeset
   157
  void init(JavaThread* thread, bool is_hotspot, const char* file, int line);
54669
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   158
54732
2d012a75d35c 8223332: Update JVMCI
kvn
parents: 54669
diff changeset
   159
  JNIEnv*                 _env;  // JNI env for calling into shared library
2d012a75d35c 8223332: Update JVMCI
kvn
parents: 54669
diff changeset
   160
  bool     _pop_frame_on_close;  // Must pop frame on close?
2d012a75d35c 8223332: Update JVMCI
kvn
parents: 54669
diff changeset
   161
  bool        _detach_on_close;  // Must detach on close?
2d012a75d35c 8223332: Update JVMCI
kvn
parents: 54669
diff changeset
   162
  JVMCIRuntime*       _runtime;  // Access to a HotSpotJVMCIRuntime
2d012a75d35c 8223332: Update JVMCI
kvn
parents: 54669
diff changeset
   163
  bool             _is_hotspot;  // Which heap is the HotSpotJVMCIRuntime in
2d012a75d35c 8223332: Update JVMCI
kvn
parents: 54669
diff changeset
   164
  bool        _throw_to_caller;  // Propagate an exception raised in this env to the caller?
2d012a75d35c 8223332: Update JVMCI
kvn
parents: 54669
diff changeset
   165
  const char*            _file;  // The file and ...
2d012a75d35c 8223332: Update JVMCI
kvn
parents: 54669
diff changeset
   166
  int                    _line;  // ... line where this JNIEnv was created
54669
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   167
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   168
  // Translates an exception on the HotSpot heap to an exception on
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   169
  // the shared library heap. The translation includes the stack and
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   170
  // causes of `throwable`. The translated exception is pending in the
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   171
  // shared library thread upon returning.
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   172
  void translate_hotspot_exception_to_jni_exception(JavaThread* THREAD, const Handle& throwable);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   173
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   174
public:
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   175
  // Opens a JVMCIEnv scope for a Java to VM call (e.g., via CompilerToVM).
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   176
  // An exception occurring within the scope is left pending when the
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   177
  // scope closes so that it will be propagated back to Java.
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   178
  // The JVMCIEnv destructor translates the exception object for the
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   179
  // Java runtime if necessary.
54732
2d012a75d35c 8223332: Update JVMCI
kvn
parents: 54669
diff changeset
   180
  JVMCIEnv(JavaThread* thread, JNIEnv* env, const char* file, int line);
54669
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   181
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   182
  // Opens a JVMCIEnv scope for a compilation scheduled by the CompileBroker.
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   183
  // An exception occurring within the scope must not be propagated back to
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   184
  // the CompileBroker.
54732
2d012a75d35c 8223332: Update JVMCI
kvn
parents: 54669
diff changeset
   185
  JVMCIEnv(JavaThread* thread, JVMCICompileState* compile_state, const char* file, int line);
54669
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   186
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   187
  // Opens a JNIEnv scope for a call from within the VM. An exception occurring
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   188
  // within the scope must not be propagated back to the caller.
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   189
  JVMCIEnv(JavaThread* env, const char* file, int line);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   190
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   191
  // Opens a JNIEnv scope for accessing `for_object`. An exception occurring
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   192
  // within the scope must not be propagated back to the caller.
54732
2d012a75d35c 8223332: Update JVMCI
kvn
parents: 54669
diff changeset
   193
  JVMCIEnv(JavaThread* thread, JVMCIObject for_object, const char* file, int line) {
54669
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   194
    // A JNI call to access an object in the shared library heap
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   195
    // can block or take a long time so do not allow such access
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   196
    // on the VM thread.
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   197
    assert(for_object.is_hotspot() || !Thread::current()->is_VM_thread(),
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   198
        "cannot open JVMCIEnv scope when in the VM thread for accessing a shared library heap object");
54732
2d012a75d35c 8223332: Update JVMCI
kvn
parents: 54669
diff changeset
   199
    init(thread, for_object.is_hotspot(), file, line);
54669
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   200
  }
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   201
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   202
  // Opens a JNIEnv scope for the HotSpot runtime if `is_hotspot` is true
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   203
  // otherwise for the shared library runtime. An exception occurring
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   204
  // within the scope must not be propagated back to the caller.
54732
2d012a75d35c 8223332: Update JVMCI
kvn
parents: 54669
diff changeset
   205
  JVMCIEnv(JavaThread* thread, bool is_hotspot, const char* file, int line) {
2d012a75d35c 8223332: Update JVMCI
kvn
parents: 54669
diff changeset
   206
    init(thread, is_hotspot, file, line);
54669
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   207
  }
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   208
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   209
  ~JVMCIEnv();
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   210
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   211
  JVMCIRuntime* runtime() {
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   212
    return _runtime;
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   213
  }
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   214
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   215
  // Initializes Services.savedProperties in the shared library by copying
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   216
  // the values from the same field in the HotSpot heap.
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   217
  void copy_saved_properties();
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   218
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   219
  jboolean has_pending_exception();
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   220
  void clear_pending_exception();
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   221
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   222
  // Prints an exception and stack trace of a pending exception.
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   223
  void describe_pending_exception(bool clear);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   224
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   225
  int get_length(JVMCIArray array);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   226
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   227
  JVMCIObject get_object_at(JVMCIObjectArray array, int index);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   228
  void put_object_at(JVMCIObjectArray array, int index, JVMCIObject value);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   229
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   230
  jboolean get_bool_at(JVMCIPrimitiveArray array, int index);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   231
  void put_bool_at(JVMCIPrimitiveArray array, int index, jboolean value);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   232
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   233
  jbyte get_byte_at(JVMCIPrimitiveArray array, int index);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   234
  void put_byte_at(JVMCIPrimitiveArray array, int index, jbyte value);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   235
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   236
  jint get_int_at(JVMCIPrimitiveArray array, int index);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   237
  void put_int_at(JVMCIPrimitiveArray array, int index, jint value);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   238
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   239
  long get_long_at(JVMCIPrimitiveArray array, int index);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   240
  void put_long_at(JVMCIPrimitiveArray array, int index, jlong value);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   241
54732
2d012a75d35c 8223332: Update JVMCI
kvn
parents: 54669
diff changeset
   242
  void copy_bytes_to(JVMCIPrimitiveArray src, jbyte* dest, int offset, jsize length);
2d012a75d35c 8223332: Update JVMCI
kvn
parents: 54669
diff changeset
   243
  void copy_bytes_from(jbyte* src, JVMCIPrimitiveArray dest, int offset, jsize length);
2d012a75d35c 8223332: Update JVMCI
kvn
parents: 54669
diff changeset
   244
2d012a75d35c 8223332: Update JVMCI
kvn
parents: 54669
diff changeset
   245
  void copy_longs_from(jlong* src, JVMCIPrimitiveArray dest, int offset, jsize length);
54669
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   246
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   247
  JVMCIObjectArray initialize_intrinsics(JVMCI_TRAPS);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   248
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   249
  jboolean is_boxing_object(BasicType type, JVMCIObject object);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   250
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   251
  // Get the primitive value from a Java boxing object.  It's hard error to
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   252
  // pass a non-primitive BasicType.
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   253
  jvalue get_boxed_value(BasicType type, JVMCIObject object);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   254
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   255
  // Return the BasicType of the object if it's a boxing object, otherwise return T_ILLEGAL.
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   256
  BasicType get_box_type(JVMCIObject object);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   257
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   258
  // Create a boxing object of the appropriate primitive type.
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   259
  JVMCIObject create_box(BasicType type, jvalue* value, JVMCI_TRAPS);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   260
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   261
  const char* as_utf8_string(JVMCIObject str);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   262
  char* as_utf8_string(JVMCIObject str, char* buf, int buflen);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   263
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   264
  JVMCIObject create_string(Symbol* str, JVMCI_TRAPS) {
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   265
    return create_string(str->as_C_string(), JVMCI_CHECK_(JVMCIObject()));
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   266
  }
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   267
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   268
  JVMCIObject create_string(const char* str, JVMCI_TRAPS);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   269
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   270
  bool equals(JVMCIObject a, JVMCIObject b);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   271
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   272
  // Convert into a JNI handle for the appropriate runtime
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   273
  jobject get_jobject(JVMCIObject object)                       { assert(object.as_jobject() == NULL || is_hotspot() == object.is_hotspot(), "mismatch"); return object.as_jobject(); }
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   274
  jarray get_jarray(JVMCIArray array)                           { assert(array.as_jobject() == NULL || is_hotspot() == array.is_hotspot(), "mismatch"); return array.as_jobject(); }
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   275
  jobjectArray get_jobjectArray(JVMCIObjectArray objectArray)   { assert(objectArray.as_jobject() == NULL || is_hotspot() == objectArray.is_hotspot(), "mismatch"); return objectArray.as_jobject(); }
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   276
  jbyteArray get_jbyteArray(JVMCIPrimitiveArray primitiveArray) { assert(primitiveArray.as_jobject() == NULL || is_hotspot() == primitiveArray.is_hotspot(), "mismatch"); return primitiveArray.as_jbyteArray(); }
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   277
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   278
  JVMCIObject         wrap(jobject obj);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   279
  JVMCIObjectArray    wrap(jobjectArray obj)  { return (JVMCIObjectArray)    wrap((jobject) obj); }
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   280
  JVMCIPrimitiveArray wrap(jintArray obj)     { return (JVMCIPrimitiveArray) wrap((jobject) obj); }
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   281
  JVMCIPrimitiveArray wrap(jbooleanArray obj) { return (JVMCIPrimitiveArray) wrap((jobject) obj); }
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   282
  JVMCIPrimitiveArray wrap(jbyteArray obj)    { return (JVMCIPrimitiveArray) wrap((jobject) obj); }
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   283
  JVMCIPrimitiveArray wrap(jlongArray obj)    { return (JVMCIPrimitiveArray) wrap((jobject) obj); }
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   284
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   285
 private:
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   286
  JVMCIObject wrap(oop obj)                  { assert(is_hotspot(), "must be"); return wrap(JNIHandles::make_local(obj)); }
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   287
  JVMCIObjectArray wrap(objArrayOop obj)     { assert(is_hotspot(), "must be"); return (JVMCIObjectArray) wrap(JNIHandles::make_local(obj)); }
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   288
  JVMCIPrimitiveArray wrap(typeArrayOop obj) { assert(is_hotspot(), "must be"); return (JVMCIPrimitiveArray) wrap(JNIHandles::make_local(obj)); }
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   289
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   290
 public:
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   291
  // Compiles a method with the JVMIC compiler.
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   292
  // Caller must handle pending exception.
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   293
  JVMCIObject call_HotSpotJVMCIRuntime_compileMethod(JVMCIObject runtime, JVMCIObject method, int entry_bci,
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   294
                                                     jlong compile_state, int id);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   295
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   296
  void call_HotSpotJVMCIRuntime_bootstrapFinished(JVMCIObject runtime, JVMCI_TRAPS);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   297
  void call_HotSpotJVMCIRuntime_shutdown(JVMCIObject runtime);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   298
  JVMCIObject call_HotSpotJVMCIRuntime_runtime(JVMCI_TRAPS);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   299
  JVMCIObject call_JVMCI_getRuntime(JVMCI_TRAPS);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   300
  JVMCIObject call_HotSpotJVMCIRuntime_getCompiler(JVMCIObject runtime, JVMCI_TRAPS);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   301
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   302
  JVMCIObject call_HotSpotJVMCIRuntime_callToString(JVMCIObject object, JVMCI_TRAPS);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   303
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   304
  JVMCIObject call_PrimitiveConstant_forTypeChar(jchar kind, jlong value, JVMCI_TRAPS);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   305
  JVMCIObject call_JavaConstant_forFloat(float value, JVMCI_TRAPS);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   306
  JVMCIObject call_JavaConstant_forDouble(double value, JVMCI_TRAPS);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   307
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   308
  BasicType kindToBasicType(JVMCIObject kind, JVMCI_TRAPS);
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   309
54669
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   310
#define DO_THROW(name) \
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   311
  void throw_##name(const char* msg = NULL);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   312
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   313
  DO_THROW(InternalError)
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   314
  DO_THROW(ArrayIndexOutOfBoundsException)
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   315
  DO_THROW(IllegalStateException)
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   316
  DO_THROW(NullPointerException)
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   317
  DO_THROW(IllegalArgumentException)
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   318
  DO_THROW(InvalidInstalledCodeException)
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   319
  DO_THROW(UnsatisfiedLinkError)
54732
2d012a75d35c 8223332: Update JVMCI
kvn
parents: 54669
diff changeset
   320
  DO_THROW(UnsupportedOperationException)
2d012a75d35c 8223332: Update JVMCI
kvn
parents: 54669
diff changeset
   321
  DO_THROW(ClassNotFoundException)
54669
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   322
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   323
#undef DO_THROW
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   324
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   325
  void fthrow_error(const char* file, int line, const char* format, ...) ATTRIBUTE_PRINTF(4, 5);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   326
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   327
  // Given an instance of HotSpotInstalledCode return the corresponding CodeBlob*
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   328
  CodeBlob* asCodeBlob(JVMCIObject code);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   329
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   330
  nmethod* asNmethod(JVMCIObject code) {
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   331
    CodeBlob* cb = asCodeBlob(code);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   332
    if (cb == NULL) {
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   333
      return NULL;
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   334
    }
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   335
    nmethod* nm = cb->as_nmethod_or_null();
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   336
    guarantee(nm != NULL, "not an nmethod");
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   337
    return nm;
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   338
  }
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   339
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   340
  MethodData* asMethodData(jlong metaspaceMethodData) {
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   341
    return (MethodData*) (address) metaspaceMethodData;
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   342
  }
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   343
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   344
  const char* klass_name(JVMCIObject object);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   345
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   346
  // Unpack an instance of HotSpotResolvedJavaMethodImpl into the original Method*
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   347
  Method* asMethod(JVMCIObject jvmci_method);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   348
  Method* asMethod(jobject jvmci_method) { return asMethod(wrap(jvmci_method)); }
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   349
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   350
  // Unpack an instance of HotSpotResolvedObjectTypeImpl into the original Klass*
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   351
  Klass* asKlass(JVMCIObject jvmci_type);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   352
  Klass* asKlass(jobject jvmci_type)  { return asKlass(wrap(jvmci_type)); }
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   353
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   354
  JVMCIObject get_jvmci_method(const methodHandle& method, JVMCI_TRAPS);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   355
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   356
  JVMCIObject get_jvmci_type(const JVMCIKlassHandle& klass, JVMCI_TRAPS);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   357
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   358
  // Unpack an instance of HotSpotConstantPool into the original ConstantPool*
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   359
  ConstantPool* asConstantPool(JVMCIObject constant_pool);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   360
  ConstantPool* asConstantPool(jobject constant_pool)  { return asConstantPool(wrap(constant_pool)); }
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   361
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   362
  JVMCIObject get_jvmci_constant_pool(const constantPoolHandle& cp, JVMCI_TRAPS);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   363
  JVMCIObject get_jvmci_primitive_type(BasicType type);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   364
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   365
  Handle asConstant(JVMCIObject object, JVMCI_TRAPS);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   366
  JVMCIObject get_object_constant(oop objOop, bool compressed = false, bool dont_register = false);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   367
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   368
  JVMCIPrimitiveArray new_booleanArray(int length, JVMCI_TRAPS);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   369
  JVMCIPrimitiveArray new_byteArray(int length, JVMCI_TRAPS);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   370
  JVMCIPrimitiveArray new_intArray(int length, JVMCI_TRAPS);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   371
  JVMCIPrimitiveArray new_longArray(int length, JVMCI_TRAPS);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   372
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   373
  JVMCIObjectArray new_byte_array_array(int length, JVMCI_TRAPS);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   374
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   375
  JVMCIObject new_StackTraceElement(const methodHandle& method, int bci, JVMCI_TRAPS);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   376
  JVMCIObject new_HotSpotNmethod(const methodHandle& method, const char* name, jboolean isDefault, jlong compileId, JVMCI_TRAPS);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   377
  JVMCIObject new_VMField(JVMCIObject name, JVMCIObject type, jlong offset, jlong address, JVMCIObject value, JVMCI_TRAPS);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   378
  JVMCIObject new_VMFlag(JVMCIObject name, JVMCIObject type, JVMCIObject value, JVMCI_TRAPS);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   379
  JVMCIObject new_VMIntrinsicMethod(JVMCIObject declaringClass, JVMCIObject name, JVMCIObject descriptor, int id, JVMCI_TRAPS);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   380
  JVMCIObject new_HotSpotStackFrameReference(JVMCI_TRAPS);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   381
  JVMCIObject new_JVMCIError(JVMCI_TRAPS);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   382
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   383
  jlong make_handle(const Handle& obj);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   384
  oop resolve_handle(jlong objectHandle);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   385
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   386
  // These are analagous to the JNI routines
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   387
  JVMCIObject make_local(JVMCIObject object);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   388
  JVMCIObject make_global(JVMCIObject object);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   389
  JVMCIObject make_weak(JVMCIObject object);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   390
  void destroy_local(JVMCIObject object);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   391
  void destroy_global(JVMCIObject object);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   392
  void destroy_weak(JVMCIObject object);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   393
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   394
  // Deoptimizes the nmethod (if any) in the HotSpotNmethod.address
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   395
  // field of mirror. The field is subsequently zeroed.
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   396
  void invalidate_nmethod_mirror(JVMCIObject mirror, JVMCI_TRAPS);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   397
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   398
  void initialize_installed_code(JVMCIObject installed_code, CodeBlob* cb, JVMCI_TRAPS);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   399
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   400
 private:
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   401
  JVMCICompileState* _compile_state;
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   402
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   403
 public:
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   404
  static JavaVM* get_shared_library_javavm() { return _shared_library_javavm; }
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   405
  static void* get_shared_library_handle()   { return _shared_library_handle; }
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   406
  static char* get_shared_library_path()     { return _shared_library_path; }
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   407
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   408
  // Determines if this is for the JVMCI runtime in the HotSpot
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   409
  // heap (true) or the shared library heap (false).
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   410
  bool is_hotspot() { return _is_hotspot; }
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   411
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   412
  JVMCICompileState* compile_state() { return _compile_state; }
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   413
  void set_compile_state(JVMCICompileState* compile_state) {
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   414
    assert(_compile_state == NULL, "set only once");
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   415
    _compile_state = compile_state;
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   416
  }
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   417
  // Generate declarations for the initialize, new, isa, get and set methods for all the types and
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   418
  // fields declared in the JVMCI_CLASSES_DO macro.
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   419
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   420
#define START_CLASS(className, fullClassName)                           \
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   421
  void className##_initialize(JVMCI_TRAPS); \
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   422
  JVMCIObjectArray new_##className##_array(int length, JVMCI_TRAPS); \
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   423
  bool isa_##className(JVMCIObject object);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   424
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   425
#define END_CLASS
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   426
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   427
#define FIELD(className, name, type, accessor)                                                                                                                         \
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   428
  type get_ ## className ## _ ## name(JVMCIObject obj); \
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   429
  void set_ ## className ## _ ## name(JVMCIObject obj, type x);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   430
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   431
#define OOPISH_FIELD(className, name, type, hstype, accessor) \
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   432
  FIELD(className, name, type, accessor)
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   433
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   434
#define STATIC_FIELD(className, name, type) \
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   435
  type get_ ## className ## _ ## name(); \
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   436
  void set_ ## className ## _ ## name(type x);
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   437
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   438
#define STATIC_OOPISH_FIELD(className, name, type, hstype) \
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   439
  STATIC_FIELD(className, name, type)
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   440
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   441
#define EMPTY_CAST
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   442
#define CHAR_FIELD(className,  name) FIELD(className, name, jchar, char_field)
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   443
#define INT_FIELD(className,  name) FIELD(className, name, jint, int_field)
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   444
#define BOOLEAN_FIELD(className,  name) FIELD(className, name, jboolean, bool_field)
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   445
#define LONG_FIELD(className,  name) FIELD(className, name, jlong, long_field)
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   446
#define FLOAT_FIELD(className,  name) FIELD(className, name, jfloat, float_field)
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   447
#define OBJECT_FIELD(className,  name, signature) OOPISH_FIELD(className, name, JVMCIObject, oop, obj_field)
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   448
#define OBJECTARRAY_FIELD(className,  name, signature) OOPISH_FIELD(className, name, JVMCIObjectArray, objArrayOop, obj_field)
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   449
#define PRIMARRAY_FIELD(className,  name, signature) OOPISH_FIELD(className, name, JVMCIPrimitiveArray, typeArrayOop, obj_field)
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   450
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   451
#define STATIC_INT_FIELD(className, name) STATIC_FIELD(className, name, jint)
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   452
#define STATIC_BOOLEAN_FIELD(className, name) STATIC_FIELD(className, name, jboolean)
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   453
#define STATIC_OBJECT_FIELD(className, name, signature) STATIC_OOPISH_FIELD(className, name, JVMCIObject, oop)
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   454
#define STATIC_OBJECTARRAY_FIELD(className, name, signature) STATIC_OOPISH_FIELD(className, name, JVMCIObjectArray, objArrayOop)
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   455
#define METHOD(jniCallType, jniGetMethod, hsCallType, returnType, className, methodName, signatureSymbolName, args)
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   456
#define CONSTRUCTOR(className, signature)
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   457
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   458
  JVMCI_CLASSES_DO(START_CLASS, END_CLASS, CHAR_FIELD, INT_FIELD, BOOLEAN_FIELD, LONG_FIELD, FLOAT_FIELD, OBJECT_FIELD, PRIMARRAY_FIELD, OBJECTARRAY_FIELD, STATIC_OBJECT_FIELD, STATIC_OBJECTARRAY_FIELD, STATIC_INT_FIELD, STATIC_BOOLEAN_FIELD, METHOD, CONSTRUCTOR)
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   459
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   460
#undef JNI_START_CLASS
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   461
#undef START_CLASS
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   462
#undef END_CLASS
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   463
#undef METHOD
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   464
#undef CONSTRUCTOR
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   465
#undef FIELD
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   466
#undef CHAR_FIELD
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   467
#undef INT_FIELD
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   468
#undef BOOLEAN_FIELD
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   469
#undef LONG_FIELD
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   470
#undef FLOAT_FIELD
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   471
#undef OBJECT_FIELD
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   472
#undef PRIMARRAY_FIELD
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   473
#undef OBJECTARRAY_FIELD
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   474
#undef FIELD
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   475
#undef OOPISH_FIELD
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   476
#undef STATIC_FIELD
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   477
#undef STATIC_OOPISH_FIELD
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   478
#undef STATIC_FIELD
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   479
#undef STATIC_OBJECT_FIELD
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   480
#undef STATIC_OBJECTARRAY_FIELD
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   481
#undef STATIC_INT_FIELD
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   482
#undef STATIC_BOOLEAN_FIELD
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   483
#undef EMPTY_CAST
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   484
ad45b3802d4e 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents: 53430
diff changeset
   485
  // End of JVMCIEnv
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   486
};
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   487
53244
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 48299
diff changeset
   488
#endif // SHARE_JVMCI_JVMCIENV_HPP