Volunteers needed: Function.prototype.bind() in ES3.1 pseudo-code

Mike Shaver mike.shaver at gmail.com
Thu Sep 18 11:05:27 PDT 2008


On Thu, Sep 18, 2008 at 1:41 PM, Garrett Smith <dhtmlkitchen at gmail.com> wrote:
> 2008/9/18 Mark S. Miller <erights at google.com>:
>> The Redmond mtg is fast approaching. We'd like to put out an official
>> for-Redmond-mtg draft of the ES3.1 spec by then. I had volunteered to write
>> the spec for Function.prototype.bind(). Long term, I think we all agree we'd
>> like to see this spec and many others self-hosted in EcmaScript. However,
>> the discussion of self-hosting issues makes clear that this ain't gonna
>> happen in time for ES3.1.
>>
>> So what we need now is a spec for Function.prototype.bind() in the peculiar
>> pseudo-code style -- combining the worst of COBOL and assembly language --
>
> What pseudo-code style? This:

The pseudo-code style from the existing ES3 spec.  An example:

11.3.1 Postfix Increment Operator

    The production PostfixExpression : LeftHandSideExpression [no
LineTerminator here] ++ is evaluated as follows:

    1. Evaluate LeftHandSideExpression.

    2. Call GetValue(Result(1)).

    3. Call ToNumber(Result(2)).

    4. Add the value 1 to Result(3), using the same rules as for the +
operator (see 11.6.3).

    5. Call PutValue(Result(1), Result(4)).

    6. Return Result(3).

Mike


More information about the Es-discuss mailing list