--- a/quid.patch Tue Sep 09 16:15:01 2008 -0700
+++ b/quid.patch Wed Sep 10 16:26:07 2008 -0700
@@ -1,3 +1,14 @@ diff --git a/src/share/classes/com/sun/t
+diff --git a/src/share/classes/com/sun/tools/javac/jvm/ClassReader.java b/src/share/classes/com/sun/tools/javac/jvm/ClassReader.java
+--- a/src/share/classes/com/sun/tools/javac/jvm/ClassReader.java
++++ b/src/share/classes/com/sun/tools/javac/jvm/ClassReader.java
+@@ -2178,6 +2178,7 @@
+ String binaryName = fileManager.inferBinaryName(currentLoc, fo);
+ String simpleName = binaryName.substring(binaryName.lastIndexOf(".") + 1);
+ if (SourceVersion.isIdentifier(simpleName) ||
++ fo.getKind() == JavaFileObject.Kind.CLASS ||
+ simpleName.equals("package-info"))
+ includeClassFile(p, fo);
+ break;
diff --git a/src/share/classes/com/sun/tools/javac/parser/Scanner.java b/src/share/classes/com/sun/tools/javac/parser/Scanner.java
--- a/src/share/classes/com/sun/tools/javac/parser/Scanner.java
+++ b/src/share/classes/com/sun/tools/javac/parser/Scanner.java
@@ -170,7 +181,7 @@ new file mode 100644
new file mode 100644
--- /dev/null
+++ b/test/tools/javac/quid/QuotedIdent.java
-@@ -0,0 +1,120 @@
+@@ -0,0 +1,129 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -211,6 +222,8 @@ new file mode 100644
+ *
+ * @run main QuotedIdent
+ */
++
++package quid;
+
+public class QuotedIdent {
+ static void check(int testid, String have, String expect)
@@ -228,7 +241,7 @@ new file mode 100644
+ // negative tests:
+ //static class #"" { } //BAD empty ident name
+ //static class #"<foo>" { } //BAD bad char in ident name
-+ /*static class /*(//BAD ident name interrupted by newline)*/ #"jump:
++ /*static class /*(//BAD ident name interrupted by newline) #"jump:
+ " { } /* uncomment previous line to attempt class w/ bad name */
+
+ static class #"int" extends Number {
@@ -278,6 +291,9 @@ new file mode 100644
+ if (!s.endsWith("{{{inmost}}}"))
+ check(24, s, "should end with \"{{{inmost}}}\"");
+
++ s = #"Yog-Shoggoth".#"(nameless ululation)";
++ check(25, s, "Tekeli-li!");
++
+ s = #"int".class.getName();
+ check(31, s, QuotedIdent.class.getName()+"$int");
+
@@ -291,3 +307,91 @@ new file mode 100644
+ System.out.println("OK");
+ }
+}
++
++interface #"Yog-Shoggoth" {
++ final String #"(nameless ululation)" = "Tekeli-li!";
++}
+diff --git a/test/tools/javac/quid/QuotedIdent2.java b/test/tools/javac/quid/QuotedIdent2.java
+new file mode 100644
+--- /dev/null
++++ b/test/tools/javac/quid/QuotedIdent2.java
+@@ -0,0 +1,79 @@
++/*
++ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ *
++ * This code is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License version 2 only, as
++ * published by the Free Software Foundation.
++ *
++ * This code is distributed in the hope that it will be useful, but WITHOUT
++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
++ * version 2 for more details (a copy is included in the LICENSE file that
++ * accompanied this code).
++ *
++ * You should have received a copy of the GNU General Public License version
++ * 2 along with this work; if not, write to the Free Software Foundation,
++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
++ *
++ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
++ * CA 95054 USA or visit www.sun.com if you need additional information or
++ * have any questions.
++ */
++
++/*
++ * @test
++ * @bug 6746458
++ * @summary Verify correct separate compilation of classes with extended identifiers.
++ * @author jrose
++ *
++ * Standalone testing:
++ * <code>
++ * $ cd $MY_REPO_DIR/langtools
++ * $ (cd make; make)
++ * $ ./dist/bootstrap/bin/javac -d dist test/tools/javac/quid/QuotedIdent.java
++ * $ ./dist/bootstrap/bin/javac -d dist -cp dist test/tools/javac/quid/QuotedIdent2.java
++ * $ java -version # should print 1.6 or later
++ * $ java -cp dist QuotedIdent2
++ * </code>
++ *
++ * @run main QuotedIdent2
++ */
++
++package quid;
++
++import quid.QuotedIdent.*;
++import quid.QuotedIdent.#"*86";
++import static quid.QuotedIdent.#"MAKE-*86";
++
++public class QuotedIdent2 {
++ static void check(int testid, String have, String expect)
++ throws RuntimeException {
++ QuotedIdent.check(testid, have, expect);
++ }
++
++ public static void main(String[] args) throws Exception {
++ String s;
++
++ s = #"int".valueOf(123).toString();
++ check(22, s, "123");
++
++ s = #"MAKE-*86"().#"555-1212"();
++ check(23, s, "[*86.555-1212]");
++
++ s = #"Yog-Shoggoth".#"(nameless ululation)";
++ check(25, s, "Tekeli-li!");
++
++ s = QuotedIdent.#"int".class.getName();
++ check(31, s, QuotedIdent.class.getName()+"$int");
++
++ Class x86 = Class.forName(QuotedIdent.class.getName()+"$*86");
++ if (x86 != #"*86".class)
++ check(32, "reflected "+x86, "static "+#"*86".class);
++
++ s = (String) x86.getDeclaredMethod("555-1212").invoke(QuotedIdent.#"MAKE-*86"());
++ check(31, s, "[*86.555-1212]");
++
++ System.out.println("OK");
++ }
++}