hotspot/src/share/vm/prims/nativeLookup.cpp
changeset 33593 60764a78fa5c
parent 33160 c59f1676d27e
child 33606 af4ec8a4635b
--- a/hotspot/src/share/vm/prims/nativeLookup.cpp	Wed Oct 21 13:46:25 2015 +0000
+++ b/hotspot/src/share/vm/prims/nativeLookup.cpp	Fri Oct 23 16:48:38 2015 -0400
@@ -67,7 +67,7 @@
 }
 
 
-char* NativeLookup::pure_jni_name(methodHandle method) {
+char* NativeLookup::pure_jni_name(const methodHandle& method) {
   stringStream st;
   // Prefix
   st.print("Java_");
@@ -80,7 +80,7 @@
 }
 
 
-char* NativeLookup::critical_jni_name(methodHandle method) {
+char* NativeLookup::critical_jni_name(const methodHandle& method) {
   stringStream st;
   // Prefix
   st.print("JavaCritical_");
@@ -93,7 +93,7 @@
 }
 
 
-char* NativeLookup::long_jni_name(methodHandle method) {
+char* NativeLookup::long_jni_name(const methodHandle& method) {
   // Signature ignore the wrapping parenteses and the trailing return type
   stringStream st;
   Symbol* signature = method->signature();
@@ -142,7 +142,7 @@
   return NULL;
 }
 
-address NativeLookup::lookup_style(methodHandle method, char* pure_name, const char* long_name, int args_size, bool os_style, bool& in_base_library, TRAPS) {
+address NativeLookup::lookup_style(const methodHandle& method, char* pure_name, const char* long_name, int args_size, bool os_style, bool& in_base_library, TRAPS) {
   address entry;
   // Compute complete JNI name for style
   stringStream st;
@@ -199,7 +199,7 @@
 }
 
 
-address NativeLookup::lookup_critical_style(methodHandle method, char* pure_name, const char* long_name, int args_size, bool os_style) {
+address NativeLookup::lookup_critical_style(const methodHandle& method, char* pure_name, const char* long_name, int args_size, bool os_style) {
   if (!method->has_native_function()) {
     return NULL;
   }
@@ -229,7 +229,7 @@
 
 // Check all the formats of native implementation name to see if there is one
 // for the specified method.
-address NativeLookup::lookup_entry(methodHandle method, bool& in_base_library, TRAPS) {
+address NativeLookup::lookup_entry(const methodHandle& method, bool& in_base_library, TRAPS) {
   address entry = NULL;
   in_base_library = false;
   // Compute pure name
@@ -264,7 +264,7 @@
 
 // Check all the formats of native implementation name to see if there is one
 // for the specified method.
-address NativeLookup::lookup_critical_entry(methodHandle method) {
+address NativeLookup::lookup_critical_entry(const methodHandle& method) {
   if (!CriticalJNINatives) return NULL;
 
   if (method->is_synchronized() ||
@@ -318,7 +318,7 @@
 // If any are found, remove them before attemping the look up of the
 // native implementation again.
 // See SetNativeMethodPrefix in the JVM TI Spec for more details.
-address NativeLookup::lookup_entry_prefixed(methodHandle method, bool& in_base_library, TRAPS) {
+address NativeLookup::lookup_entry_prefixed(const methodHandle& method, bool& in_base_library, TRAPS) {
 #if INCLUDE_JVMTI
   ResourceMark rm(THREAD);
 
@@ -354,7 +354,7 @@
   return NULL;
 }
 
-address NativeLookup::lookup_base(methodHandle method, bool& in_base_library, TRAPS) {
+address NativeLookup::lookup_base(const methodHandle& method, bool& in_base_library, TRAPS) {
   address entry = NULL;
   ResourceMark rm(THREAD);
 
@@ -372,7 +372,7 @@
 }
 
 
-address NativeLookup::lookup(methodHandle method, bool& in_base_library, TRAPS) {
+address NativeLookup::lookup(const methodHandle& method, bool& in_base_library, TRAPS) {
   if (!method->has_native_function()) {
     address entry = lookup_base(method, in_base_library, CHECK_NULL);
     method->set_native_function(entry,