Closed Bug 581944 Opened 9 years ago Closed 9 years ago

Reorder the HTML5 tokenizer's states to make it easier to optionally partition the tokenizer loop into two methods


(Core :: HTML: Parser, defect, P3, trivial)




Tracking Status
blocking2.0 --- beta5+


(Reporter: hsivonen, Assigned: sicking)



(1 file, 1 obsolete file)

Attached patch Reorder tokenizer states (obsolete) — Splinter Review
Currently, the method that holds the main loop of the HTML5 tokenizer compiles to over 8000 bytes in Java. This means that HotSpot in its default configuration refuses to JIT it.

To work around this, I need to reorder the tokenizer states so that it's easy to have a script that extracts a some states into a separate method so that I get two methods that each compile to less than 8000 bytes.

To keep the whole thing sanely maintainable, I need to apply the same reordering to Gecko--before Gecko 2.0 diverges from trunk.

This patch should not have change any behavior in Gecko. Note that the states will stay as one method in Gecko. I'm planning on partitioning the method into two only in Java releases.

(The patch is unreviewable, of course... but I'm hoping to get an rs on it...)
Attachment #460236 - Flags: review?
Assignee: nobody → hsivonen
Priority: -- → P3
Attachment #460236 - Flags: review? → review?(jonas)
Comment on attachment 460236 [details] [diff] [review]
Reorder tokenizer states

rs=me based on your description.
Attachment #460236 - Flags: review?(jonas)
Requesting approval for 2.0, because having the states in different order in 2.0 and in post-2.0 trunk development would make maintenance harder (if tokenizer changes to the branch are required).

If this patch gets approved while I'm on vacation, please mark this bug 'checkin-needed'.
Attachment #460236 - Attachment is obsolete: true
Attachment #462739 - Flags: approval2.0?
blocking2.0: --- → beta5+
Attachment #462739 - Flags: approval2.0?
Assignee: hsivonen → jonas
Pushed to mozilla-central.
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.