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

Issue 7076: Add a VirtualFrame class to the IA32 code generator. All frame... (Closed)

Created:
12 years, 2 months ago by Kevin Millikin (Chromium)
Modified:
9 years, 7 months ago
Reviewers:
iposva, Kasper Lund
CC:
v8-dev
Visibility:
Public.

Description

Add a VirtualFrame class to the IA32 code generator. All frame accesses (eg, parameters, locals, and the expression stack elements) and mutation (pushes and pops) go through the virtual frame. The frame initially contains no state, and directly emits instructions in the obvious way. It is not currently used for deferred code. Committed: http://code.google.com/p/v8/source/detail?r=489

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+423 lines, -330 lines) Patch
M src/codegen-ia32.h View 8 chunks +63 lines, -27 lines 0 comments Download
M src/codegen-ia32.cc View 132 chunks +360 lines, -303 lines 3 comments Download

Messages

Total messages: 3 (0 generated)
Kevin Millikin (Chromium)
12 years, 2 months ago (2008-10-10 12:14:12 UTC) #1
Kasper Lund
LGTM.
12 years, 2 months ago (2008-10-10 12:19:11 UTC) #2
iposva
12 years, 2 months ago (2008-10-10 12:53:02 UTC) #3
I am sure there are more situations where a Pop() with no target would be
useful, I just found a couple that just jumped out at me.

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

http://codereview.chromium.org/7076/diff/1/3#newcode304
Line 304: frame_->Pop(eax);  // Value is no longer needed.
If the value is really no longer needed the there should also be a Pop()
operation that takes no target register and just pops the value from the virtual
frame without causing memory traffic. In the current implementation this could
translate to add(sp, sp, 4).

I understand that Pop() is equivalent to Drop(1), but it is sort of more
readable in these situations.

http://codereview.chromium.org/7076/diff/1/3#newcode1394
Line 1394: frame_->Pop(eax);  // Pop(no_reg);
Another potential use of Pop()...

http://codereview.chromium.org/7076/diff/1/3#newcode1405
Line 1405: frame_->Pop(eax);  // remove the lingering expression result from the
top of stack
And another potential use of Pop()...

Powered by Google App Engine
This is Rietveld 408576698