Unify handling of position info in AST, part 1
authorrossberg@chromium.org <rossberg@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 14 Oct 2013 09:24:58 +0000 (09:24 +0000)
committerrossberg@chromium.org <rossberg@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 14 Oct 2013 09:24:58 +0000 (09:24 +0000)
commit19d716989ef90aa1bb50638896cda99c4db6e322
tree99c0ff033c12790f0c4d1989c42e72aeb60c8210
parent9724f06211307f0f9c4c2d2e47a1eb826872af6e
Unify handling of position info in AST, part 1

* AstNode now has a position info.
* Removed various ad-hoc position infos from subclasses (most of which had it).
* Position is always set with the constructor, instead of later.
* Take care to use kNoPosition in the right spots, to not crash the debugger.

Still to do:

* Eliminate Conditional::then/else_position and WhileStatement::condition_position.
* Make CaseClause a proper AstNode and eliminate its custom position.
* If possible, eliminate all uses of kNoPosition.

R=yangguo@chromium.org
BUG=

Review URL: https://codereview.chromium.org/24076007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17183 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/ast.cc
src/ast.h
src/full-codegen.cc
src/parser.cc
src/parser.h
src/rewriter.cc
src/scopes.cc
test/cctest/test-ast.cc
test/cctest/test-debug.cc