src/share/vm/prims/nativeLookup.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 7089790_full Sdiff src/share/vm/prims

src/share/vm/prims/nativeLookup.cpp

Print this page
rev 2694 : imported patch headers_only


  32 #include "oops/instanceKlass.hpp"
  33 #include "oops/methodOop.hpp"
  34 #include "oops/oop.inline.hpp"
  35 #include "oops/symbol.hpp"
  36 #include "prims/jvm_misc.hpp"
  37 #include "prims/nativeLookup.hpp"
  38 #include "runtime/arguments.hpp"
  39 #include "runtime/handles.inline.hpp"
  40 #include "runtime/javaCalls.hpp"
  41 #include "runtime/sharedRuntime.hpp"
  42 #include "runtime/signature.hpp"
  43 #ifdef TARGET_OS_FAMILY_linux
  44 # include "os_linux.inline.hpp"
  45 #endif
  46 #ifdef TARGET_OS_FAMILY_solaris
  47 # include "os_solaris.inline.hpp"
  48 #endif
  49 #ifdef TARGET_OS_FAMILY_windows
  50 # include "os_windows.inline.hpp"
  51 #endif



  52 
  53 
  54 static void mangle_name_on(outputStream* st, Symbol* name, int begin, int end) {
  55   char* bytes = (char*)name->bytes() + begin;
  56   char* end_bytes = (char*)name->bytes() + end;
  57   while (bytes < end_bytes) {
  58     jchar c;
  59     bytes = UTF8::next(bytes, &c);
  60     if (c <= 0x7f && isalnum(c)) {
  61       st->put((char) c);
  62     } else {
  63            if (c == '_') st->print("_1");
  64       else if (c == '/') st->print("_");
  65       else if (c == ';') st->print("_2");
  66       else if (c == '[') st->print("_3");
  67       else               st->print("_%.5x", c);
  68     }
  69   }
  70 }
  71 




  32 #include "oops/instanceKlass.hpp"
  33 #include "oops/methodOop.hpp"
  34 #include "oops/oop.inline.hpp"
  35 #include "oops/symbol.hpp"
  36 #include "prims/jvm_misc.hpp"
  37 #include "prims/nativeLookup.hpp"
  38 #include "runtime/arguments.hpp"
  39 #include "runtime/handles.inline.hpp"
  40 #include "runtime/javaCalls.hpp"
  41 #include "runtime/sharedRuntime.hpp"
  42 #include "runtime/signature.hpp"
  43 #ifdef TARGET_OS_FAMILY_linux
  44 # include "os_linux.inline.hpp"
  45 #endif
  46 #ifdef TARGET_OS_FAMILY_solaris
  47 # include "os_solaris.inline.hpp"
  48 #endif
  49 #ifdef TARGET_OS_FAMILY_windows
  50 # include "os_windows.inline.hpp"
  51 #endif
  52 #ifdef TARGET_OS_FAMILY_bsd
  53 # include "os_bsd.inline.hpp"
  54 #endif
  55 
  56 
  57 static void mangle_name_on(outputStream* st, Symbol* name, int begin, int end) {
  58   char* bytes = (char*)name->bytes() + begin;
  59   char* end_bytes = (char*)name->bytes() + end;
  60   while (bytes < end_bytes) {
  61     jchar c;
  62     bytes = UTF8::next(bytes, &c);
  63     if (c <= 0x7f && isalnum(c)) {
  64       st->put((char) c);
  65     } else {
  66            if (c == '_') st->print("_1");
  67       else if (c == '/') st->print("_");
  68       else if (c == ';') st->print("_2");
  69       else if (c == '[') st->print("_3");
  70       else               st->print("_%.5x", c);
  71     }
  72   }
  73 }
  74 


src/share/vm/prims/nativeLookup.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File