Comment #2 on issue 3459 by [email protected]: AstValueFactory bypasses
regular string internalization
http://code.google.com/p/v8/issues/detail?id=3459
Update: we discussed this offline (like really offline).
- The main feature here is that the AstValueFactory uses the same hashes
for strings that the heap string table would use, to avoid computing hashes
twice. This is important for efficiency.
- So when we construct the AstStrings, we compute a hash with StringHasher
and store it along the AstString. The StringHasher needs a hash key. When
it's the time to internalize the strings, we use the already computed
hashes with StringTable::LookupKey (see AstRawStringInternalizationKey).
- The main abstraction leak is the possibility to use StringHasher and
LookupKey.
- It would be possible to make the Heap provide some kind of
a "StringHasher with a hash key" abstraction (a closure of StringHasher wrt
the hash key), and AstValueFactory could use it, but it's unclear whether
doing that makes the code so much clearer that it's worth the effort.
--
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.