Comment #1 on issue 3459 by [email protected]: AstValueFactory bypasses regular string internalization
http://code.google.com/p/v8/issues/detail?id=3459

Thanks for this bug report; it's on my radar, though not the top of my work queue.

Notes (as a reminder for myself about how the code works):

The hash seed is needed not only during internalization, but right from the start when we compute hashes for the strings for storing them into a hash map.

Currently the sane functionality relies on the top level passing the correct hash seed.

Alternative 1:
- Give a pointer to the Isolate or the Heap to the AstValueFactory when constructing it. Upon construction time, AstValueFactory will then get the hash seed from there and store it. - AstValueFactory construction also needs to happen early enough in the parallel parsing case (the CL is pending; also, this is completely doable).

I don't have a strong opinion here, otoh it's a bit silly to give Heap or Isolate to AstValueFactory when the AstValueFactory is explicitly not allowed to use them (except special circumstances, like, only in the ctor).

Alternative 2:
- Add a DCHECK to AstValueFactory::Internalize which checks that the hash seed which was passed in the ctor is the hash seed of the Isolate. This would force the code to pass the right hash seed.

---

WDYT? Based on your report, it looks like you'd prefer Alteranative 1.

--
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/d/optout.

Reply via email to