Last Comment Bug 686381 - IonMonkey: Compile JSOP_AND
: IonMonkey: Compile JSOP_AND
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: unspecified
: All All
-- normal (vote)
: ---
Assigned To: Jan de Mooij [:jandem]
: Jason Orendorff [:jorendorff]
Depends on:
Blocks: 684381
  Show dependency treegraph
Reported: 2011-09-12 16:16 PDT by David Anderson [:dvander]
Modified: 2011-11-19 05:05 PST (History)
3 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Patch (8.25 KB, patch)
2011-10-31 04:13 PDT, Jan de Mooij [:jandem]
dvander: review+
Details | Diff | Splinter Review
Follow-up fix (14.17 KB, patch)
2011-11-04 07:05 PDT, Jan de Mooij [:jandem]
dvander: review+
Details | Diff | Splinter Review

Description User image David Anderson [:dvander] 2011-09-12 16:16:47 PDT

Comment 1 User image Jan de Mooij [:jandem] 2011-10-29 11:09:43 PDT
I have a patch to compile JSOP_AND and JSOP_OR, will clean-up and attach next week.
Comment 2 User image Jan de Mooij [:jandem] 2011-10-31 04:13:58 PDT
Created attachment 570640 [details] [diff] [review]

With this patch we fail basic/shapelessCalleeTest.js with --ion-eager, same assert as bug 691598. I was able to reduce it to a test without AND/OR:
function f(a, b, c) {
Seems to be bug 691598, or do you want me to file a separate bug?
Comment 3 User image Jan de Mooij [:jandem] 2011-11-04 07:05:25 PDT
Created attachment 571961 [details] [diff] [review]
Follow-up fix

While fuzzing this a bit I noticed there's a problem with bailouts. Consider this expression:

X && Y

If we bail-out at Y, the snapshot of the RHS block assumes X is still on the stack (X is popped immediately after taking the snapshot). The interpreter, however, assumes JSOP_AND already popped X.

The simplest fix is to change JSOP_AND and JSOP_OR to always leave the value on the stack, and insert a JSOP_POP right before the RHS.

I can probably land this patch on m-c first.
Comment 4 User image David Anderson [:dvander] 2011-11-07 13:59:27 PST
Comment on attachment 571961 [details] [diff] [review]
Follow-up fix

Review of attachment 571961 [details] [diff] [review]:

Yeah, would be good to land the non-ion changes on m-c first.
Comment 5 User image Jan de Mooij [:jandem] 2011-11-08 05:15:15 PST
I will land these patches tomorrow (after the nightly -> aurora merge).
Comment 6 User image Jan de Mooij [:jandem] 2011-11-09 09:29:52 PST

Please don't close this bug, I still have to land the other patch on the IM branch.
Comment 7 User image Marco Bonardo [::mak] 2011-11-10 03:16:15 PST
Comment 8 User image Jan de Mooij [:jandem] 2011-11-19 05:05:03 PST

Note You need to log in before you can comment on or make changes to this bug.