< prev index next >

src/hotspot/share/jvmci/jvmciCompilerToVM.cpp

Print this page

2195         case T_SHORT:         value.s = typeArrayOop(xobj())->short_at(index);          break;
2196         case T_CHAR:          value.c = typeArrayOop(xobj())->char_at(index);           break;
2197         case T_BYTE:          value.b = typeArrayOop(xobj())->byte_at(index);           break;
2198         case T_BOOLEAN:       value.z = typeArrayOop(xobj())->byte_at(index) & 1;       break;
2199         default:              ShouldNotReachHere();
2200       }
2201       result = JVMCIENV->create_box(element_type, &value, JVMCI_CHECK_NULL);
2202     }
2203     assert(!result.is_null(), "must have a value");
2204     return JVMCIENV->get_jobject(result);
2205   }
2206   return NULL;;
2207 C2V_END
2208 
2209 
2210 C2V_VMENTRY_0(jint, arrayBaseOffset, (JNIEnv* env, jobject, jobject kind))
2211   if (kind == NULL) {
2212     JVMCI_THROW_0(NullPointerException);
2213   }
2214   BasicType type = JVMCIENV->kindToBasicType(JVMCIENV->wrap(kind), JVMCI_CHECK_0);
2215   return arrayOopDesc::header_size(type) * HeapWordSize;
2216 C2V_END
2217 
2218 C2V_VMENTRY_0(jint, arrayIndexScale, (JNIEnv* env, jobject, jobject kind))
2219   if (kind == NULL) {
2220     JVMCI_THROW_0(NullPointerException);
2221   }
2222   BasicType type = JVMCIENV->kindToBasicType(JVMCIENV->wrap(kind), JVMCI_CHECK_0);
2223   return type2aelembytes(type);
2224 C2V_END
2225 
2226 C2V_VMENTRY(void, deleteGlobalHandle, (JNIEnv* env, jobject, jlong handle))
2227   if (handle != 0) {
2228     JVMCIENV->runtime()->destroy_oop_handle(handle);
2229   }
2230 }
2231 
2232 static void requireJVMCINativeLibrary(JVMCI_TRAPS) {
2233   if (!UseJVMCINativeLibrary) {
2234     JVMCI_THROW_MSG(UnsupportedOperationException, "JVMCI shared library is not enabled (requires -XX:+UseJVMCINativeLibrary)");
2235   }

2195         case T_SHORT:         value.s = typeArrayOop(xobj())->short_at(index);          break;
2196         case T_CHAR:          value.c = typeArrayOop(xobj())->char_at(index);           break;
2197         case T_BYTE:          value.b = typeArrayOop(xobj())->byte_at(index);           break;
2198         case T_BOOLEAN:       value.z = typeArrayOop(xobj())->byte_at(index) & 1;       break;
2199         default:              ShouldNotReachHere();
2200       }
2201       result = JVMCIENV->create_box(element_type, &value, JVMCI_CHECK_NULL);
2202     }
2203     assert(!result.is_null(), "must have a value");
2204     return JVMCIENV->get_jobject(result);
2205   }
2206   return NULL;;
2207 C2V_END
2208 
2209 
2210 C2V_VMENTRY_0(jint, arrayBaseOffset, (JNIEnv* env, jobject, jobject kind))
2211   if (kind == NULL) {
2212     JVMCI_THROW_0(NullPointerException);
2213   }
2214   BasicType type = JVMCIENV->kindToBasicType(JVMCIENV->wrap(kind), JVMCI_CHECK_0);
2215   return arrayOopDesc::base_offset_in_bytes(type);
2216 C2V_END
2217 
2218 C2V_VMENTRY_0(jint, arrayIndexScale, (JNIEnv* env, jobject, jobject kind))
2219   if (kind == NULL) {
2220     JVMCI_THROW_0(NullPointerException);
2221   }
2222   BasicType type = JVMCIENV->kindToBasicType(JVMCIENV->wrap(kind), JVMCI_CHECK_0);
2223   return type2aelembytes(type);
2224 C2V_END
2225 
2226 C2V_VMENTRY(void, deleteGlobalHandle, (JNIEnv* env, jobject, jlong handle))
2227   if (handle != 0) {
2228     JVMCIENV->runtime()->destroy_oop_handle(handle);
2229   }
2230 }
2231 
2232 static void requireJVMCINativeLibrary(JVMCI_TRAPS) {
2233   if (!UseJVMCINativeLibrary) {
2234     JVMCI_THROW_MSG(UnsupportedOperationException, "JVMCI shared library is not enabled (requires -XX:+UseJVMCINativeLibrary)");
2235   }
< prev index next >