Closed Bug 494355 Opened 15 years ago Closed 15 years ago

nanojit: inline LirBufWriter::insSkipWithoutBuffer()

Categories

(Core :: JavaScript Engine, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 494639

People

(Reporter: n.nethercote, Assigned: n.nethercote)

References

Details

Attachments

(1 file)

insSkipWithoutBuffer() is different to all the other ins*() functions because it doesn't pair an ensureRoom() call with a commit() call. Manually inlining it in the two places it is called and then deleting it makes the calling code easier to understand, and also will facilitate the merging of ensureRoom() and commit() later on. The attached patch does this. It also changes the name of a couple of variables to make things easier to understand. In ensureRoom() it also changes the computation of 'next' (which was called 'after') by removing the "+1". The reviewer should check this carefully... I think it may have been necessary until recently because ensureRoom() was called twice for skip instructions -- once for the payload and once for the skip itself. But that is no longer the case, so the +1 seems unnecessary. (Actually, maybe it wasn't necessary before, but its presence ensured that a payload+skip always were adjacent, never split? Not sure.) Removing it has no (obvious) ill-effects.
Attachment #379062 - Flags: review?(graydon)
Blocks: 494357
Comment on attachment 379062 [details] [diff] [review] patch inlining insSkipWithoutBuffer() I removed the review request after creating bug 494639, which encompasses this change plus a bunch of other dependent ones.
Attachment #379062 - Flags: review?(graydon)
This was subsumed by bug 494639.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: