Drive by comments.
I don't think adding STL-like things to V8 is a good idea. At least for
consistency reasons. You may argue that C++ developers are expected to know
(and
love) STL. Yet the rest of V8 code does not use STL. Making a container
implementation fully STL conformant is a lot of boilerplate code nobody
wants.
(I think you can only justify that when you're creating a drop in
replacement
for an existing container, e.g., Google's dense and sparse hash maps.) Not
making it fully conformant means it will still be surprising to engineers
expecting conformance. It seems so far V8 has been either avoiding using
hash
maps by adding extra properties to various objects (e.g., see
CalculateEmitStore) or, if a hash map must be used, building ad hoc wrappers
with Google C++ style interfaces (Lookup, Insert, etc.).
-- Vitaly
https://chromiumcodereview.appspot.com/9691040/diff/11002/src/ia32/full-codegen-ia32.cc
File src/ia32/full-codegen-ia32.cc (right):
https://chromiumcodereview.appspot.com/9691040/diff/11002/src/ia32/full-codegen-ia32.cc#newcode1511
src/ia32/full-codegen-ia32.cc:1511: // Emit code to define accessors,
using only a single call to the runtime for
Can this share at least some code with CalculateEmitStore (called
above)?
https://chromiumcodereview.appspot.com/9691040/
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev