[webkit-dev] arm jit

Toshiyasu Morita tm_webkit at yahoo.com
Wed Jun 10 14:24:04 PDT 2009


Why does the arity check need to be in the caller, and not the callee?

Consider: one function that is called from 10,000 places.

Arity check in the caller: 10,000 copies of the artity check.
Arity check in the callee: one copy of the arity check

Toshi

--- On Wed, 6/10/09, Geoffrey Garen <ggaren at apple.com> wrote:

From: Geoffrey Garen <ggaren at apple.com>
Subject: Re: [webkit-dev] arm jit
To: "Oliver Hunt" <oliver at apple.com>
Cc: "Toshiyasu Morita" <tm_webkit at yahoo.com>, "WebKit Development" <webkit-dev at lists.webkit.org>
Date: Wednesday, June 10, 2009, 9:14 PM

> It could be worth trying a stub function that triggers the compilation of the function should it not be present, but i'm not sure what that would really save as we still need the arity checks inline

A design that I like is a stub function that triggers compilation (so the caller can always "just call"), combined with an arity check in the callee, which linked calls can skip (by linking to a label past the end of the arity check).

I think that could simplify the calling code, while reducing its footprint.

Geoff



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20090610/c9e0e999/attachment.html>


More information about the webkit-dev mailing list