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

RESOLVED INVALID

Status

()

Core
JavaScript Engine
P3
normal
RESOLVED INVALID
14 years ago
5 years ago

People

(Reporter: brendan, Unassigned)

Tracking

({js1.5})

Trunk
mozilla1.8beta3
js1.5
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

14 years ago
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
(Reporter)

Updated

14 years ago
Status: NEW → ASSIGNED
Priority: -- → P3
Target Milestone: --- → mozilla1.8alpha6
(Reporter)

Updated

14 years ago
Target Milestone: mozilla1.8alpha6 → mozilla1.8beta2
(Reporter)

Updated

13 years ago
Target Milestone: mozilla1.8beta2 → mozilla1.8beta3
QA Contact: pschwartau → general
(Reporter)

Comment 1

11 years ago
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
Last Resolved: 5 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.