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

Issue 7227010: Create and use shared stub for for DictionaryValue-based elements. (Closed)

Created:
9 years, 5 months ago by danno
Modified:
9 years, 5 months ago
Reviewers:
Jakob Kummerow
CC:
v8-dev
Visibility:
Public.

Description

Unify handling of element IC stubs. In the process, add shared stubs for DictionaryValue lookups that are handled in the same way as fast elements and external array elements. Includes code for MIPS, which compiles and run polymorph-arrays.js successfully. R=jkummerow@chromium.org BUG=none TEST=test/mjsunit/polymorph-arrays.js Committed: http://code.google.com/p/v8/source/detail?r=8579

Patch Set 1 #

Patch Set 2 : remove include #

Patch Set 3 : remove unrelated changes #

Total comments: 16

Patch Set 4 : review feedback #

Patch Set 5 : fix arm bugs #

Patch Set 6 : more arm fixes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+971 lines, -575 lines) Patch
M src/arm/ic-arm.cc View 3 chunks +2 lines, -97 lines 0 comments Download
M src/arm/macro-assembler-arm.h View 1 chunk +10 lines, -0 lines 0 comments Download
M src/arm/macro-assembler-arm.cc View 1 chunk +94 lines, -0 lines 0 comments Download
M src/arm/stub-cache-arm.cc View 1 2 3 4 5 3 chunks +53 lines, -2 lines 0 comments Download
M src/code-stubs.h View 1 2 3 2 chunks +27 lines, -54 lines 0 comments Download
M src/code-stubs.cc View 1 2 3 1 chunk +52 lines, -14 lines 0 comments Download
M src/ia32/ic-ia32.cc View 3 chunks +9 lines, -109 lines 0 comments Download
M src/ia32/macro-assembler-ia32.h View 1 chunk +9 lines, -0 lines 0 comments Download
M src/ia32/macro-assembler-ia32.cc View 1 1 chunk +98 lines, -0 lines 0 comments Download
M src/ia32/stub-cache-ia32.cc View 4 chunks +66 lines, -3 lines 0 comments Download
M src/ic.h View 1 2 3 4 chunks +7 lines, -14 lines 0 comments Download
M src/ic.cc View 1 2 3 5 chunks +16 lines, -25 lines 0 comments Download
M src/mips/ic-mips.cc View 3 chunks +2 lines, -111 lines 0 comments Download
M src/mips/macro-assembler-mips.h View 1 chunk +10 lines, -0 lines 0 comments Download
M src/mips/macro-assembler-mips.cc View 1 2 3 1 chunk +108 lines, -0 lines 0 comments Download
M src/mips/stub-cache-mips.cc View 1 2 3 3 chunks +54 lines, -2 lines 0 comments Download
M src/stub-cache.h View 1 2 3 2 chunks +4 lines, -4 lines 0 comments Download
M src/stub-cache.cc View 2 chunks +3 lines, -32 lines 0 comments Download
M src/x64/ic-x64.cc View 3 chunks +2 lines, -106 lines 0 comments Download
M src/x64/macro-assembler-x64.h View 1 chunk +9 lines, -0 lines 0 comments Download
M src/x64/macro-assembler-x64.cc View 1 chunk +103 lines, -0 lines 0 comments Download
M src/x64/stub-cache-x64.cc View 3 chunks +51 lines, -2 lines 0 comments Download
A test/mjsunit/polymorph-arrays.js View 1 2 3 1 chunk +182 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
danno
PTAL. Reviewer guidance: Start in code-stubs.h/.cc, where you will see that the different code stub ...
9 years, 5 months ago (2011-07-06 16:30:01 UTC) #1
Jakob Kummerow
LGTM with a couple of nits. I like this change! http://codereview.chromium.org/7227010/diff/4001/src/code-stubs.cc File src/code-stubs.cc (right): http://codereview.chromium.org/7227010/diff/4001/src/code-stubs.cc#newcode249 ...
9 years, 5 months ago (2011-07-07 13:55:38 UTC) #2
danno
9 years, 5 months ago (2011-07-08 11:00:24 UTC) #3
Committed

http://codereview.chromium.org/7227010/diff/4001/src/code-stubs.cc
File src/code-stubs.cc (right):

http://codereview.chromium.org/7227010/diff/4001/src/code-stubs.cc#newcode249
src/code-stubs.cc:249: case JSObject::FAST_ELEMENTS:
On 2011/07/07 13:55:38, jkummerow wrote:
> nit: indent "case" lines inside "switch" statements.

Done.

http://codereview.chromium.org/7227010/diff/4001/src/code-stubs.cc#newcode278
src/code-stubs.cc:278: case JSObject::FAST_ELEMENTS:
On 2011/07/07 13:55:38, jkummerow wrote:
> Same indentation nit here.

Done.

http://codereview.chromium.org/7227010/diff/4001/src/code-stubs.h
File src/code-stubs.h (right):

http://codereview.chromium.org/7227010/diff/4001/src/code-stubs.h#newcode953
src/code-stubs.h:953: explicit KeyedStoreElementStub(bool is_js_array,
On 2011/07/07 13:55:38, jkummerow wrote:
> "explicit" isn't needed here.

Done.

http://codereview.chromium.org/7227010/diff/4001/src/ic.cc
File src/ic.cc (right):

http://codereview.chromium.org/7227010/diff/4001/src/ic.cc#newcode1693
src/ic.cc:1693: Code* generic_stub) {
On 2011/07/07 13:55:38, jkummerow wrote:
> I think you no longer need |generic_stub|.

Done.

http://codereview.chromium.org/7227010/diff/4001/src/stub-cache.h
File src/stub-cache.h (right):

http://codereview.chromium.org/7227010/diff/4001/src/stub-cache.h#newcode665
src/stub-cache.h:665: static void GenerateLoadDictionaryElement(MacroAssembler*
masmx);
On 2011/07/07 13:55:38, jkummerow wrote:
> x?

Done.

http://codereview.chromium.org/7227010/diff/4001/test/mjsunit/polymorph-array...
File test/mjsunit/polymorph-arrays.js (right):

http://codereview.chromium.org/7227010/diff/4001/test/mjsunit/polymorph-array...
test/mjsunit/polymorph-arrays.js:29: // Flags: --allow-natives-syntax
--expose-gc
On 2011/07/07 13:55:38, jkummerow wrote:
> AFAICS you're not calling GC anywhere, so the first "// Flags:" line should be
> enough.

Done.

http://codereview.chromium.org/7227010/diff/4001/test/mjsunit/polymorph-array...
test/mjsunit/polymorph-arrays.js:80: assertEquals(1, load(object_array, 1));
On 2011/07/07 13:55:38, jkummerow wrote:
> Since exactly this assertion is performed inside
> make_polymorphic_load_function() as well, I think it's unnecessary to do it
> again here. The same is true for the next few lines, so I guess this whole
> paragraph could be removed without loss of test coverage. But I don't feel
> strongly about this, feel free to leave it as is if you prefer the
explicitness
> of it.

Done.

http://codereview.chromium.org/7227010/diff/4001/test/mjsunit/polymorph-array...
test/mjsunit/polymorph-arrays.js:108: assertEquals(undefined, load(js_array, new
Object()));
On 2011/07/07 13:55:38, jkummerow wrote:
> Duplicate line.

Done.

Powered by Google App Engine
This is Rietveld 408576698