The ScopeIterator uses recorded scope position - as detailed in scopes.h - and
authorkeuchel@chromium.org <keuchel@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 28 Nov 2011 12:47:39 +0000 (12:47 +0000)
committerkeuchel@chromium.org <keuchel@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 28 Nov 2011 12:47:39 +0000 (12:47 +0000)
commit8866d63cc943f153de55c704b0b36fd9c1adcb4e
tree88da14cb31ef44a44eda58af2df21d55ee093202
parent71a2f538c07fa3ec941fd1410b7625d36ed21f95
The ScopeIterator uses recorded scope position - as detailed in scopes.h - and
source code positions it gets from the program counter to recreate the scope
chain by reparsing the function or program.

This CL includes the following changes
* Adds source code positions for the assignment added by the rewriter.
* Run the preparser over global code first.
* Use the ScopeType from the ScopeInfo to determine if the code being debugged
  is eval, function or global code instead of looking up the '.result' symbol.

TEST=mjsunit/debug-stepout-scope.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10076 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/ast.h
src/parser.cc
src/parser.h
src/rewriter.cc
src/runtime.cc
src/scopes.cc
test/cctest/test-parsing.cc
test/mjsunit/debug-stepout-scope.js [new file with mode: 0644]