[Webkit-unassigned] [Bug 45289] Refactoring multiline comments in the lexer

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Sep 7 14:34:11 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=45289


Darin Adler <darin at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #66713|review?                     |review+
               Flag|                            |




--- Comment #2 from Darin Adler <darin at apple.com>  2010-09-07 14:34:10 PST ---
(From update of attachment 66713)
> +        if (UNLIKELY(m_current == '*')) {
> +            shift();
> +            if (m_current == '/') {
> +                shift();
> +                return true;
> +            }
> +            if (m_current == '*')
> +                continue;
> +        }

This ends up comparing with '*' twice, which seems like a shame given it's also slightly confusing logic. Instead of the if statement and the continue statement, we could just use while instead of if. Does that make things slower?

> @@ -1002,7 +1027,8 @@ inNumberAfterDecimalPoint:
>          m_terminator = true;
>          if (lastTokenWasRestrKeyword()) {
>              token = SEMICOLON;
> -            goto doneSemicolon;
> +            m_delimited = true;
> +            goto returnToken;
>          }
>          goto start;
>      case CharacterInvalid:

Why is this change included in the same patch? It seems unrelated and should be done based on its own merits, not as a ridealong. We can keep the doneSemicolon symbol.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list