33160
|
1 |
/*
|
|
2 |
* Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
|
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
4 |
*
|
|
5 |
* This code is free software; you can redistribute it and/or modify it
|
|
6 |
* under the terms of the GNU General Public License version 2 only, as
|
|
7 |
* published by the Free Software Foundation.
|
|
8 |
*
|
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that
|
|
13 |
* accompanied this code).
|
|
14 |
*
|
|
15 |
* You should have received a copy of the GNU General Public License version
|
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
18 |
*
|
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
20 |
* or visit www.oracle.com if you need additional information or have any
|
|
21 |
* questions.
|
|
22 |
*
|
|
23 |
*/
|
|
24 |
|
|
25 |
#ifndef SHARE_VM_JVMCI_VMSTRUCTS_JVMCI_HPP
|
|
26 |
#define SHARE_VM_JVMCI_VMSTRUCTS_JVMCI_HPP
|
|
27 |
|
|
28 |
#include "compiler/abstractCompiler.hpp"
|
|
29 |
#include "jvmci/jvmciCodeInstaller.hpp"
|
|
30 |
#include "jvmci/jvmciCompilerToVM.hpp"
|
|
31 |
#include "jvmci/jvmciEnv.hpp"
|
|
32 |
#include "jvmci/jvmciRuntime.hpp"
|
|
33 |
|
|
34 |
#define VM_STRUCTS_JVMCI(nonstatic_field, static_field) \
|
|
35 |
nonstatic_field(JavaThread, _pending_deoptimization, int) \
|
|
36 |
nonstatic_field(JavaThread, _pending_failed_speculation, oop) \
|
|
37 |
nonstatic_field(JavaThread, _pending_transfer_to_interpreter, bool) \
|
|
38 |
nonstatic_field(JavaThread, _jvmci_counters, jlong*) \
|
|
39 |
nonstatic_field(MethodData, _jvmci_ir_size, int) \
|
|
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 |
|
|
48 |
#define VM_TYPES_JVMCI(declare_type, declare_toplevel_type) \
|
|
49 |
declare_toplevel_type(CompilerToVM) \
|
|
50 |
declare_toplevel_type(JVMCIEnv) \
|
|
51 |
|
|
52 |
#define VM_INT_CONSTANTS_JVMCI(declare_constant, declare_preprocessor_constant) \
|
|
53 |
declare_constant(Deoptimization::Reason_unreached0) \
|
|
54 |
declare_constant(Deoptimization::Reason_type_checked_inlining) \
|
|
55 |
declare_constant(Deoptimization::Reason_optimized_type_check) \
|
|
56 |
declare_constant(Deoptimization::Reason_aliasing) \
|
|
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 |
\
|
33632
|
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 |
\
|
33160
|
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) \
|
33632
|
101 |
declare_constant(CodeInstaller::CARD_TABLE_SHIFT) \
|
33160
|
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 |
|
|
111 |
#define VM_ADDRESSES_JVMCI(declare_address, declare_preprocessor_address, declare_function) \
|
|
112 |
declare_function(JVMCIRuntime::new_instance) \
|
|
113 |
declare_function(JVMCIRuntime::new_array) \
|
|
114 |
declare_function(JVMCIRuntime::new_multi_array) \
|
|
115 |
declare_function(JVMCIRuntime::dynamic_new_array) \
|
|
116 |
declare_function(JVMCIRuntime::dynamic_new_instance) \
|
|
117 |
\
|
|
118 |
declare_function(JVMCIRuntime::thread_is_interrupted) \
|
|
119 |
declare_function(JVMCIRuntime::vm_message) \
|
|
120 |
declare_function(JVMCIRuntime::identity_hash_code) \
|
|
121 |
declare_function(JVMCIRuntime::exception_handler_for_pc) \
|
|
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 |
|
|
137 |
#endif // SHARE_VM_JVMCI_VMSTRUCTS_JVMCI_HPP
|