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

Issue 28027: Speed up access to global variables from eval scopes. Traverse the... (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

Speed up access to global variables from eval scopes. Traverse the surrounding context to figure out if the variable could be global. If the variable could be global we check context extension objects at runtime and use a global LoadIC if no variables have been introduced by eval. Fix crash bug when loading function arguments from inside eval. The shadowed variable in the DYNAMIC_LOCAL case does not rewrite to a slot in that case. Committed: http://code.google.com/p/v8/source/detail?r=1348

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+514 lines, -71 lines) Patch
M src/codegen-arm.cc View 3 chunks +33 lines, -8 lines 0 comments Download
M src/codegen-ia32.cc View 1 3 chunks +33 lines, -8 lines 0 comments Download
M src/compilation-cache.h View 1 2 chunks +12 lines, -3 lines 1 comment Download
M src/compilation-cache.cc View 1 3 chunks +32 lines, -1 line 0 comments Download
M src/compiler.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler.cc View 1 8 chunks +16 lines, -7 lines 0 comments Download
M src/contexts.h View 1 1 chunk +9 lines, -0 lines 0 comments Download
M src/contexts.cc View 1 1 chunk +36 lines, -0 lines 0 comments Download
M src/objects.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M src/objects.cc View 1 6 chunks +109 lines, -15 lines 1 comment Download
M src/runtime.cc View 1 4 chunks +12 lines, -7 lines 0 comments Download
M src/scopeinfo.h View 1 4 chunks +4 lines, -2 lines 0 comments Download
M src/scopeinfo.cc View 1 7 chunks +26 lines, -4 lines 0 comments Download
M src/scopes.h View 1 3 chunks +19 lines, -6 lines 0 comments Download
M src/scopes.cc View 1 5 chunks +19 lines, -10 lines 0 comments Download
A test/mjsunit/global-load-from-eval.js View 1 1 chunk +85 lines, -0 lines 0 comments Download
A test/mjsunit/global-load-from-nested-eval.js View 1 chunk +66 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Mads Ager (chromium)
11 years, 10 months ago (2009-02-24 10:34:04 UTC) #1
Kasper Lund
LGTM. http://codereview.chromium.org/28027/diff/25/26 File src/compilation-cache.h (right): http://codereview.chromium.org/28027/diff/25/26#newcode83 Line 83: // tripple with the boilerplate. This may ...
11 years, 10 months ago (2009-02-24 11:21:08 UTC) #2
Mads Ager (chromium)
11 years, 10 months ago (2009-02-24 13:13:22 UTC) #3
On 2009/02/24 11:21:08, Kasper Lund wrote:
> LGTM.
> 
> http://codereview.chromium.org/28027/diff/25/26
> File src/compilation-cache.h (right):
> 
> http://codereview.chromium.org/28027/diff/25/26#newcode83
> Line 83: // tripple with the boilerplate. This may overwrite an existing
> tripple -> triple

Done.

> http://codereview.chromium.org/28027/diff/25/27
> File src/objects.cc (right):
> 
> http://codereview.chromium.org/28027/diff/25/27#newcode5955
> Line 5955: hash ^= String::cast(script->source())->Hash();
> It's not clear that this is a great way of mixing the bits.

As we discussed, there is no reason to use the source end position as part of
the hash.  I now xor the string hash codes and add the start position to get the
final hash value.

Powered by Google App Engine
This is Rietveld 408576698