Reviewers: Rico,
Message:
PTAL.
Description:
Adapt source position recording and fix ScopeIterator.
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. However, the rewriter did not yet record source positions for the
assignment it includes and moreover the source code position of a return
sequence for eval code might lie inside of an inner scope when both the eval
code and the inner scope end at the same position.
This CL adds source code positions for the assignment added by the
rewriter. The
recorded source position for a return sequence was previously the last
character
of the function literal for which code is being generated. This CL changes
that
to one character past the last character of the function literal, i.e. is
for
real functions it is one character past the closing brace and for
global/eval
code it is one character the complete source code.
TEST=mjsunit/debug-stepout-scope.js
BUG=v8:1826
Please review this at http://codereview.chromium.org/8585001/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/arm/full-codegen-arm.cc
M src/ast.h
M src/ia32/full-codegen-ia32.cc
M src/rewriter.cc
M src/runtime.cc
M src/scopes.cc
M src/x64/full-codegen-x64.cc
A test/mjsunit/debug-stepout-scope.js
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev