W3C home > Mailing lists > Public > public-script-coord@w3.org > January to March 2013

Re: IDL: number types

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Wed, 20 Mar 2013 13:57:28 -0400
Message-ID: <5149F888.5020900@mit.edu>
To: Domenic Denicola <domenic@domenicdenicola.com>
CC: Anne van Kesteren <annevk@annevk.nl>, Marcos Caceres <w3c@marcosc.com>, Yehuda Katz <wycats@gmail.com>, "public-script-coord@w3.org" <public-script-coord@w3.org>
On 3/20/13 1:41 PM, Domenic Denicola wrote:
> Essentially it is a declarative way of doing the argument-type coercion

Oh, one more note.

I mentioned this before, briefly, but for return values there is another 
benefit to having the actual type defined in IDL.  It can give the JIT 
hints on the range of values that can be returned, which can allow it to 
optimize better (e.g. if your return type is "long" the JIT can know 
statically that the return value will fit in an integer and use an 
integer register for it and whatnot).

We don't use this in Gecko+SpiderMonkey yet (past telling the JIT we're 
returning a number), but there have been some thoughts about doing in 
the the future.

-Boris
Received on Wednesday, 20 March 2013 17:57:58 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 May 2013 19:30:09 UTC