Last Comment Bug 686381 - IonMonkey: Compile JSOP_AND
: IonMonkey: Compile JSOP_AND
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: unspecified
: All All
: -- normal (vote)
: ---
Assigned To: Jan de Mooij [:jandem]
:
: Jason Orendorff [:jorendorff]
Mentors:
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:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
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 David Anderson [:dvander] 2011-09-12 16:16:47 PDT

    
Comment 1 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 Jan de Mooij [:jandem] 2011-10-31 04:13:58 PDT
Created attachment 570640 [details] [diff] [review]
Patch

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) {
    a();
}
f();
--
Seems to be bug 691598, or do you want me to file a separate bug?
Comment 3 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 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 Jan de Mooij [:jandem] 2011-11-08 05:15:15 PST
I will land these patches tomorrow (after the nightly -> aurora merge).
Comment 6 Jan de Mooij [:jandem] 2011-11-09 09:29:52 PST
https://hg.mozilla.org/integration/mozilla-inbound/rev/97dc5c8ab41b

Please don't close this bug, I still have to land the other patch on the IM branch.
Comment 7 Marco Bonardo [::mak] 2011-11-10 03:16:15 PST
https://hg.mozilla.org/mozilla-central/rev/97dc5c8ab41b
Comment 8 Jan de Mooij [:jandem] 2011-11-19 05:05:03 PST
http://hg.mozilla.org/projects/ionmonkey/rev/bb133d578f86

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