Closed Bug 811566 Opened 13 years ago Closed 13 years ago

JM: Compile JSOP_INTRINSICNAME better

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla20

People

(Reporter: shu, Unassigned)

References

Details

(Whiteboard: [js:p2])

Attachments

(1 file)

Currently JaegerMonkey is eagerly caching all intrinsics at compile time. This has led to bugs with TI in IonMonkey (see bug 784291), though the particular bug in question doesn't arise in JM. I'm not sure why exactly, but probably because the way barriers are emitted and checked are different. JM should also compile intrinsics by baking in the pointer only after JSOP_INTRINISCNAME has already been executed, i.e., its typeset is not empty.
Norbert has confirmed that this bug *does* arise in JM in bug 816394.
It seemed so simple in theory ... Will look at what you've done for IM and see if I can implement it for JM.
Attached patch fixSplinter Review
This patch mirrors the IM logic in JM: if we don't know the pushed type of the intrinsic, we call a stub which then bails, propagating the correct type. If we really want to do better we can do some kind of IC, but I think the unknown pushed type case only really happens on eager compilation or on error paths, so a bail isn't so bad.
Whiteboard: [js:p2]
Comment on attachment 686475 [details] [diff] [review] fix I have now tested this patch quite extensively and think there's not a single thing wrong with it. r+ for a pretty straight-forward change from me, if that's sufficient.
Attachment #686475 - Flags: review?(bhackett1024)
Blocks: 769872
Attachment #686475 - Flags: review?(bhackett1024) → review+
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
Summary: JaegerMonkey: Compile JSOP_INTRINSICNAME better → JM: Compile JSOP_INTRINSICNAME better
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: