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

Issue 2280007: Extend CallIC to support non-constant names.... (Closed)

Created:
10 years, 7 months ago by Vladislav Kaznacheev
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

Extend CallIC to support non-constant names. This speeds up constructs like this: var zz='replace'; '123'[zz]('3','4'); Committed: http://code.google.com/p/v8/source/detail?r=4804

Patch Set 1 #

Total comments: 19

Patch Set 2 : '' #

Total comments: 23

Patch Set 3 : '' #

Patch Set 4 : '' #

Total comments: 20

Patch Set 5 : '' #

Patch Set 6 : '' #

Total comments: 34

Patch Set 7 : '' #

Patch Set 8 : '' #

Patch Set 9 : '' #

Total comments: 8

Patch Set 10 : '' #

Total comments: 2

Patch Set 11 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1017 lines, -229 lines) Patch
M src/arm/codegen-arm.h View 1 chunk +2 lines, -0 lines 0 comments Download
M src/arm/ic-arm.cc View 1 2 3 4 1 chunk +15 lines, -0 lines 0 comments Download
M src/arm/stub-cache-arm.cc View 7 chunks +12 lines, -12 lines 0 comments Download
M src/codegen.cc View 1 2 3 4 1 chunk +19 lines, -1 line 0 comments Download
M src/debug.cc View 1 2 3 4 4 chunks +11 lines, -8 lines 0 comments Download
M src/disassembler.cc View 4 1 chunk +1 line, -1 line 0 comments Download
M src/full-codegen.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M src/ia32/codegen-ia32.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M src/ia32/codegen-ia32.cc View 1 2 3 4 1 chunk +21 lines, -8 lines 0 comments Download
M src/ia32/full-codegen-ia32.cc View 1 2 3 4 2 chunks +37 lines, -20 lines 0 comments Download
M src/ia32/ic-ia32.cc View 1 2 3 4 5 6 10 chunks +123 lines, -32 lines 0 comments Download
M src/ia32/stub-cache-ia32.cc View 1 2 3 4 19 chunks +39 lines, -21 lines 0 comments Download
M src/ia32/virtual-frame-ia32.h View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M src/ia32/virtual-frame-ia32.cc View 1 2 3 4 1 chunk +18 lines, -0 lines 0 comments Download
M src/ic.h View 1 2 3 4 4 chunks +40 lines, -13 lines 0 comments Download
M src/ic.cc View 1 2 3 4 5 6 7 8 9 18 chunks +112 lines, -36 lines 0 comments Download
M src/log.h View 5 6 1 chunk +12 lines, -0 lines 0 comments Download
M src/log.cc View 4 1 chunk +4 lines, -0 lines 0 comments Download
M src/objects.h View 1 2 3 4 2 chunks +2 lines, -0 lines 0 comments Download
M src/objects.cc View 4 1 chunk +1 line, -0 lines 0 comments Download
M src/objects-inl.h View 1 2 3 4 2 chunks +3 lines, -2 lines 0 comments Download
M src/spaces.cc View 4 1 chunk +1 line, -0 lines 0 comments Download
M src/stub-cache.h View 1 2 3 4 9 chunks +36 lines, -14 lines 0 comments Download
M src/stub-cache.cc View 1 2 3 4 5 6 27 chunks +108 lines, -47 lines 0 comments Download
M src/x64/codegen-x64.h View 1 chunk +2 lines, -0 lines 0 comments Download
M src/x64/ic-x64.cc View 1 2 3 4 1 chunk +15 lines, -0 lines 0 comments Download
M src/x64/stub-cache-x64.cc View 7 chunks +12 lines, -12 lines 0 comments Download
M test/cctest/test-api.cc View 5 6 7 8 9 10 1 chunk +157 lines, -0 lines 0 comments Download
M test/cctest/test-debug.cc View 1 chunk +3 lines, -2 lines 0 comments Download
A test/mjsunit/keyed-call-ic.js View 5 6 7 8 9 1 chunk +205 lines, -0 lines 0 comments Download

Messages

