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

Issue 1695007: Moving more code to lookup an item from the native cache into code generator. (Closed)

Created:
10 years, 8 months ago by antonm
Modified:
9 years, 4 months ago
Reviewers:
Lasse Reichstein
CC:
v8-dev
Visibility:
Public.

Description

Moving more code to lookup an item from the native cache into code generator. To bypass expensive invocation of JS functions from C++ and omit runtime call overhead for searching the cache, more elaborate deferred code is generated. Committed: http://code.google.com/p/v8/source/detail?r=4616

Patch Set 1 #

Total comments: 14

Patch Set 2 : First round of Lasse's comments #

Patch Set 3 : Ported to x64 #

Total comments: 8

Patch Set 4 : Rewritting x64 port to use plain ints instead of smis most of the time plus over Lasse's suggestions #

Patch Set 5 : Adding tests and fixing x64 port #

Patch Set 6 : Minor rework #

Total comments: 4

Patch Set 7 : Next round of Lasse's comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+370 lines, -29 lines) Patch
M src/heap.h View 2 chunks +2 lines, -2 lines 0 comments Download
M src/ia32/codegen-ia32.cc View 1 2 3 4 5 6 2 chunks +113 lines, -14 lines 0 comments Download
M src/objects.h View 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M src/x64/codegen-x64.cc View 3 4 5 6 2 chunks +134 lines, -13 lines 0 comments Download
M test/cctest/test-api.cc View 1 chunk +117 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
antonm
Lasse, may you have a look?
10 years, 8 months ago (2010-04-22 14:59:34 UTC) #1
Lasse Reichstein
LGTM 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: Could these constants be put into the JSFunctionResultCache ...
10 years, 8 months ago (2010-04-23 07:35:12 UTC) #2
antonm
Lasse, as it looks like you're fine with overall approach, starting to port to other ...
10 years, 8 months ago (2010-04-23 10:22:27 UTC) #3
antonm
Lasse, I've ported codgen part to x64. And I am not sure if it's a ...
10 years, 8 months ago (2010-04-26 19:14:18 UTC) #4
Lasse Reichstein
LGTM http://codereview.chromium.org/1695007/diff/1/2 File src/ia32/codegen-ia32.cc (right): http://codereview.chromium.org/1695007/diff/1/2#newcode6625 src/ia32/codegen-ia32.cc:6625: __ add(FieldOperand(ecx, kCacheSizeOffset), Immediate(2 << 1)); It's not ...
10 years, 7 months ago (2010-04-29 08:53:54 UTC) #5
antonm
Lasse, major rework, but now covered by tests. If you have any other ideas what ...
10 years, 7 months ago (2010-05-06 16:37:07 UTC) #6
Lasse Reichstein
http://codereview.chromium.org/1695007/diff/1003/9003 File src/x64/codegen-x64.cc (right): http://codereview.chromium.org/1695007/diff/1003/9003#newcode4294 src/x64/codegen-x64.cc:4294: STATIC_ASSERT(kSmiTagSize == 1); Definitly a bad idea, and not ...
10 years, 7 months ago (2010-05-07 07:08:42 UTC) #7
Lasse Reichstein
LGTM http://codereview.chromium.org/1695007/diff/22001/23004 File src/x64/codegen-x64.cc (right): http://codereview.chromium.org/1695007/diff/22001/23004#newcode4446 src/x64/codegen-x64.cc:4446: return FieldOperand(array, index, times_pointer_size, How about a comment ...
10 years, 7 months ago (2010-05-07 07:32:24 UTC) #8
antonm
10 years, 7 months ago (2010-05-07 11:34:49 UTC) #9
All done, Lasse, thanks a lot for review.

http://codereview.chromium.org/1695007/diff/22001/23004
File src/x64/codegen-x64.cc (right):

http://codereview.chromium.org/1695007/diff/22001/23004#newcode4446
src/x64/codegen-x64.cc:4446: return FieldOperand(array, index,
times_pointer_size,
On 2010/05/07 07:32:24, Lasse Reichstein wrote:
> How about a comment here that explains the expected content of the registers
> (array: FixedArray*, index: int32).
> Maybe even change additional_offset to be number of elements (instead of
> pre-multiplying by kPointerSize at the call site)?

Done.

http://codereview.chromium.org/1695007/diff/22001/23004#newcode4608
src/x64/codegen-x64.cc:4608: __ cmpq(key.reg(), ArrayElement(cache.reg(),
tmp.reg()));
On 2010/05/07 07:32:24, Lasse Reichstein wrote:
> I don't think this makes much difference from using SmiIndex, except for
getting
> to use ArrayElement. I would prefer to keep SmiIndex, since it would stay
> optimal even if the smi representation changes.

Of course.

Powered by Google App Engine
This is Rietveld 408576698