I adapted the changes to the other backends. Seems to work correctly, although
we currently don't see much of a performance improvement.



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

http://codereview.chromium.org/6534022/diff/1/src/ia32/lithium-codegen-ia32.cc#newcode141
src/ia32/lithium-codegen-ia32.cc:141: int heap_slots =
scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS;
On 2011/02/18 10:23:49, Vyacheslav Egorov wrote:
Drive by question: this code is basically shared with full-codegen
(except for
safepoint).

Can we avoid code duplication?

According to Kevin, there unfortunately is no good place to put this
code such that it can be shared. Nor is there a nice way to factor out
the (minor) differences.

http://codereview.chromium.org/6534022/diff/1/src/ia32/lithium-codegen-ia32.cc#newcode148
src/ia32/lithium-codegen-ia32.cc:148: __ CallStub(&stub);
On 2011/02/17 15:49:07, Mads Ager wrote:
Is there a reason for not using CallCode here which would deal with
the
safepoint?

Yes: that function needs an explicit LInstruction, which we don't have
here.

http://codereview.chromium.org/6534022/diff/1/src/ia32/lithium-codegen-ia32.cc#newcode150
src/ia32/lithium-codegen-ia32.cc:150: __
CallRuntime(Runtime::kNewContext, 1);
On 2011/02/17 15:49:07, Mads Ager wrote:
Ditto, is there a reason for not using CallRuntime here which would
deal with
the safepoint?

Same here.

http://codereview.chromium.org/6534022/diff/1/src/ia32/lithium-codegen-ia32.cc#newcode152
src/ia32/lithium-codegen-ia32.cc:152:
safepoints_.DefineSafepoint(masm(), Safepoint::kSimple, 0,
On 2011/02/17 15:49:07, Mads Ager wrote:
If you cannot use the function above, could you use the
RecordSafepoint function
here?

Same problem, we'd need an LPointerMap to use that function.

http://codereview.chromium.org/6534022/diff/1/src/ia32/lithium-codegen-ia32.cc#newcode171
src/ia32/lithium-codegen-ia32.cc:171: // registers, so we have use a
third register to avoid
On 2011/02/17 15:49:07, Mads Ager wrote:
we have use -> we have to use

Done.

http://codereview.chromium.org/6534022/

--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev

Reply via email to