Re: IDL: number types

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