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

[Bug 15986] Specify exactly how and when ECMAScript arguments are evaluated

From: <bugzilla@jessica.w3.org>
Date: Tue, 14 Feb 2012 18:02:53 +0000
To: public-script-coord@w3.org
Message-Id: <E1RxMiL-00073A-1u@jessica.w3.org>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=15986

Allen Wirfs-Brock <allen@wirfs-brock.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |allen@wirfs-brock.com

--- Comment #2 from Allen Wirfs-Brock <allen@wirfs-brock.com> 2012-02-14 18:02:51 UTC ---
A clarification, because the title of this bug may be misleading.

The evaluation order of the arguments to a function by the caller is fully
specified by the ECMAScript specification.  The issue here seems to be the
order in which the formal parameters (the values of the arguments after they
have been evaluated as part of performing the ECMAScript call) are accessed by
the callee in a manner that possibly produces observable side-effects. 

>From an ECMAScript perspective, the callee includes both intermediary layers
such as the Web IDL overload resolution process and the actual code of the
resolved function.

To get a precise ordering of side-effects it is necessary that both the
over-load resolution algorithm and the individual function specifications
provide a full and complete ordering of all potentially side-effect producing
operations (include ToString and ToNumber coercions). ECMAScript uses
algorithmic specifications to ensure such an ordering for its built-in library
functions

I believe that the Web IDL over-load resolution specification does define a
precise ordering for such side-effects.

However, for the actual web api functions it isn't clear how you would define
the ordering of observable side-effect if you don't want to use an algorithmic
specification.

In summary, ECMAScript already does what it needs to do.  I believe (but this
needs confirmation) that Web IDL does what it needs to do. However,
implementations may not yet conform to the current  Web IDL specification. Once
that occurs, it still leave every function defined using Web IDL as being
responsible for specifying observable side-effect order.

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
Received on Tuesday, 14 February 2012 18:02:58 UTC

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