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

Issue 650028: Improve stores to global variables. (Closed)

Created:
10 years, 10 months ago by William Hesse
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

Improve stores to global variables. Committed: http://code.google.com/p/v8/source/detail?r=3921

Patch Set 1 #

Total comments: 9

Patch Set 2 : '' #

Patch Set 3 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+59 lines, -55 lines) Patch
M src/ia32/codegen-ia32.h View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M src/ia32/codegen-ia32.cc View 1 2 11 chunks +28 lines, -16 lines 0 comments Download
M src/ia32/virtual-frame-ia32.h View 1 2 1 chunk +4 lines, -4 lines 0 comments Download
M src/ia32/virtual-frame-ia32.cc View 1 2 1 chunk +24 lines, -33 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
William Hesse
10 years, 10 months ago (2010-02-19 12:43:26 UTC) #1
Kevin Millikin (Chromium)
LGTM after comments are addressed. http://codereview.chromium.org/650028/diff/1/2 File src/ia32/codegen-ia32.cc (right): http://codereview.chromium.org/650028/diff/1/2#newcode692 src/ia32/codegen-ia32.cc:692: // If eax is ...
10 years, 10 months ago (2010-02-19 13:11:20 UTC) #2
William Hesse
10 years, 10 months ago (2010-02-19 14:35:18 UTC) #3
All comments addressed.

http://codereview.chromium.org/650028/diff/1/2
File src/ia32/codegen-ia32.cc (right):

http://codereview.chromium.org/650028/diff/1/2#newcode692
src/ia32/codegen-ia32.cc:692: // If eax is free, the virtual frame will load the
global object directly
On 2010/02/19 13:11:21, Kevin Millikin wrote:
> The frame doesn't really load the global, the code generator does.  The
register
> allocator will prefer eax if it's free.

Done.

http://codereview.chromium.org/650028/diff/1/2#newcode4314
src/ia32/codegen-ia32.cc:4314: // If eax is free, the virtual frame will load
the global object directly
On 2010/02/19 13:11:21, Kevin Millikin wrote:
> Same.  Frame is not involved in selecting a register as long as there are
> registers free.

Done.

http://codereview.chromium.org/650028/diff/1/2#newcode4782
src/ia32/codegen-ia32.cc:4782: LoadGlobal();
On 2010/02/19 13:11:21, Kevin Millikin wrote:
> This doesn't really belong here but down below.

Done.

http://codereview.chromium.org/650028/diff/1/2#newcode4846
src/ia32/codegen-ia32.cc:4846: answer = EmitNamedGlobalStore(name);
On 2010/02/19 13:11:21, Kevin Millikin wrote:
> I don't really like the name GlobalStore, because not all global stores go
> through it.  EmitContextualStore?
> 
> It's sort of annoying to have a special case for global variables in the code
> generator just to plumb it all the way down to the virtual frame.
> 
> Maybe it would be better to pass an is_contextual flag to EmitNamedStore,
> analogous to EmitNamedLoad.

Done.  is_contextual flag added to EmitNamedStore, and to Frame::CallStoreIC
that it calls.

Powered by Google App Engine
This is Rietveld 408576698