Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Proposed SpiderMonkey extension removal: o.item(i) = ...; JS_SetCallReturnValue2

4 views
Skip to first unread message

Brendan Eich

unread,
Aug 7, 2009, 3:05:45 PM8/7/09
to
Thanks to the malign influence of VBScript, IE JScript has long
supported call expressions as lvalues:

j = d.item(i); // get d[i]
d.item(i) = k; // set d[i]

This extension is not needed for Web compatibility AFAIK, but it
occasionally shows up in ASP.NET and other content, some of which then
wants to be hosted by SpiderMonkey. So, long ago I added this "lvalue
return" feature to SpiderMonkey -- but only for the case where the
method (item in the example) is native. See https://bugzilla.mozilla.org/show_bug.cgi?id=44997.

We'd like to remove this SpiderMonkey extension. It will not be
standardized in any ECMA-262 Edition, although the spec allows "host
objects" to return Reference internal type instances. The
implementation was done in 2000 when SpiderMonkey had only a feature-
ful and pretty unoptimized interpreter. Now the code to support
Reference type return is an albatross.

Anyone object? If so, why are you using this extension? Please show
examples and some kind of rationale for this VB-ism. It's likely if
you can't avoid using this feature, you'll have to stick to a downrev
SpiderMonkey soon.

/be

Brendan Eich

unread,
Aug 7, 2009, 4:06:56 PM8/7/09
to
Bug filed on removing JS_HAS_LVALUE_RETURN support, and already
patched:

https://bugzilla.mozilla.org/show_bug.cgi?id=509098

/be

0 new messages