Closed Bug 276249 Opened 20 years ago Closed 11 years ago

Want dense fast global numbers, and for functions as well as vars/consts

Categories

(Core :: JavaScript Engine, defect, P3)

defect

Tracking

()

RESOLVED INVALID
mozilla1.8beta3

People

(Reporter: brendan, Unassigned)

References

()

Details

(Keywords: js1.5)

See the URL and patch attached there.

The slickest, least invasive change I can think of is to provide a variant to
js_IndexAtom, js_IndexGlobalVarAtom, that manipulates a separate counter member
of JSAtomList, say ngvars.  When generating bytecode, a fast global atomIndex is
stored in pc[1] and pc[2] in the usual big endian two-byte encoding, but as a
signed negative index.

The script generated by the compiler will have an atomMap with enough space in
its vector for both fast global and regular atom pointers, but the vector base
will point into the middle of the array, offset by ngvars.  Thus, negative fast
global atomIndexes address slots to the left of script->atomMap.vector, while
regular atomIndexes address slots to the right.

The code that calls IndexRegExpClone in jsemit.c will need to be refactored to
call js_IndexGlobalVarAtom, and some other layering changes will be needed.

/be
Status: NEW → ASSIGNED
Priority: -- → P3
Target Milestone: --- → mozilla1.8alpha6
Target Milestone: mozilla1.8alpha6 → mozilla1.8beta2
Target Milestone: mozilla1.8beta2 → mozilla1.8beta3
QA Contact: pschwartau → general
Throwing back into the pond for someone else to fish out.

/be
Assignee: brendan → general
Status: ASSIGNED → NEW
Is this still an issue with JITs ?
Irrelevant.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.