Total messages: 19 (0 generated)
Vladislav Kaznacheev
10 years, 7 months ago (2010-05-27 08:46:24 UTC) #1
antonm
First pass. I overall like the approach, but think that we need Mads' blessing anyway. ...
10 years, 7 months ago (2010-05-27 11:04:52 UTC) #2
antonm
And I would love to see tons of tests :) http://codereview.chromium.org/2280007/diff/1/20 File src/arm/ic-arm.cc (right): http://codereview.chromium.org/2280007/diff/1/20#newcode293 ...
10 years, 7 months ago (2010-05-27 11:19:36 UTC) #3
Vladislav Kaznacheev
I forgot to add that this change is for ia32 only. ARM and x64 changes ...
10 years, 7 months ago (2010-05-27 12:06:57 UTC) #4
Mads Ager (chromium)
First high-level comments without really reading much of the code: 1. Doesn't this mean that ...
10 years, 7 months ago (2010-05-27 12:07:46 UTC) #5
Vladislav Kaznacheev
I have extended the megamorphic case to handle non-string keys. Now it starts with looking ...
10 years, 6 months ago (2010-05-31 10:04:53 UTC) #6
antonm
That looks mostly LGTM. But I really would like to see tons of tests for ...
10 years, 6 months ago (2010-05-31 13:05:50 UTC) #7
Mads Ager (chromium)
This is getting there. http://codereview.chromium.org/2280007/diff/20001/21011 File src/ia32/ic-ia32.cc (right): http://codereview.chromium.org/2280007/diff/20001/21011#newcode1116 src/ia32/ic-ia32.cc:1116: CallIC::GenerateNormal(masm, argc, call_mode, false); Normal ...
10 years, 6 months ago (2010-05-31 13:14:08 UTC) #8
Vladislav Kaznacheev
I have completely removed CallModeFlag and introduced KeyedCallIC. Reusing generating functions in ic-ia32.cc in a ...
10 years, 6 months ago (2010-06-01 11:26:05 UTC) #9
Mads Ager (chromium)
This patch is getting very close now. Make sure that there are tests and address ...
10 years, 6 months ago (2010-06-01 12:59:00 UTC) #10
Vladislav Kaznacheev
I have responded to all comments and added tests. http://codereview.chromium.org/2280007/diff/56001/57014 File src/codegen.cc (right): http://codereview.chromium.org/2280007/diff/56001/57014#newcode264 src/codegen.cc:264: ...
10 years, 6 months ago (2010-06-03 15:00:03 UTC) #11
antonm
http://codereview.chromium.org/2280007/diff/72002/86010 File src/ia32/ic-ia32.cc (right): http://codereview.chromium.org/2280007/diff/72002/86010#newcode1080 src/ia32/ic-ia32.cc:1080: __ CmpInstanceType(ebx, FIRST_NONSTRING_TYPE); I believe it was a bug ...
10 years, 6 months ago (2010-06-03 16:18:06 UTC) #12
Vladislav Kaznacheev
Covered all Anton's comments except the idea about api tests (need to discuss) http://codereview.chromium.org/2280007/diff/72002/86010 File ...
10 years, 6 months ago (2010-06-04 07:56:25 UTC) #13
Mads Ager (chromium)
LGTM when Anton is happy with the tests. :) Could you upload a new version ...
10 years, 6 months ago (2010-06-04 09:22:17 UTC) #14
Vladislav Kaznacheev
Anton, please take a look at the two new tests in test-api.cc. http://codereview.chromium.org/2280007/diff/72002/86010 File src/ia32/ic-ia32.cc ...
10 years, 6 months ago (2010-06-04 10:04:45 UTC) #15
antonm
LGTM if it passes ARM/x64 tests http://codereview.chromium.org/2280007/diff/134001/119012 File src/ic.cc (right): http://codereview.chromium.org/2280007/diff/134001/119012#newcode605 src/ic.cc:605: } else { ...
10 years, 6 months ago (2010-06-04 10:29:34 UTC) #16
Vladislav Kaznacheev
All done. Will check for perf regressions again and submit. http://codereview.chromium.org/2280007/diff/134001/119012 File src/ic.cc (right): http://codereview.chromium.org/2280007/diff/134001/119012#newcode605 ...
10 years, 6 months ago (2010-06-04 11:11:31 UTC) #17
antonm
Still lgtm http://codereview.chromium.org/2280007/diff/144001/145029 File test/cctest/test-api.cc (right): http://codereview.chromium.org/2280007/diff/144001/145029#newcode7210 test/cctest/test-api.cc:7210: CHECK_EQ(42*5+40*5, context->Global()->Get(v8_str("result"))->Int32Value()); nit: spaces around + (here ...
10 years, 6 months ago (2010-06-04 11:19:02 UTC) #18
Vladislav Kaznacheev
10 years, 6 months ago (2010-06-09 12:56:36 UTC) #19
http://codereview.chromium.org/2280007/diff/144001/145029
File test/cctest/test-api.cc (right):

http://codereview.chromium.org/2280007/diff/144001/145029#newcode7210
test/cctest/test-api.cc:7210: CHECK_EQ(42*5+40*5,
context->Global()->Get(v8_str("result"))->Int32Value());
On 2010/06/04 11:19:02, antonm wrote:
> nit: spaces around + (here and below)

Done.

Powered by Google App Engine
This is Rietveld 408576698