                     }
                 }
             }
+
+            // For line matching of GC_ directives we match only at
+            // the start of the line after taking the substring
+            // starting at the known-good index.  This yields the same
+            // performance as using a global regex and setting
+            // lastIndex to indicate where we want to start matching.
 
             if (gcIndex >= 0) {
                 // C++ annotations.

                // lexicographically so clauses may become reorganized on output; this does not lead
                // to bugs but makes the code confusing to read.

                if ((result = (/^#\s*(ifdef|ifndef|if|elif|else|endif|define)/).exec(line.substring(cppIndex))) != null) {
                    var rest = sanitizeCondition(line.substring(cppIndex + result[0].length));
                    var directive = result[1];
                    switch (directive) {

            if (gcIndex == -1 && cppIndex == -1 && nativeIndex == -1)
                continue;

            // The start we found above may be inside a comment.  Here we handle
            // line comments; it would be better if we could handle block comments too.
            // Bugzilla 649333 tracks the block comment issue.
        
            if (line.match(/^\s*\/\//))
                continue;

            errorContext = "On " + filename + " line " + lineno;

            if (cppIndex >= 0) {
                // CPP macro?
