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

Issue 11232: First step toward allowing constants to appear in the virtual frame... (Closed)

Created:
12 years, 1 month ago by Kevin Millikin (Chromium)
Modified:
3 years, 11 months ago
Reviewers:
iposva, William Hesse
CC:
v8-dev
Visibility:
Public.

Description

First step toward allowing constants to appear in the virtual frame without being materialized on the actual frame. Currently constants are materialized almost immediately: as soon as we call the runtime; push any non-constant value on top of them; jump, branch, or bind a jump target; or generate code for any AST node. Committed: http://code.google.com/p/v8/source/detail?r=788

Patch Set 1 #

Patch Set 2 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+292 lines, -113 lines) Patch
M src/codegen-ia32.cc View 77 chunks +90 lines, -55 lines 2 comments Download
M src/jump-target-ia32.cc View 4 chunks +5 lines, -1 line 0 comments Download
M src/virtual-frame-ia32.h View 1 7 chunks +71 lines, -15 lines 7 comments Download
M src/virtual-frame-ia32.cc View 1 6 chunks +126 lines, -42 lines 7 comments Download

Messages

Total messages: 3 (0 generated)
Kevin Millikin (Chromium)
12 years, 1 month ago (2008-11-18 15:23:21 UTC) #1
William Hesse
Looks good to me, but I have some questions. http://codereview.chromium.org/11232/diff/201/13 File src/codegen-ia32.cc (left): http://codereview.chromium.org/11232/diff/201/13#oldcode203 Line ...
12 years, 1 month ago (2008-11-18 16:37:34 UTC) #2
Kevin Millikin (Chromium)
12 years, 1 month ago (2008-11-18 19:12:06 UTC) #3
http://codereview.chromium.org/11232/diff/201/13
File src/codegen-ia32.cc (left):

http://codereview.chromium.org/11232/diff/201/13#oldcode203
Line 203: // Save the arguments object pointer, if any.
On 2008/11/18 16:37:34, William Hesse wrote:
> What is this change?

As far as I can tell, the only reason to save ecx here is because it will be
clobbered by SlotOperand and RecordWrite.  All the gymnastics with saving ecx
will go away as soon as we can support registers in the virtual frame, anyway.

http://codereview.chromium.org/11232/diff/201/10
File src/virtual-frame-ia32.cc (right):

http://codereview.chromium.org/11232/diff/201/10#newcode49
Line 49: frame_pointer_(kIllegalIndex) {
On 2008/11/18 16:37:34, William Hesse wrote:
> In this case, is IllegalIndex actually the accurate value of frame_pointer,
not
> a sign of illegality?
> Perhaps illegalIndex should not be -1, but should be a less
> likely negative value.

We don't know what the frame pointer is until we set it in Enter().

http://codereview.chromium.org/11232/diff/201/10#newcode77
Line 77: ASSERT(stack_pointer_ == elements_.length() - 1);
On 2008/11/18 16:37:34, William Hesse wrote:
> Isn't this too strong a precondition for a useful Adjust()?  Won't you want to
> use Adjust on more complex frames?

I think it's right.  The intent of "Adjust" is that it doesn't generate code but
only fixes up the frame to reflect code already (or about to be) generated.

If the sp is not at the top of the virtual frame when adjust is called, the it's
not safe to have someone else push on the stack.

http://codereview.chromium.org/11232/diff/201/10#newcode109
Line 109: __ mov(Operand(ebp, fp_relative(i)),
Immediate(elements_[i].handle()));
On 2008/11/18 16:37:34, William Hesse wrote:
> Is the splitting into two 16-bit quantities inside mov?

There is no splitting here (yet).  The only constants right now are not from
source code.

http://codereview.chromium.org/11232/diff/201/11
File src/virtual-frame-ia32.h (right):

http://codereview.chromium.org/11232/diff/201/11#newcode52
Line 52: Type type() const { return static_cast<Type>(type_ & ~0x1); }
On 2008/11/18 16:37:34, William Hesse wrote:
> Name the dirty flag mask.  Unless you are also storing SMIs in this word, I
> would use a higher bit for the flag, and store the types in the low bits,
rather
> than using only even type IDs.

OK.

http://codereview.chromium.org/11232/diff/201/11#newcode66
Line 66: Handle<Object> handle() const { return Handle<Object>(data_.handle_); }
On 2008/11/18 16:37:34, William Hesse wrote:
> Put asserts here to assert it is a type that has handle data?

OK.

http://codereview.chromium.org/11232/diff/201/11#newcode254
Line 254: void PrepareCall(int count);
On 2008/11/18 16:37:34, William Hesse wrote:
> PrepareForCall?
> 

OK.

Powered by Google App Engine
This is Rietveld 408576698