Could you provide more information? How does this fail? Do you have
an example?
As far as I can tell, this is working as intended. Using a trunk build:
V8 version 0.3.4.1
> var cache = {}
> function getCacheForID(id) { return cache[id] = cache[id] || {}; }
> getCacheForID('asdf').x = 42
42
> getCacheForID('qwer').x = 1
1
> getCacheForID('asdf').x
42
> getCacheForID('qwer').x
1
-- Mads
On Wed, Oct 15, 2008 at 8:34 PM, jr <[EMAIL PROTECTED]> wrote:
>
>
> I noticed prototype.js got "patched" to correct the assignment-on-
> return issue in v8.
>
> function getCacheForID(id) {
> return cache[id] = cache[id] || { }; // fails in v8
>
> // patch around v8:
> // cache[id] = cache[id] || { };
> // return cache[id];
> }
>
>
> The original bug says it was fixed in v8-bleeding r117, but it's still
> broken in v8 trunk.
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
-~----------~----~----~----~------~----~------~--~---