In the toplevel compiler, shift the responsibility of assigning a
authorkmillikin@chromium.org <kmillikin@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 28 Oct 2009 13:25:40 +0000 (13:25 +0000)
committerkmillikin@chromium.org <kmillikin@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 28 Oct 2009 13:25:40 +0000 (13:25 +0000)
commit6a83cb0ced3b5f6582c1f7106ea971c8a1faa0f5
treebccd42f0791fa9393e11f3dc833aec99d0896de4
parent6768703d24b6bb7a8b0ad8c70a43a11892c1a22c
In the toplevel compiler, shift the responsibility of assigning a
location to an Expression AST node from the node's parent to the node
itself.

This allows an inherited code generation context from a parent node to
be passed arbitrarily far down the tree (eg, the subexpression of a
unary not is in the same context as the unary expression itself, the
then and else subexpressions of the ternary operator are in the same
context as the whole expression, and so forth).

We do not yet take advantage of this in the backend (eg, the right
subexpression of short-circuited OR is still compiled by using the
parent's destination location, rather than the subexpression's
itself).

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3163 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/arm/fast-codegen-arm.cc
src/ast.cc
src/ast.h
src/compiler.cc
src/ia32/fast-codegen-ia32.cc
src/x64/fast-codegen-x64.cc