Closed Bug 492319 Opened 15 years ago Closed 15 years ago

nanojit: factor out common fields in LIns

Categories

(Core :: JavaScript Engine, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 490947

People

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

References

Details

Attachments

(1 file)

This patch moves the fields shared by all LIns kinds out of the union.  The duplication was apparently necessary to workaround an MSVC shortcoming when LIns was only 4 bytes, but that's no longer relevant.  (I tested this via the Try Server, and got all green results.)

It also removes of the padding in LIns, which is ugly and unnecessary.

And it improves some related comments.

It depends on #492292 in the sense that the two clash, ie. when one patch is committed the other will have to be rebased.
Attachment #376669 - Flags: review?(edwsmith)
Attachment #376669 - Flags: review?(edwsmith) → review+
Suggestion for future improvement:

move Assembler::Reservation into a single word in LIns, and eliminate LIns.resv. This lets us eliminate Assembler._resvTable[], and lets the assembler track more than NJ_MAX_STACK_ENTRY (256) live expressions at once, without resorting to a map data structure.  Eliminates one level of indirection too.

Also note that Reservation.reg could be fewer bits, as low as 6, maybe 7.  (NativePPC makes use of 64 registers).
(In reply to comment #1)
> Suggestion for future improvement:
> 
> move Assembler::Reservation into a single word in LIns, and eliminate
> LIns.resv. This lets us eliminate Assembler._resvTable[], and lets the
> assembler track more than NJ_MAX_STACK_ENTRY (256) live expressions at once,
> without resorting to a map data structure.  Eliminates one level of indirection
> too.
> 
> Also note that Reservation.reg could be fewer bits, as low as 6, maybe 7. 
> (NativePPC makes use of 64 registers).

See #490947 :)  I made Reservation.reg 7 bits.

Actually, #490497 subsumes this bug.  I didn't realise when I started out, but I see it now.  So I'll close this bug and merge the small number of changes that are in this patch but not in #490947 into #490947.
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: