Lasse, as it looks like you're fine with overall approach, starting to port to
other platforms.

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

http://codereview.chromium.org/1695007/diff/1/2#newcode6541
src/ia32/codegen-ia32.cc:6541:
On 2010/04/23 07:35:12, Lasse Reichstein wrote:
Could these constants be put into the JSFunctionResultCache class.

Sure

http://codereview.chromium.org/1695007/diff/1/2#newcode6545
src/ia32/codegen-ia32.cc:6545: // dst_ keeps the finger key as smi as
well.
On 2010/04/23 07:35:12, Lasse Reichstein wrote:
Could you put a comment here saying what registers/variables holds
which values
(and whether they are tagged or not)?

Sure.

http://codereview.chromium.org/1695007/diff/1/2#newcode6556
src/ia32/codegen-ia32.cc:6556: __ cmp(key_, FieldOperand(cache_,
On 2010/04/23 07:35:12, Lasse Reichstein wrote:
Add a STATIC_ASSERT(kSmiTagSize == 1 && kSmiTag == 0);
to ensure that using times_half_pointer_size does the right thing (so
that if it
ever stops being true, we will know to look here for code that needs
changing).

Done.

http://codereview.chromium.org/1695007/diff/1/2#newcode6606
src/ia32/codegen-ia32.cc:6606: // slow path this optimization would
hardly matter much.
On 2010/04/23 07:35:12, Lasse Reichstein wrote:
What do you mean by "slow path".

I mean that if we need to call factory function, those additional loads
would hardly matter.  Turning slow path into cache miss.

http://codereview.chromium.org/1695007/diff/1/2#newcode6612
src/ia32/codegen-ia32.cc:6612: __ cmp(ebx, FieldOperand(ecx,
kFingerOffset));
On 2010/04/23 07:35:12, Lasse Reichstein wrote:
Of you have a register for it, you might want to read the finger
offset here,
instead of comparing to it here and reading it again two instructions
down.

Done and reworked this logic notably overall.  May you have another
look?

http://codereview.chromium.org/1695007/diff/1/2#newcode6625
src/ia32/codegen-ia32.cc:6625: __ add(FieldOperand(ecx,
kCacheSizeOffset), Immediate(2 << 1));
On 2010/04/23 07:35:12, Lasse Reichstein wrote:
use kEntrySizeSmi for constant.

Sorry, missed that.

Also add the constant in a register and write it back instead of using
a
read-modify-write operation.
You seem to have edx free at this point.

Done with lea, is it fine?  Overall, why it's faster?

http://codereview.chromium.org/1695007/show

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to