Re: [heycam/webidl] Is step 4 of the effective overload set construction unnecessary? (#600)

_maxarg_ is the maximum number of arguments declared across all of the overloads; it describes something about the entries in _F_.  _N_ is the number of arguments that were actually passed for the particular function invocation being considered; it describes the way the function is being called.  See how the effective overload set algorithm is invoked in https://heycam.github.io/webidl/#dfn-create-operation-function step 2.1.4.

So as an example, if your IDL has:

    void foo(long x);
    void foo(long x, long y, long z, long w);

then _maxarg_ is `4`.  If you do `foo(1, 2)` then _max_ will be `2`.  If you do `foo(1, 2, 3, 4, 5)` then _max_ will be `4`.

Step 4 is determining a cap on the number of arguments we can actually work with; this can be smaller than _maxarg_ if fewer than _maxarg_ arguments were passed.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/heycam/webidl/issues/600#issuecomment-447535148

Received on Saturday, 15 December 2018 04:01:43 UTC