Comment #11 on issue 2779 by [email protected]: Frozenness ignored by
optimized ++/--
http://code.google.com/p/v8/issues/detail?id=2779
(1) Numeric keys:
var o = {'3': 5};
function f(o) { o[3]++; }
Object.freeze(o);
for (var i = 0; i < 10000; i++) { f(o); }
o[3];
the result is 5, which suggests that this bug is not tickled by numeric
keys.
(2) Trivial non-literal keys suffice to fix:
var o = {x: 5};
function f(o) { o[(1, 'x')]++; }
Object.freeze(o);
for (var i = 0; i < 10000; i++) { f(o); }
o.x;
The result of the above is 5, meaning that simply cloaking the index 'x'
inside a trivial comma expression hides it from the optimization.
* * *
Chrome folks: Could you please confirm especially #2 above since, if that
makes sense from what you see in your codebase, it could be an easy way for
us to mitigate the problem without bloating the code too much.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.