hotspot/src/share/vm/prims/jvm.cpp
changeset 46727 6e4a84748e2c
parent 46660 d19370887e09
child 46968 9119841280f4
equal deleted inserted replaced
46726:7801367e3cc9 46727:6e4a84748e2c
  1684   }
  1684   }
  1685 
  1685 
  1686   return (jbyteArray) JNIHandles::make_local(env, Annotations::make_java_array(fd.type_annotations(), THREAD));
  1686   return (jbyteArray) JNIHandles::make_local(env, Annotations::make_java_array(fd.type_annotations(), THREAD));
  1687 JVM_END
  1687 JVM_END
  1688 
  1688 
  1689 static void bounds_check(constantPoolHandle cp, jint index, TRAPS) {
  1689 static void bounds_check(const constantPoolHandle& cp, jint index, TRAPS) {
  1690   if (!cp->is_within_bounds(index)) {
  1690   if (!cp->is_within_bounds(index)) {
  1691     THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(), "Constant pool index out of bounds");
  1691     THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(), "Constant pool index out of bounds");
  1692   }
  1692   }
  1693 }
  1693 }
  1694 
  1694 
  1792   assert(out_idx == num_fields, "just checking");
  1792   assert(out_idx == num_fields, "just checking");
  1793   return (jobjectArray) JNIHandles::make_local(env, result());
  1793   return (jobjectArray) JNIHandles::make_local(env, result());
  1794 }
  1794 }
  1795 JVM_END
  1795 JVM_END
  1796 
  1796 
  1797 static bool select_method(methodHandle method, bool want_constructor) {
  1797 static bool select_method(const methodHandle& method, bool want_constructor) {
  1798   if (want_constructor) {
  1798   if (want_constructor) {
  1799     return (method->is_initializer() && !method->is_static());
  1799     return (method->is_initializer() && !method->is_static());
  1800   } else {
  1800   } else {
  1801     return  (!method->is_initializer() && !method->is_overpass());
  1801     return  (!method->is_initializer() && !method->is_overpass());
  1802   }
  1802   }
  1961   if (k == NULL) return NULL;
  1961   if (k == NULL) return NULL;
  1962   return (jclass) JNIHandles::make_local(k->java_mirror());
  1962   return (jclass) JNIHandles::make_local(k->java_mirror());
  1963 }
  1963 }
  1964 JVM_END
  1964 JVM_END
  1965 
  1965 
  1966 static jobject get_method_at_helper(constantPoolHandle cp, jint index, bool force_resolution, TRAPS) {
  1966 static jobject get_method_at_helper(const constantPoolHandle& cp, jint index, bool force_resolution, TRAPS) {
  1967   constantTag tag = cp->tag_at(index);
  1967   constantTag tag = cp->tag_at(index);
  1968   if (!tag.is_method() && !tag.is_interface_method()) {
  1968   if (!tag.is_method() && !tag.is_interface_method()) {
  1969     THROW_MSG_0(vmSymbols::java_lang_IllegalArgumentException(), "Wrong type at constant pool index");
  1969     THROW_MSG_0(vmSymbols::java_lang_IllegalArgumentException(), "Wrong type at constant pool index");
  1970   }
  1970   }
  1971   int klass_ref  = cp->uncached_klass_ref_index_at(index);
  1971   int klass_ref  = cp->uncached_klass_ref_index_at(index);