Closed Bug 557404 Opened 14 years ago Closed 14 years ago

unatomize doubles

Categories

(Core :: JavaScript Engine, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 549143

People

(Reporter: luke, Unassigned)

Details

Currently, literal double values are atomized.  This means a JSAtom* is either a (cast) JSString* or a double*.  It is questionable how much memory we are saving from atomizing doubles and it seems like we could make our code simpler and faster by dropping doubles and having a JSAtom* just be an opaque type signifying an atomized, untagged JSString*.

I'll take a crack at it.
This is also good for the fat jsvals of bug 549143 and allows heap doubles to be totally wiped out, I think.
Blocks: fatvals
(In reply to comment #0)
> Currently, literal double values are atomized.  This means a JSAtom* is either
> a (cast) JSString* or a double*

... tagged as a jsval string or double (believe it!).

/be
So, it seems that in the restricted domain of JSOP_LOOKUPSWITCH, atoms can be any non-primitive value.  However, only JSOP_LOOKUPSWITCH observes this, so perhaps we can change the way the immediate operands are encoded in the bytecode.
(In reply to comment #3)
> So, it seems that in the restricted domain of JSOP_LOOKUPSWITCH, atoms can be
> any non-primitive value.

s/non-//

/be
Yes, thanks for both corrections.

So reading and thinking a bit more, it seems like bug 549143 can go ahead without removing heap doubles.  As long as they aren't being allocated in great quantity, the performance overhead will go away; the maintenance overhead can go away afterwards.
Assignee: lw → general
No longer blocks: fatvals
fatvals ended up removing heap doubles altogether.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.