Closed Bug 389214 Opened 18 years ago Closed 17 years ago

inefficient JS stack layout and GC scanning of same

Categories

(Core :: JavaScript Engine, defect, P2)

defect

Tracking

()

RESOLVED DUPLICATE of bug 471425

People

(Reporter: brendan, Assigned: brendan)

Details

SpiderMonkey started out allocating JSStackFrame on the C stack and keeping track of live stack maps for GC scanning using JSStackFrame's argv/argc, vars/nvars, and spbase/script->depth-or-sp-whichever-is-lower members. But for the case where a native call to a method must allocate fresh argument stack space, js_AllocStack was added with its JSStackHeader (cx->stackHeaders) pushing. Another ancient design mistake: not requiring all callers to push the same slots, instead allowing frames to be ad-hoc initialized with thisp but null argv, etc. (for top-level scripts). And of course, JSStackFrame is bloated from years of feature work without ongoing optimization. The recent fast native method work (see bug 385393) wants all of this fixed, especially the GC scanning restriction, so a fast native requiring extra local GC root slots can avoid taking the slow path just because script->depth does not allow enough "headroom" for the local roots. /be
Priority: -- → P2
Target Milestone: mozilla1.9alpha8 → mozilla1.9beta4
Target Milestone: mozilla1.9beta4 → ---
Dup'ing forward. There's info here in comment 0 to consider there, but I don't see a need for two bugs. If anyone disagrees, reopen and take this bug. /be
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.