hotspot/src/share/vm/jvmci/vmStructs_jvmci.hpp
changeset 35123 b0b89d83bcf5
parent 33632 038347770a9e
child 39423 0f8dc3693499
equal deleted inserted replaced
35121:e8900e5763ff 35123:b0b89d83bcf5
    23  */
    23  */
    24 
    24 
    25 #ifndef SHARE_VM_JVMCI_VMSTRUCTS_JVMCI_HPP
    25 #ifndef SHARE_VM_JVMCI_VMSTRUCTS_JVMCI_HPP
    26 #define SHARE_VM_JVMCI_VMSTRUCTS_JVMCI_HPP
    26 #define SHARE_VM_JVMCI_VMSTRUCTS_JVMCI_HPP
    27 
    27 
    28 #include "compiler/abstractCompiler.hpp"
    28 #include "runtime/vmStructs.hpp"
    29 #include "jvmci/jvmciCodeInstaller.hpp"
       
    30 #include "jvmci/jvmciCompilerToVM.hpp"
       
    31 #include "jvmci/jvmciEnv.hpp"
       
    32 #include "jvmci/jvmciRuntime.hpp"
       
    33 
    29 
    34 #define VM_STRUCTS_JVMCI(nonstatic_field, static_field)                               \
    30 class JVMCIVMStructs {
    35   nonstatic_field(JavaThread,    _pending_deoptimization,               int)          \
    31 public:
    36   nonstatic_field(JavaThread,    _pending_failed_speculation,           oop)          \
    32   /**
    37   nonstatic_field(JavaThread,    _pending_transfer_to_interpreter,      bool)         \
    33    * The last entry has a NULL fieldName.
    38   nonstatic_field(JavaThread,    _jvmci_counters,                       jlong*)       \
    34    */
    39   nonstatic_field(MethodData,    _jvmci_ir_size,                        int)          \
    35   static VMStructEntry localHotSpotVMStructs[];
    40   nonstatic_field(JVMCIEnv,      _task,                                 CompileTask*) \
       
    41   nonstatic_field(JVMCIEnv,      _jvmti_can_hotswap_or_post_breakpoint, bool)         \
       
    42   nonstatic_field(DeoptimizationBlob, _uncommon_trap_offset,            int)          \
       
    43   \
       
    44   static_field(CompilerToVM, _supports_inline_contig_alloc, bool) \
       
    45   static_field(CompilerToVM, _heap_end_addr, HeapWord**) \
       
    46   static_field(CompilerToVM, _heap_top_addr, HeapWord**)
       
    47 
    36 
    48 #define VM_TYPES_JVMCI(declare_type, declare_toplevel_type)                   \
    37   /**
    49   declare_toplevel_type(CompilerToVM)                                         \
    38    * The last entry has a NULL typeName.
    50   declare_toplevel_type(JVMCIEnv)                                             \
    39    */
       
    40   static VMTypeEntry localHotSpotVMTypes[];
    51 
    41 
    52 #define VM_INT_CONSTANTS_JVMCI(declare_constant, declare_preprocessor_constant)                   \
    42   /**
    53   declare_constant(Deoptimization::Reason_unreached0)                                             \
    43    * Table of integer constants.
    54   declare_constant(Deoptimization::Reason_type_checked_inlining)                                  \
    44    * The last entry has a NULL typeName.
    55   declare_constant(Deoptimization::Reason_optimized_type_check)                                   \
    45    */
    56   declare_constant(Deoptimization::Reason_aliasing)                                               \
    46   static VMIntConstantEntry localHotSpotVMIntConstants[];
    57   declare_constant(Deoptimization::Reason_transfer_to_interpreter)                                \
       
    58   declare_constant(Deoptimization::Reason_not_compiled_exception_handler)                         \
       
    59   declare_constant(Deoptimization::Reason_unresolved)                                             \
       
    60   declare_constant(Deoptimization::Reason_jsr_mismatch)                                           \
       
    61   declare_constant(JVMCIEnv::ok)                                                                  \
       
    62   declare_constant(JVMCIEnv::dependencies_failed)                                                 \
       
    63   declare_constant(JVMCIEnv::dependencies_invalid)                                                \
       
    64   declare_constant(JVMCIEnv::cache_full)                                                          \
       
    65   declare_constant(JVMCIEnv::code_too_large)                                                      \
       
    66                                                                                                   \
       
    67   declare_preprocessor_constant("JVM_ACC_SYNTHETIC", JVM_ACC_SYNTHETIC)                           \
       
    68   declare_preprocessor_constant("JVM_RECOGNIZED_FIELD_MODIFIERS", JVM_RECOGNIZED_FIELD_MODIFIERS) \
       
    69                                                                                                   \
       
    70   declare_constant(CompilerToVM::KLASS_TAG)                                                       \
       
    71   declare_constant(CompilerToVM::SYMBOL_TAG)                                                      \
       
    72                                                                                                   \
       
    73   declare_constant(BitData::exception_seen_flag)                                                  \
       
    74   declare_constant(BitData::null_seen_flag)                                                       \
       
    75   declare_constant(CounterData::count_off)                                                        \
       
    76   declare_constant(JumpData::taken_off_set)                                                       \
       
    77   declare_constant(JumpData::displacement_off_set)                                                \
       
    78   declare_constant(ReceiverTypeData::nonprofiled_count_off_set)                                   \
       
    79   declare_constant(ReceiverTypeData::receiver_type_row_cell_count)                                \
       
    80   declare_constant(ReceiverTypeData::receiver0_offset)                                            \
       
    81   declare_constant(ReceiverTypeData::count0_offset)                                               \
       
    82   declare_constant(BranchData::not_taken_off_set)                                                 \
       
    83   declare_constant(ArrayData::array_len_off_set)                                                  \
       
    84   declare_constant(ArrayData::array_start_off_set)                                                \
       
    85   declare_constant(MultiBranchData::per_case_cell_count)                                          \
       
    86                                                                                                   \
       
    87   declare_constant(CodeInstaller::VERIFIED_ENTRY)                                                 \
       
    88   declare_constant(CodeInstaller::UNVERIFIED_ENTRY)                                               \
       
    89   declare_constant(CodeInstaller::OSR_ENTRY)                                                      \
       
    90   declare_constant(CodeInstaller::EXCEPTION_HANDLER_ENTRY)                                        \
       
    91   declare_constant(CodeInstaller::DEOPT_HANDLER_ENTRY)                                            \
       
    92   declare_constant(CodeInstaller::INVOKEINTERFACE)                                                \
       
    93   declare_constant(CodeInstaller::INVOKEVIRTUAL)                                                  \
       
    94   declare_constant(CodeInstaller::INVOKESTATIC)                                                   \
       
    95   declare_constant(CodeInstaller::INVOKESPECIAL)                                                  \
       
    96   declare_constant(CodeInstaller::INLINE_INVOKE)                                                  \
       
    97   declare_constant(CodeInstaller::POLL_NEAR)                                                      \
       
    98   declare_constant(CodeInstaller::POLL_RETURN_NEAR)                                               \
       
    99   declare_constant(CodeInstaller::POLL_FAR)                                                       \
       
   100   declare_constant(CodeInstaller::POLL_RETURN_FAR)                                                \
       
   101   declare_constant(CodeInstaller::CARD_TABLE_SHIFT)                                               \
       
   102   declare_constant(CodeInstaller::CARD_TABLE_ADDRESS)                                             \
       
   103   declare_constant(CodeInstaller::HEAP_TOP_ADDRESS)                                               \
       
   104   declare_constant(CodeInstaller::HEAP_END_ADDRESS)                                               \
       
   105   declare_constant(CodeInstaller::NARROW_KLASS_BASE_ADDRESS)                                      \
       
   106   declare_constant(CodeInstaller::CRC_TABLE_ADDRESS)                                              \
       
   107   declare_constant(CodeInstaller::INVOKE_INVALID)                                                 \
       
   108                                                                                                   \
       
   109   declare_constant(Method::invalid_vtable_index)                                                  \
       
   110 
    47 
   111 #define VM_ADDRESSES_JVMCI(declare_address, declare_preprocessor_address, declare_function)      \
    48   /**
   112   declare_function(JVMCIRuntime::new_instance) \
    49    * Table of long constants.
   113   declare_function(JVMCIRuntime::new_array) \
    50    * The last entry has a NULL typeName.
   114   declare_function(JVMCIRuntime::new_multi_array) \
    51    */
   115   declare_function(JVMCIRuntime::dynamic_new_array) \
    52   static VMLongConstantEntry localHotSpotVMLongConstants[];
   116   declare_function(JVMCIRuntime::dynamic_new_instance) \
    53 
   117   \
    54   /**
   118   declare_function(JVMCIRuntime::thread_is_interrupted) \
    55    * Table of addresses.
   119   declare_function(JVMCIRuntime::vm_message) \
    56    */
   120   declare_function(JVMCIRuntime::identity_hash_code) \
    57   static VMAddressEntry localHotSpotVMAddresses[];
   121   declare_function(JVMCIRuntime::exception_handler_for_pc) \
    58 };
   122   declare_function(JVMCIRuntime::monitorenter) \
       
   123   declare_function(JVMCIRuntime::monitorexit) \
       
   124   declare_function(JVMCIRuntime::create_null_exception) \
       
   125   declare_function(JVMCIRuntime::create_out_of_bounds_exception) \
       
   126   declare_function(JVMCIRuntime::log_primitive) \
       
   127   declare_function(JVMCIRuntime::log_object) \
       
   128   declare_function(JVMCIRuntime::log_printf) \
       
   129   declare_function(JVMCIRuntime::vm_error) \
       
   130   declare_function(JVMCIRuntime::load_and_clear_exception) \
       
   131   declare_function(JVMCIRuntime::write_barrier_pre) \
       
   132   declare_function(JVMCIRuntime::write_barrier_post) \
       
   133   declare_function(JVMCIRuntime::validate_object) \
       
   134   \
       
   135   declare_function(JVMCIRuntime::test_deoptimize_call_int)
       
   136 
    59 
   137 #endif // SHARE_VM_JVMCI_VMSTRUCTS_JVMCI_HPP
    60 #endif // SHARE_VM_JVMCI_VMSTRUCTS_JVMCI_HPP