WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 112952
JSC: Fix lexer charPosition computation when “rewind"ing the lexer
https://bugs.webkit.org/show_bug.cgi?id=112952
Summary
JSC: Fix lexer charPosition computation when “rewind"ing the lexer
Mark Lam
Reported
2013-03-21 12:41:21 PDT
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
>.
Attachments
the patch
(4.28 KB, patch)
2013-03-21 12:50 PDT
,
Mark Lam
msaboff
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Mark Lam
Comment 1
2013-03-21 12:50:41 PDT
Created
attachment 194322
[details]
the patch
Michael Saboff
Comment 2
2013-03-21 13:04:42 PDT
Comment on
attachment 194322
[details]
the patch Looks good.
Mark Lam
Comment 3
2013-03-21 13:09:02 PDT
Thanks for the review. Landed in
r146505
: <
http://trac.webkit.org/changeset/146505
>.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug