< prev index next >

src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/linker/NameCodec.java

Print this page

        

*** 37,51 **** * This code is derived from sun.invoke.util.BytecodeName. Apart from subsetting that * class, we don't want to create dependency between non-exported package from java.base * to nashorn module. * </p> * ! * <h2>Comment from BytecodeName class reproduced here:</h2> * * Includes universal mangling rules for the JVM. * ! * <h2>Avoiding Dangerous Characters </h2> * * <p> * The JVM defines a very small set of characters which are illegal * in name spellings. We will slightly extend and regularize this set * into a group of <cite>dangerous characters</cite>. --- 37,51 ---- * This code is derived from sun.invoke.util.BytecodeName. Apart from subsetting that * class, we don't want to create dependency between non-exported package from java.base * to nashorn module. * </p> * ! * <h3>Comment from BytecodeName class reproduced here:</h3> * * Includes universal mangling rules for the JVM. * ! * <h3>Avoiding Dangerous Characters </h3> * * <p> * The JVM defines a very small set of characters which are illegal * in name spellings. We will slightly extend and regularize this set * into a group of <cite>dangerous characters</cite>.
*** 72,82 **** * (also known as reverse solidus). * This character is, until now, unheard of in bytecode names, * but traditional in the proposed role. * * </p> ! * <h2> Replacement Characters </h2> * * * <p> * Every escape sequence is two characters * (in fact, two UTF8 bytes) beginning with --- 72,82 ---- * (also known as reverse solidus). * This character is, until now, unheard of in bytecode names, * but traditional in the proposed role. * * </p> ! * <h3> Replacement Characters </h3> * * * <p> * Every escape sequence is two characters * (in fact, two UTF8 bytes) beginning with
*** 157,167 **** * requires a scan of the string for escapes. * But then, a scan would be required anyway, * to check for dangerous characters. * * </p> ! * <h2> Nice Properties </h2> * * <p> * If a bytecode name does not contain any escape sequence, * demangling is a no-op: The string demangles to itself. * Such a string is called <cite>self-mangling</cite>. --- 157,167 ---- * requires a scan of the string for escapes. * But then, a scan would be required anyway, * to check for dangerous characters. * * </p> ! * <h3> Nice Properties </h3> * * <p> * If a bytecode name does not contain any escape sequence, * demangling is a no-op: The string demangles to itself. * Such a string is called <cite>self-mangling</cite>.
*** 220,230 **** * When mangled, spellings will at most double in length, either in * UTF8 or UTF16 format, and most will not change at all.</li> * </ul> * * ! * <h2> Suggestions for Human Readable Presentations </h2> * * * <p> * For human readable displays of symbols, * it will be better to present a string-like quoted --- 220,230 ---- * When mangled, spellings will at most double in length, either in * UTF8 or UTF16 format, and most will not change at all.</li> * </ul> * * ! * <h3> Suggestions for Human Readable Presentations </h3> * * * <p> * For human readable displays of symbols, * it will be better to present a string-like quoted
< prev index next >