Closed Bug 601684 Opened 14 years ago Closed 14 years ago

JSFUN_PRIMITIVE_THIS is redundant with fun->u.i.script->strictModeCode

Categories

(Core :: JavaScript Engine, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jimb, Unassigned)

Details

Instead of using JSFUN_PRIMITIVE_THIS and acceptsPrimitiveThis, SpiderMonkey should simply use the strictModeCode flag of interpreted functions' scripts to decide whether to wrap primitive |this| values.

Native functions do not have to advertise whether or not they accept a primitive this. They can simply call GetPrimitiveThis (or directly examine vp[1]) if they do; and use JS_THIS_OBJECT if they do not.

(As observed by jorendorff in bug 514570 comment 73.)
Yeah! Would free a bunch of JSFUN_* flags too.

/be
This has been fixed by Bug 620315.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.