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 #include "precompiled.hpp"
25 #include "asm/register.hpp"
26 #include "classfile/vmSymbols.hpp"
27 #include "code/compiledIC.hpp"
28 #include "code/vmreg.inline.hpp"
29 #include "compiler/compileBroker.hpp"
30 #include "compiler/disassembler.hpp"
31 #include "jvmci/jvmciEnv.hpp"
32 #include "jvmci/jvmciCompiler.hpp"
33 #include "jvmci/jvmciCodeInstaller.hpp"
34 #include "jvmci/jvmciJavaClasses.hpp"
35 #include "jvmci/jvmciCompilerToVM.hpp"
36 #include "jvmci/jvmciRuntime.hpp"
37 #include "oops/oop.inline.hpp"
38 #include "oops/objArrayOop.inline.hpp"
39 #include "runtime/javaCalls.hpp"
40
41 // frequently used constants
42 // Allocate them with new so they are never destroyed (otherwise, a
43 // forced exit could destroy these objects while they are still in
44 // use).
45 ConstantOopWriteValue* CodeInstaller::_oop_null_scope_value = new (ResourceObj::C_HEAP, mtCompiler) ConstantOopWriteValue(NULL);
46 ConstantIntValue* CodeInstaller::_int_m1_scope_value = new (ResourceObj::C_HEAP, mtCompiler) ConstantIntValue(-1);
47 ConstantIntValue* CodeInstaller::_int_0_scope_value = new (ResourceObj::C_HEAP, mtCompiler) ConstantIntValue(0);
48 ConstantIntValue* CodeInstaller::_int_1_scope_value = new (ResourceObj::C_HEAP, mtCompiler) ConstantIntValue(1);
49 ConstantIntValue* CodeInstaller::_int_2_scope_value = new (ResourceObj::C_HEAP, mtCompiler) ConstantIntValue(2);
50 LocationValue* CodeInstaller::_illegal_value = new (ResourceObj::C_HEAP, mtCompiler) LocationValue(Location());
51
52 Method* getMethodFromHotSpotMethod(oop hotspot_method) {
53 assert(hotspot_method != NULL && hotspot_method->is_a(HotSpotResolvedJavaMethodImpl::klass()), "sanity");
54 return CompilerToVM::asMethod(hotspot_method);
55 }
56
57 VMReg getVMRegFromLocation(Handle location, int total_frame_size, TRAPS) {
58 if (location.is_null()) {
1264 case POLL_RETURN_NEAR:
1265 case POLL_RETURN_FAR:
1266 pd_relocate_poll(pc, id, CHECK);
1267 break;
1268 case CARD_TABLE_SHIFT:
1269 case CARD_TABLE_ADDRESS:
1270 case HEAP_TOP_ADDRESS:
1271 case HEAP_END_ADDRESS:
1272 case NARROW_KLASS_BASE_ADDRESS:
1273 case NARROW_OOP_BASE_ADDRESS:
1274 case CRC_TABLE_ADDRESS:
1275 case LOG_OF_HEAP_REGION_GRAIN_BYTES:
1276 case INLINE_CONTIGUOUS_ALLOCATION_SUPPORTED:
1277 break;
1278 default:
1279 JVMCI_ERROR("invalid mark id: %d", id);
1280 break;
1281 }
1282 }
1283 }
1284
|
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 #include "precompiled.hpp"
25 #include "asm/register.hpp"
26 #include "classfile/vmSymbols.hpp"
27 #include "code/compiledIC.hpp"
28 #include "code/vmreg.inline.hpp"
29 #include "compiler/compileBroker.hpp"
30 #include "compiler/disassembler.hpp"
31 #include "jvmci/jvmciEnv.hpp"
32 #include "jvmci/jvmciCompiler.hpp"
33 #include "jvmci/jvmciCodeInstaller.hpp"
34 #include "jvmci/jvmciJavaClasses.hpp"
35 #include "jvmci/jvmciCompilerToVM.hpp"
36 #include "jvmci/jvmciRuntime.hpp"
37 #include "oops/oop.inline.hpp"
38 #include "oops/objArrayOop.inline.hpp"
39 #include "oops/typeArrayOop.inline.hpp"
40 #include "runtime/javaCalls.hpp"
41
42 // frequently used constants
43 // Allocate them with new so they are never destroyed (otherwise, a
44 // forced exit could destroy these objects while they are still in
45 // use).
46 ConstantOopWriteValue* CodeInstaller::_oop_null_scope_value = new (ResourceObj::C_HEAP, mtCompiler) ConstantOopWriteValue(NULL);
47 ConstantIntValue* CodeInstaller::_int_m1_scope_value = new (ResourceObj::C_HEAP, mtCompiler) ConstantIntValue(-1);
48 ConstantIntValue* CodeInstaller::_int_0_scope_value = new (ResourceObj::C_HEAP, mtCompiler) ConstantIntValue(0);
49 ConstantIntValue* CodeInstaller::_int_1_scope_value = new (ResourceObj::C_HEAP, mtCompiler) ConstantIntValue(1);
50 ConstantIntValue* CodeInstaller::_int_2_scope_value = new (ResourceObj::C_HEAP, mtCompiler) ConstantIntValue(2);
51 LocationValue* CodeInstaller::_illegal_value = new (ResourceObj::C_HEAP, mtCompiler) LocationValue(Location());
52
53 Method* getMethodFromHotSpotMethod(oop hotspot_method) {
54 assert(hotspot_method != NULL && hotspot_method->is_a(HotSpotResolvedJavaMethodImpl::klass()), "sanity");
55 return CompilerToVM::asMethod(hotspot_method);
56 }
57
58 VMReg getVMRegFromLocation(Handle location, int total_frame_size, TRAPS) {
59 if (location.is_null()) {
1265 case POLL_RETURN_NEAR:
1266 case POLL_RETURN_FAR:
1267 pd_relocate_poll(pc, id, CHECK);
1268 break;
1269 case CARD_TABLE_SHIFT:
1270 case CARD_TABLE_ADDRESS:
1271 case HEAP_TOP_ADDRESS:
1272 case HEAP_END_ADDRESS:
1273 case NARROW_KLASS_BASE_ADDRESS:
1274 case NARROW_OOP_BASE_ADDRESS:
1275 case CRC_TABLE_ADDRESS:
1276 case LOG_OF_HEAP_REGION_GRAIN_BYTES:
1277 case INLINE_CONTIGUOUS_ALLOCATION_SUPPORTED:
1278 break;
1279 default:
1280 JVMCI_ERROR("invalid mark id: %d", id);
1281 break;
1282 }
1283 }
1284 }
|