Mercurial > hg > truffle
comparison src/share/vm/prims/jvm.cpp @ 6213:8150fa46d2ed
7178145: Change constMethodOop::_exception_table to optionally inlined u2 table.
Summary: Change constMethodOop::_exception_table to optionally inlined u2 table.
Reviewed-by: bdelsart, coleenp, kamg
author | jiangli |
---|---|
date | Tue, 26 Jun 2012 19:08:44 -0400 |
parents | f7c4174b33ba |
children | e74da3c2b827 |
comparison
equal
deleted
inserted
replaced
6177:06320b1578cb | 6213:8150fa46d2ed |
---|---|
33 #include "memory/oopFactory.hpp" | 33 #include "memory/oopFactory.hpp" |
34 #include "memory/universe.inline.hpp" | 34 #include "memory/universe.inline.hpp" |
35 #include "oops/fieldStreams.hpp" | 35 #include "oops/fieldStreams.hpp" |
36 #include "oops/instanceKlass.hpp" | 36 #include "oops/instanceKlass.hpp" |
37 #include "oops/objArrayKlass.hpp" | 37 #include "oops/objArrayKlass.hpp" |
38 #include "oops/methodOop.hpp" | |
38 #include "prims/jvm.h" | 39 #include "prims/jvm.h" |
39 #include "prims/jvm_misc.hpp" | 40 #include "prims/jvm_misc.hpp" |
40 #include "prims/jvmtiExport.hpp" | 41 #include "prims/jvmtiExport.hpp" |
41 #include "prims/jvmtiThreadState.hpp" | 42 #include "prims/jvmtiThreadState.hpp" |
42 #include "prims/nativeLookup.hpp" | 43 #include "prims/nativeLookup.hpp" |
2177 JVM_QUICK_ENTRY(void, JVM_GetMethodIxExceptionTableEntry(JNIEnv *env, jclass cls, jint method_index, jint entry_index, JVM_ExceptionTableEntryType *entry)) | 2178 JVM_QUICK_ENTRY(void, JVM_GetMethodIxExceptionTableEntry(JNIEnv *env, jclass cls, jint method_index, jint entry_index, JVM_ExceptionTableEntryType *entry)) |
2178 JVMWrapper("JVM_GetMethodIxExceptionTableEntry"); | 2179 JVMWrapper("JVM_GetMethodIxExceptionTableEntry"); |
2179 klassOop k = java_lang_Class::as_klassOop(JNIHandles::resolve_non_null(cls)); | 2180 klassOop k = java_lang_Class::as_klassOop(JNIHandles::resolve_non_null(cls)); |
2180 k = JvmtiThreadState::class_to_verify_considering_redefinition(k, thread); | 2181 k = JvmtiThreadState::class_to_verify_considering_redefinition(k, thread); |
2181 oop method = instanceKlass::cast(k)->methods()->obj_at(method_index); | 2182 oop method = instanceKlass::cast(k)->methods()->obj_at(method_index); |
2182 typeArrayOop extable = methodOop(method)->exception_table(); | 2183 ExceptionTable extable((methodOop(method))); |
2183 entry->start_pc = extable->int_at(entry_index * 4); | 2184 entry->start_pc = extable.start_pc(entry_index); |
2184 entry->end_pc = extable->int_at(entry_index * 4 + 1); | 2185 entry->end_pc = extable.end_pc(entry_index); |
2185 entry->handler_pc = extable->int_at(entry_index * 4 + 2); | 2186 entry->handler_pc = extable.handler_pc(entry_index); |
2186 entry->catchType = extable->int_at(entry_index * 4 + 3); | 2187 entry->catchType = extable.catch_type_index(entry_index); |
2187 JVM_END | 2188 JVM_END |
2188 | 2189 |
2189 | 2190 |
2190 JVM_QUICK_ENTRY(jint, JVM_GetMethodIxExceptionTableLength(JNIEnv *env, jclass cls, int method_index)) | 2191 JVM_QUICK_ENTRY(jint, JVM_GetMethodIxExceptionTableLength(JNIEnv *env, jclass cls, int method_index)) |
2191 JVMWrapper("JVM_GetMethodIxExceptionTableLength"); | 2192 JVMWrapper("JVM_GetMethodIxExceptionTableLength"); |
2192 klassOop k = java_lang_Class::as_klassOop(JNIHandles::resolve_non_null(cls)); | 2193 klassOop k = java_lang_Class::as_klassOop(JNIHandles::resolve_non_null(cls)); |
2193 k = JvmtiThreadState::class_to_verify_considering_redefinition(k, thread); | 2194 k = JvmtiThreadState::class_to_verify_considering_redefinition(k, thread); |
2194 oop method = instanceKlass::cast(k)->methods()->obj_at(method_index); | 2195 oop method = instanceKlass::cast(k)->methods()->obj_at(method_index); |
2195 return methodOop(method)->exception_table()->length() / 4; | 2196 return methodOop(method)->exception_table_length(); |
2196 JVM_END | 2197 JVM_END |
2197 | 2198 |
2198 | 2199 |
2199 JVM_QUICK_ENTRY(jint, JVM_GetMethodIxModifiers(JNIEnv *env, jclass cls, int method_index)) | 2200 JVM_QUICK_ENTRY(jint, JVM_GetMethodIxModifiers(JNIEnv *env, jclass cls, int method_index)) |
2200 JVMWrapper("JVM_GetMethodIxModifiers"); | 2201 JVMWrapper("JVM_GetMethodIxModifiers"); |