Mercurial > hg > graal-jvmci-8
comparison src/share/vm/prims/jvm.cpp @ 2376:c7f3d0b4570f
7017732: move static fields into Class to prepare for perm gen removal
Reviewed-by: kvn, coleenp, twisti, stefank
author | never |
---|---|
date | Fri, 18 Mar 2011 16:00:34 -0700 |
parents | d70fe6ab4436 |
children | 19241ae0d839 |
comparison
equal
deleted
inserted
replaced
2375:d673ef06fe96 | 2376:c7f3d0b4570f |
---|---|
1806 constantTag tag = cp->tag_at(index); | 1806 constantTag tag = cp->tag_at(index); |
1807 if (!tag.is_klass() && !tag.is_unresolved_klass()) { | 1807 if (!tag.is_klass() && !tag.is_unresolved_klass()) { |
1808 THROW_MSG_0(vmSymbols::java_lang_IllegalArgumentException(), "Wrong type at constant pool index"); | 1808 THROW_MSG_0(vmSymbols::java_lang_IllegalArgumentException(), "Wrong type at constant pool index"); |
1809 } | 1809 } |
1810 klassOop k = cp->klass_at(index, CHECK_NULL); | 1810 klassOop k = cp->klass_at(index, CHECK_NULL); |
1811 return (jclass) JNIHandles::make_local(k->klass_part()->java_mirror()); | 1811 return (jclass) JNIHandles::make_local(k->java_mirror()); |
1812 } | 1812 } |
1813 JVM_END | 1813 JVM_END |
1814 | 1814 |
1815 | 1815 |
1816 JVM_ENTRY(jclass, JVM_ConstantPoolGetClassAtIfLoaded(JNIEnv *env, jobject unused, jobject jcpool, jint index)) | 1816 JVM_ENTRY(jclass, JVM_ConstantPoolGetClassAtIfLoaded(JNIEnv *env, jobject unused, jobject jcpool, jint index)) |
1822 if (!tag.is_klass() && !tag.is_unresolved_klass()) { | 1822 if (!tag.is_klass() && !tag.is_unresolved_klass()) { |
1823 THROW_MSG_0(vmSymbols::java_lang_IllegalArgumentException(), "Wrong type at constant pool index"); | 1823 THROW_MSG_0(vmSymbols::java_lang_IllegalArgumentException(), "Wrong type at constant pool index"); |
1824 } | 1824 } |
1825 klassOop k = constantPoolOopDesc::klass_at_if_loaded(cp, index); | 1825 klassOop k = constantPoolOopDesc::klass_at_if_loaded(cp, index); |
1826 if (k == NULL) return NULL; | 1826 if (k == NULL) return NULL; |
1827 return (jclass) JNIHandles::make_local(k->klass_part()->java_mirror()); | 1827 return (jclass) JNIHandles::make_local(k->java_mirror()); |
1828 } | 1828 } |
1829 JVM_END | 1829 JVM_END |
1830 | 1830 |
1831 static jobject get_method_at_helper(constantPoolHandle cp, jint index, bool force_resolution, TRAPS) { | 1831 static jobject get_method_at_helper(constantPoolHandle cp, jint index, bool force_resolution, TRAPS) { |
1832 constantTag tag = cp->tag_at(index); | 1832 constantTag tag = cp->tag_at(index); |