Closed
Bug 525379
Opened 15 years ago
Closed 15 years ago
nanojit: make the _nIns/_nExitIns swap hack more consistent
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: n.nethercote, Assigned: n.nethercote)
Details
(Whiteboard: fixed-in-nanojit, fixed-in-tamarin, fixed-in-tracemonkey)
Attachments
(1 file, 1 obsolete file)
25.18 KB,
patch
|
edwsmith
:
review+
|
Details | Diff | Splinter Review |
We generate native code into two places: the normal code area, and the exit area. We have a hack whereby we swap the _nIns and _nExitIns pointers when we want to write to the exit area; this means that the code responsible for codegen need not be parameterised, it can just use _nIns. But there are some other related values (codeStart/exitStart, codeEnd/exitEnd, codeBytes/exitBytes) that we don't swap. This leads to odd-looking code like this: if (_inExit) codeAlloc(exitStart, exitEnd, _nIns verbose_only(, exitBytes)); else codeAlloc(codeStart, codeEnd, _nIns verbose_only(, codeBytes)); You might expect to see _nExitIns in the first case rather than _nIns, but _nIns is right because it's been swapped and so is really _nExitIns. This patch changes things so that all the relevant values get swapped, which avoids the need for _inExit tests. The above code then becomes: codeAlloc(codeStart, codeEnd, _nIns verbose_only(, codeBytes)); It's mostly a correctness/simplicity patch, but it should also reduce the number of instructions because there's one less test in the hot path in underrunProtect(). I don't see any SS changes, but SS is being particularly noisy for me today and yesterday.
Assignee | ||
Comment 1•15 years ago
|
||
All backends done, tested on x86 and x64. I'll do the others once it's passed review.
Attachment #409245 -
Attachment is obsolete: true
Attachment #413264 -
Flags: review?(edwsmith)
Updated•15 years ago
|
Attachment #413264 -
Flags: review?(edwsmith) → review+
Assignee | ||
Comment 2•15 years ago
|
||
Passed TR's try server: http://hg.mozilla.org/projects/nanojit-central/rev/bad939491825
Whiteboard: fixed-in-nanojit
Comment 3•15 years ago
|
||
pushed to tamarin http://hg.mozilla.org/tamarin-redux/rev/76ccc148ba1d
Whiteboard: fixed-in-nanojit → fixed-in-nanojit, fixed-in-tamarin
Assignee | ||
Comment 4•15 years ago
|
||
http://hg.mozilla.org/tracemonkey/rev/74504312c860
Whiteboard: fixed-in-nanojit, fixed-in-tamarin → fixed-in-nanojit, fixed-in-tamarin, fixed-in-tracemonkey
Assignee | ||
Comment 5•15 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/74504312c860
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•