Move the AstVisitor stack check from Accept to Visit.
authorkmillikin@chromium.org <kmillikin@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 30 Mar 2010 12:25:58 +0000 (12:25 +0000)
committerkmillikin@chromium.org <kmillikin@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 30 Mar 2010 12:25:58 +0000 (12:25 +0000)
commit789f832e4aeebb927c3882433ab2e30ac343cf96
treed4af77c884504bf9904b5efb6ea046f9ab1c4ca7
parent155a9cdd0891cf555758574e8756aa3daa3b4a7d
Move the AstVisitor stack check from Accept to Visit.

The stack check has been moved from the Accept function dispatching on
the AST node type, earlier to the Visit function dispatching on the
visitor type.

This allows very simple non-recursive visitors (not taking extra
arguments or returning values) via the convention of calling "Visit"
if one wants the stack check and "Accept" if one does not.  Recursive
calls should all be via "Visit".

Review URL: http://codereview.chromium.org/1567007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4320 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/ast.cc
src/ast.h
src/flow-graph.cc