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

Issue 24023: Rearrange the code in Scope::ResolveVariable.... (Closed)

Created:
11 years, 10 months ago by Mads Ager (chromium)
Modified:
9 years, 7 months ago
Reviewers:
Kasper Lund
CC:
v8-dev
Visibility:
Public.

Description

Rearrange the code in Scope::ResolveVariable. I find this clearer and it also enables the DYNAMIC_LOCAL optimization for code executed by eval that itself uses eval: eval("(function() { var x = 2; eval('1'); do stuff with x...; })()") Committed: http://code.google.com/p/v8/source/detail?r=1322

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+31 lines, -19 lines) Patch
M src/scopes.cc View 2 chunks +29 lines, -19 lines 0 comments Download
M test/mjsunit/local-load-from-eval.js View 1 chunk +2 lines, -0 lines 1 comment Download

Messages

Total messages: 3 (0 generated)
Mads Ager (chromium)
11 years, 10 months ago (2009-02-19 13:54:06 UTC) #1
Kasper Lund
LGTM. http://codereview.chromium.org/24023/diff/1/2 File test/mjsunit/local-load-from-eval.js (right): http://codereview.chromium.org/24023/diff/1/2#newcode38 Line 38: test("(function() { var y = 42; eval('var ...
11 years, 10 months ago (2009-02-19 14:56:51 UTC) #2
Mads Ager (chromium)
11 years, 10 months ago (2009-02-19 15:24:52 UTC) #3
> http://codereview.chromium.org/24023/diff/1/2#newcode38
> Line 38: test("(function() { var y = 42; eval('var y = 2'); assertEquals(2,
y);
> })();");
> Maybe you should test that it works when introducing another variable (z?)
with
> var inside the eval. I'm not quite sure if the eval('var  = 2') in line 38
> actually creates an extension object.

Good point.  Done.

Powered by Google App Engine
This is Rietveld 408576698