AST nodes have at most one bailout/typefeedback ID now, saving lots of memory.
This is basically https://codereview.chromium.org/
569573002/ done right:
During construction, each node type tells its parent how many IDs it
needs in addition to the parent's ones. This is done all the way up in
the class hierarchy until a node's parent doesn't need any ID. At that
point we know how many IDs in summary are needed, and we reserve the
whole range at once, saving only the base ID of that range. All IDs
are now calculated via simple offsets to that base ID. To all
performaniacs: The C++ compiler simplifies the constant calculation to
a simple load and the addition of a single constant.
Note that the actual code is much simpler than all that prose above. :-)
It's basically how compilers for OO languages figure out vtable entries.
We still have lots of holes due to padding in the AST nodes, but this
will be addressed in a separate CL.
BUG=chromium:417697
LOG=y
R=mvstanton@chromium.org
Review URL: https://codereview.chromium.org/
643633003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24524
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00