Bug 41439 - BogusCommentState should come in from the cold
Summary: BogusCommentState should come in from the cold
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Adam Barth
URL:
Keywords:
Depends on:
Blocks: 41123 41436
  Show dependency treegraph
 
Reported: 2010-06-30 17:30 PDT by Adam Barth
Modified: 2010-07-01 01:13 PDT (History)
2 users (show)

See Also:


Attachments
Patch (4.99 KB, patch)
2010-06-30 17:33 PDT, Adam Barth
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Barth 2010-06-30 17:30:01 PDT
BogusCommentState should come in from the cold
Comment 1 Adam Barth 2010-06-30 17:33:14 PDT
Created attachment 60174 [details]
Patch
Comment 2 Eric Seidel (no email) 2010-06-30 17:49:45 PDT
Comment on attachment 60174 [details]
Patch

LayoutTests/html5lib/webkit-resumer-expected.txt:159
 +  resources/webkit01.dat:
Geez, we still need to fix this output.

WebCore/html/HTMLTokenizer.cpp:1078
 +          else if (cc == InputStreamPreprocessor::endOfFileMarker)
I should have written these as isEndOfFileMarker(cc)

Why do we need ContinueBogusCommentState?  Why not just check m_token->type() == Comment?
Comment 3 Adam Barth 2010-06-30 19:18:53 PDT
> WebCore/html/HTMLTokenizer.cpp:1078
>  +          else if (cc == InputStreamPreprocessor::endOfFileMarker)
> I should have written these as isEndOfFileMarker(cc)

Oh, ok.  I just copied another state/

> Why do we need ContinueBogusCommentState?  Why not just check m_token->type() == Comment?

Because that would be an extra branch per character.
Comment 4 Eric Seidel (no email) 2010-06-30 22:09:28 PDT
(In reply to comment #3)
> > Why do we need ContinueBogusCommentState?  Why not just check m_token->type() == Comment?
> 
> Because that would be an extra branch per character.

Really?  I meant in the BogusCommentState itself.  Are we commonly in the BogusCommentState?  I agree this is fewer branches.
Comment 5 WebKit Commit Bot 2010-07-01 00:40:10 PDT
Comment on attachment 60174 [details]
Patch

Clearing flags on attachment: 60174

Committed r62233: <http://trac.webkit.org/changeset/62233>
Comment 6 WebKit Commit Bot 2010-07-01 00:40:14 PDT
All reviewed patches have been landed.  Closing bug.