Currently, the lexer keeps a m_charPosition field which is supposed to track the m_code pointer. m_charPosition used to be m_column which cannot be computed directly from the m_code pointer. Now that we’re computing the char position instead of the column, we can get rid of m_charPosition and just compute it as m_code - m_codeStartPlusOffset, where m_codeStartPlusOffset is m_codeStart + the SourceCode offset. This fixes a bug where m_charPosition gets out of sync with m_code when we “rewind” the lexer by setting m_code back to an earlier position in the source string. ref: <rdar://problem/13467032>.
Created attachment 194322 [details] the patch
Comment on attachment 194322 [details] the patch Looks good.
Thanks for the review. Landed in r146505: <http://trac.webkit.org/changeset/146505>.