nanojit: factor out common fields in LIns

RESOLVED DUPLICATE of bug 490947

Status

()

Core
JavaScript Engine
RESOLVED DUPLICATE of bug 490947
9 years ago
9 years ago

People

(Reporter: njn, Assigned: njn)

Tracking

Trunk
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

9 years ago
Created attachment 376669 [details] [diff] [review]
patch to factor out common fields

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)

Updated

9 years ago
Attachment #376669 - Flags: review?(edwsmith) → review+

Comment 1

9 years ago
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).
(Assignee)

Comment 2

9 years ago
(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
Last Resolved: 9 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 490947
You need to log in before you can comment on or make changes to this bug.