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

Issue 8305001: Introduce HTransitionElementsKind instruction. (Closed)

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

Description

Introduce HTransitionElementsKind instruction. TEST=mjsunit/elements-kind Committed: http://code.google.com/p/v8/source/detail?r=9702

Patch Set 1 #

Total comments: 15

Patch Set 2 : addressed comments; ported to x64 and ARM #

Total comments: 8

Patch Set 3 : nits fixed #

Unified diffs Side-by-side diffs Delta from patch set Stats (+664 lines, -80 lines) Patch
M src/arm/ic-arm.cc View 1 1 chunk +25 lines, -0 lines 0 comments Download
M src/arm/lithium-arm.h View 1 2 chunks +25 lines, -0 lines 0 comments Download
M src/arm/lithium-arm.cc View 1 2 chunks +26 lines, -0 lines 0 comments Download
M src/arm/lithium-codegen-arm.cc View 1 1 chunk +42 lines, -0 lines 0 comments Download
M src/arm/stub-cache-arm.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M src/builtins.h View 1 chunk +4 lines, -0 lines 0 comments Download
M src/builtins.cc View 1 chunk +8 lines, -0 lines 0 comments Download
M src/handles.h View 1 chunk +3 lines, -0 lines 0 comments Download
M src/handles.cc View 1 chunk +8 lines, -0 lines 0 comments Download
M src/hydrogen.cc View 1 1 chunk +33 lines, -5 lines 0 comments Download
M src/hydrogen-instructions.h View 2 chunks +39 lines, -0 lines 0 comments Download
M src/hydrogen-instructions.cc View 1 chunk +6 lines, -0 lines 0 comments Download
M src/ia32/ic-ia32.cc View 1 1 chunk +31 lines, -0 lines 0 comments Download
M src/ia32/lithium-codegen-ia32.cc View 1 1 chunk +42 lines, -0 lines 0 comments Download
M src/ia32/lithium-ia32.h View 1 2 chunks +25 lines, -0 lines 0 comments Download
M src/ia32/lithium-ia32.cc View 1 2 chunks +27 lines, -0 lines 0 comments Download
M src/ic.h View 1 chunk +2 lines, -0 lines 0 comments Download
M src/ic.cc View 2 chunks +1 line, -44 lines 0 comments Download
M src/objects.h View 1 2 2 chunks +10 lines, -0 lines 0 comments Download
M src/objects.cc View 1 2 2 chunks +78 lines, -0 lines 0 comments Download
M src/runtime.h View 1 chunk +2 lines, -0 lines 0 comments Download
M src/runtime.cc View 1 2 1 chunk +33 lines, -0 lines 0 comments Download
M src/x64/ic-x64.cc View 1 1 chunk +31 lines, -0 lines 0 comments Download
M src/x64/lithium-codegen-x64.cc View 1 1 chunk +41 lines, -0 lines 0 comments Download
M src/x64/lithium-x64.h View 1 2 chunks +25 lines, -0 lines 0 comments Download
M src/x64/lithium-x64.cc View 1 2 chunks +27 lines, -0 lines 0 comments Download
M test/mjsunit/elements-kind.js View 2 chunks +69 lines, -30 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Jakob Kummerow
PTAL. Guidance: hydrogen.cc, hydrogen-instructions.{h,cc}, lithium[-codegen]-ia32.{h,cc}: The actual new instruction and its use. runtime.{h,cc}, handles.{h,cc}, objects.{h,cc}: ...
9 years, 2 months ago (2011-10-14 17:50:42 UTC) #1
danno
First round of feedback ia32 stuff applies to other platforms whee appropriate, too. http://codereview.chromium.org/8305001/diff/1/src/ia32/lithium-codegen-ia32.cc File ...
9 years, 2 months ago (2011-10-17 12:36:05 UTC) #2
Jakob Kummerow
http://codereview.chromium.org/8305001/diff/1/src/ia32/lithium-codegen-ia32.cc File src/ia32/lithium-codegen-ia32.cc (right): http://codereview.chromium.org/8305001/diff/1/src/ia32/lithium-codegen-ia32.cc#newcode3318 src/ia32/lithium-codegen-ia32.cc:3318: __ push(object_reg); On 2011/10/17 12:36:05, danno wrote: > You ...
9 years, 2 months ago (2011-10-18 08:13:09 UTC) #3
danno
LGTM with a few nits. http://codereview.chromium.org/8305001/diff/1/src/ia32/lithium-codegen-ia32.cc File src/ia32/lithium-codegen-ia32.cc (right): http://codereview.chromium.org/8305001/diff/1/src/ia32/lithium-codegen-ia32.cc#newcode3318 src/ia32/lithium-codegen-ia32.cc:3318: __ push(object_reg); On 2011/10/17 ...
9 years, 2 months ago (2011-10-18 08:57:03 UTC) #4
Jakob Kummerow
9 years, 2 months ago (2011-10-18 12:05:15 UTC) #5
Nits fixed.
Landing this is on hold until Yang's CL with generated code for transitions on
ARM has landed, because tests depend on that.

http://codereview.chromium.org/8305001/diff/6001/src/objects.cc
File src/objects.cc (right):

http://codereview.chromium.org/8305001/diff/6001/src/objects.cc#newcode2089
src/objects.cc:2089: bool Contains(MapList* maps_list, Map* map) {
On 2011/10/18 08:57:03, danno wrote:
> nit: make static, rename to ContainsMap (Contains is too general).  

Done.
(For the record, I liked "Contains". It's a concrete implementation of a general
concept, and if someone defined a "Contains(FooList*, Foo*)" later, the compiler
would know what to do.)

http://codereview.chromium.org/8305001/diff/6001/src/objects.cc#newcode2103
src/objects.cc:2103: if (Contains(candidates, fast_map)) return fast_map;
On 2011/10/18 08:57:03, danno wrote:
> return NULL here?

Done.

http://codereview.chromium.org/8305001/diff/6001/src/objects.cc#newcode9352
src/objects.cc:9352: FixedArray* elms = FixedArray::cast(elements());
On 2011/10/18 08:57:03, danno wrote:
> Change the type to FixedArrayBase*, then you can hoist the capacity/length
> calculatation before the ifs begin.

Done. Good idea!

http://codereview.chromium.org/8305001/diff/6001/src/runtime.cc
File src/runtime.cc (right):

http://codereview.chromium.org/8305001/diff/6001/src/runtime.cc#newcode4581
src/runtime.cc:4581: (from_kind == FAST_DOUBLE_ELEMENTS && to_kind ==
FAST_ELEMENTS)) {
On 2011/10/18 08:57:03, danno wrote:
> Add a predicate IsValidFastElementTransition somewhere appropriate (static on
> map?)

Done.

Powered by Google App Engine
This is Rietveld 408576698