Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(108)

Issue 8590027: Fix the ScopeIterator reimplemantation. (Closed)

Created:
9 years, 1 month ago by Steven
Modified:
9 years ago
Reviewers:
Lasse Reichstein, Rico
CC:
v8-dev
Visibility:
Public.

Description

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 Committed: http://code.google.com/p/v8/source/detail?r=10076

Patch Set 1 #

Total comments: 4

Patch Set 2 : Addressed comments. #

Patch Set 3 : Reapply the ScopeIterator reimplementation. Reverts r10033. #

Patch Set 4 : ScopeIterator fix and test cases. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+663 lines, -106 lines) Patch
M src/ast.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler.cc View 1 2 3 1 chunk +1 line, -8 lines 1 comment Download
M src/parser.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M src/parser.cc View 1 2 3 2 chunks +10 lines, -2 lines 0 comments Download
M src/rewriter.cc View 1 2 3 1 chunk +14 lines, -2 lines 0 comments Download
M src/runtime.cc View 1 2 3 7 chunks +207 lines, -87 lines 0 comments Download
M src/scopes.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M test/cctest/test-parsing.cc View 3 1 chunk +4 lines, -4 lines 0 comments Download
A test/mjsunit/debug-stepout-scope.js View 1 2 3 1 chunk +423 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Steven
PTAL.
9 years, 1 month ago (2011-11-17 14:55:45 UTC) #1
Rico
LGTM, but consider having lasse take a look as well
9 years, 1 month ago (2011-11-17 17:29:58 UTC) #2
Lasse Reichstein
If our scopes differ depending on whether we preparse or not, they are broken. Preparsing ...
9 years, 1 month ago (2011-11-18 14:12:52 UTC) #3
Steven
http://codereview.chromium.org/8590027/diff/1/src/runtime.cc File src/runtime.cc (right): http://codereview.chromium.org/8590027/diff/1/src/runtime.cc#newcode11247 src/runtime.cc:11247: pre_data = ParserApi::PartialPreParse(source, NULL, flags); Initially this was only ...
9 years, 1 month ago (2011-11-18 16:53:19 UTC) #4
Steven
I merged the changes from http://codereview.chromium.org/8585001/ into this issue. Patch set 3 reapplies the ScopeIterator ...
9 years, 1 month ago (2011-11-24 13:49:03 UTC) #5
Lasse Reichstein
9 years ago (2011-11-28 11:51:36 UTC) #6
LGTM.

http://codereview.chromium.org/8590027/diff/9002/src/compiler.cc
File src/compiler.cc (right):

http://codereview.chromium.org/8590027/diff/9002/src/compiler.cc#newcode495
src/compiler.cc:495: pre_data = ParserApi::PartialPreParse(source, extension,
flags);
You can just skip creating preparser data now.
The parser will handle lazy functions effectively in the absence of pre_data now
(using the preparser's function-body-parser instead of its own). It'll be faster
than preparsing the entire script first, so preparser data is only an advantage
if it's been created offline (so you can skip the function body entirely).

Powered by Google App Engine
This is Rietveld 408576698