Re: [v8-dev] How does inlining Math functions work

2016-10-18 Thread Dean McNamee
Okay, makes sense, thanks. Wasn't sure if there was any special handling of the math builtins. On Tue, Oct 18, 2016 at 10:24 PM, Yang Guo wrote: > Well that depends on where the function comes from. In baseline code we have > a load before the call, and the inline cache

Re: [v8-dev] How does inlining Math functions work

2016-10-18 Thread Yang Guo
Well that depends on where the function comes from. In baseline code we have a load before the call, and the inline cache records what has been loaded. When we compile optimized code, the recorded callees tell us what to inline. Before calling the inlined code we indeed have to check that the

Re: [v8-dev] How does inlining Math functions work

2016-10-18 Thread Dean McNamee
Thanks. Then what does the generated code look like, does it need to do a check to make sure that Math.abs hasn't changed? On Tue, Oct 18, 2016 at 10:10 PM, Yang Guo wrote: > Iirc we inline by recognizing the function object, not by recognizing that > it's stored as

Re: [v8-dev] How does inlining Math functions work

2016-10-18 Thread Yang Guo
Iirc we inline by recognizing the function object, not by recognizing that it's stored as Math.abs. I.e. we compare the inlinee to the known Math.abs function object. Yang On Tue, Oct 18, 2016, 21:45 Dean McNamee wrote: > Sorry, I'm sure this has been discussed before but I