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

Issue 11035054: Make sure that names of temporaries do not clash with real variables. (Closed)

Created:
8 years, 2 months ago by rossberg
Modified:
8 years, 2 months ago
Reviewers:
Michael Starzinger
CC:
v8-dev
Visibility:
Public.

Description

Make sure that names of temporaries do not clash with real variables. R=mstarzinger@chromium.org BUG=v8:2322 Committed: https://code.google.com/p/v8/source/detail?r=12668

Patch Set 1 #

Total comments: 2

Patch Set 2 : Adapt debugger test. #

Patch Set 3 : Addressed Michael's comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+16 lines, -5 lines) Patch
M include/v8.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/heap.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M src/parser.cc View 1 chunk +6 lines, -1 line 0 comments Download
M src/scopes.h View 1 chunk +1 line, -1 line 0 comments Download
M test/mjsunit/harmony/debug-blockscopes.js View 1 2 chunks +2 lines, -2 lines 0 comments Download
M test/mjsunit/regress/regress-2322.js View 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
rossberg
8 years, 2 months ago (2012-10-05 12:22:12 UTC) #1
Michael Starzinger
LGTM (with comments). https://codereview.chromium.org/11035054/diff/1/src/parser.cc File src/parser.cc (right): https://codereview.chromium.org/11035054/diff/1/src/parser.cc#newcode2847 src/parser.cc:2847: heap_factory->NewStringFromAscii(CStrVector(".for.")); You could move this symbol ...
8 years, 2 months ago (2012-10-05 12:31:38 UTC) #2
rossberg
8 years, 2 months ago (2012-10-05 12:47:04 UTC) #3
https://codereview.chromium.org/11035054/diff/1/src/parser.cc
File src/parser.cc (right):

https://codereview.chromium.org/11035054/diff/1/src/parser.cc#newcode2847
src/parser.cc:2847: heap_factory->NewStringFromAscii(CStrVector(".for."));
On 2012/10/05 12:31:38, Michael Starzinger wrote:
> You could move this symbol into the root-set by adding it to SYMBOL_LIST, call
> it e.g. dot_for_symbol and then access it through factory->dot_for_symbol().

Done.

> Also does the name really need to be different for every temporary, or could
we
> use the one symbol for all temporaries?

There can be several loop variables in the same scope, so they should be
distinguishable.

Powered by Google App Engine
This is Rietveld 408576698