8005846: Remove Mangler in favor of Dynalink's NameCodec
authorattila
Tue, 08 Jan 2013 13:50:11 +0100
changeset 16158 8f3a55a03b3b
parent 16157 a14081edd7ff
child 16159 db1b36bd37c4
8005846: Remove Mangler in favor of Dynalink's NameCodec Reviewed-by: jlaskey, sundar
nashorn/src/jdk/nashorn/internal/codegen/Compiler.java
--- a/nashorn/src/jdk/nashorn/internal/codegen/Compiler.java	Tue Jan 08 10:52:11 2013 +0100
+++ b/nashorn/src/jdk/nashorn/internal/codegen/Compiler.java	Tue Jan 08 13:50:11 2013 +0100
@@ -55,8 +55,8 @@
 import jdk.nashorn.internal.runtime.ECMAErrors;
 import jdk.nashorn.internal.runtime.ErrorManager;
 import jdk.nashorn.internal.runtime.Source;
-import jdk.nashorn.internal.runtime.linker.Mangler;
 import jdk.nashorn.internal.runtime.options.Options;
+import org.dynalang.dynalink.support.NameCodec;
 
 /**
  * Responsible for converting JavaScripts to java byte code. Main entry
@@ -511,7 +511,7 @@
         }
 
         baseName = baseName.replace('.', '_').replace('-', '_');
-        final String mangled = Mangler.mangle(baseName);
+        final String mangled = NameCodec.encode(baseName);
 
         baseName = mangled != null ? mangled : baseName;
         return baseName;