Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

IonMonkey Landed

115 views
Skip to first unread message

dvander

unread,
Sep 11, 2012, 4:11:46 PM9/11/12
to
Hi All,

IonMonkey has now landed on mozilla-central (yay!). Largely this shouldn't affect anyone doing SpiderMonkey development, but in case it does, here are the big takeaway changes:

(0) Benchmarks (usually) get faster. Compiling the shell does not. Sorry :(

(1) By running the shell, the flags "--ion -m -n" are now implied by default. You can disable them respectively with "--no-ion", "--no-jm", and "--no-ti". Disabling TI disables IonMonkey.

In the browser, there is one new JS pref: "javascript.options.ion.content". We don't expose any other flags since they'd only exist to horribly break stuff.

(2) IonMonkey, unlike JM, does not use the interpreter stack to store local variables and frames. It uses the C stack. This means that cx->fp(), js_GetTopStackFrame(), etc, must not be used unless with great care. Even if you have a js::StackFrame, it is not okay to peek at it because it could be stale.

When in doubt, use the wonderful ScriptFrameIter class. It has abstractions for walking the stack and inspecting frames so you don't ever have to touch a js::StackFrame.

(3) Lastly, IonMonkey introduces new ways to get in and out of the JIT. Briefly, they are:

(a) At function calls or loop edges, we may decide to run a script with IonMonkey. From C++, this goes through ion::Cannon.

(b) A guard failure, type-inference invalidation, or GC can cause a "bailout". A bailout is when an Ion frame on the stack must be converted back into an interpreter frame. When this happens, interpreter frames are created for each JS frame in the Ion frame (there can be multiple because of inlining), and we resume running the function in the interpreter instead.

-David

Wes Garland

unread,
Sep 11, 2012, 4:17:23 PM9/11/12
to dvander, dev-tech-...@lists.mozilla.org
YAY!

Congratulations, Ionmonkey Hackers!!

Wes
> _______________________________________________
> dev-tech-js-engine mailing list
> dev-tech-...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-tech-js-engine



--
Wesley W. Garland
Director, Product Development
PageMail, Inc.
+1 613 542 2787 x 102

a.c...@weelya.com

unread,
Sep 11, 2012, 4:51:04 PM9/11/12
to dev-tech-...@lists.mozilla.org


o/

On Tue, 11 Sep 2012 16:17:23 -0400, Wes Garland wrote:

>
YAY!
>
> Congratulations, Ionmonkey Hackers!!
>
> Wes
>
> On 11
instead. -David _______________________________________________
dev-tech-js-engine mailing list dev-tech-...@lists.mozilla.org [1]
https://lists.mozilla.org/listinfo/dev-tech-js-engine [2]




Links:
------
[1] mailto:dev-tech-...@lists.mozilla.org
[2]
https://lists.mozilla.org/listinfo/dev-tech-js-engine
[3]
mailto:bail...@gmail.com

Dave Mandelin

unread,
Sep 11, 2012, 8:47:04 PM9/11/12
to
Congratulations to all the IonMonkey contributors! This is the most advanced compiler in SpiderMonkey yet, and it should be able to do even more over time.

Dave

a.c...@weelya.com

unread,
Sep 12, 2012, 10:38:44 AM9/12/12
to dev-tech-...@lists.mozilla.org


Hey David,

Congratz for the huge work !

If found a big perf
regression. I filled a bug along with a test case :
https://bugzilla.mozilla.org/show_bug.cgi?id=790628

Thanks,

Anthony
Catel

Nicolas B. Pierron

unread,
Sep 12, 2012, 11:00:56 AM9/12/12
to
Hi Anthony,

On 09/12/2012 07:38 AM, a.c...@weelya.com wrote:
> If found a big perf
> regression. I filled a bug along with a test case :
> https://bugzilla.mozilla.org/show_bug.cgi?id=790628

Thanks for registering to Bugzilla and creating a new issue for that.
Opening the bug with "IonMonkey:" in the title and filing it under "Core >
Javascript Engine" should be enough for us to find it. I will look at it
and see if this is related to a known issue.

--
Nicolas B. Pierron
0 new messages