Added new patch set.
http://codereview.chromium.org/7529007/diff/4001/src/bootstrapper.cc File src/bootstrapper.cc (right): http://codereview.chromium.org/7529007/diff/4001/src/bootstrapper.cc#newcode2180 src/bootstrapper.cc:2180: if (FLAG_harmony_weakmaps) { // -- W e a k M a p On 2011/08/02 15:32:04, rossberg wrote:
On 2011/08/02 14:05:22, Michael Starzinger wrote: > On 2011/08/02 12:33:38, rossberg wrote: > > Can you perhaps move this into a separate function > InitializeExperimentalGlobal? > > Done. I suppose you meant InstallExperimentalNatives, right?
Actually, no, I had in mind a new function that mirrors the role of InitializeGlobal, but for the experimental stuff.
Done. http://codereview.chromium.org/7529007/diff/4001/test/mjsunit/harmony/weakmaps.js File test/mjsunit/harmony/weakmaps.js (right): http://codereview.chromium.org/7529007/diff/4001/test/mjsunit/harmony/weakmaps.js#newcode55 test/mjsunit/harmony/weakmaps.js:55: TestMapping(m, new Object, new Object); On 2011/08/02 15:32:04, rossberg wrote:
On 2011/08/02 14:05:22, Michael Starzinger wrote: > On 2011/08/02 12:33:38, rossberg wrote: > > Does this work with proxies as keys? > > No, actually it doesn't. Unfortunately the whole concept of identity
hash
codes > is implemented on JSObject, but a JSProxy cannot be cast to a
JSObject. So it
> will require quite some effort to make it work.
In that case, some respective TODO in here would probably be good to
have. Done. Added comment to runtime.cc, that's were the assertion will trigger in case you pass JSProxy objects.
> Does the Harmony proposal for proxies say anything about identity
hash codes
for > proxies?
No, what specifically would you expect it to say? AFAICS, the spec
never talks
about hashing or hash codes, nor should it.
Hmm, I am so used to identity hashing, can't imagine an OO-language without it. :) http://codereview.chromium.org/7529007/ -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
