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

Issue 2714173002: Remove SMI length check from Builtins::Generate_ArrayIndexOf (Closed)

Created:
3 years, 10 months ago by vabr (Chromium)
Modified:
3 years, 10 months ago
Reviewers:
Benedikt Meurer, caitp
CC:
v8-reviews_googlegroups.com
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Remove SMI length check from Builtins::Generate_ArrayIndexOf Currently, Generate_ArrayIndexOf handles the hypothetical case of an array with a fast ElementsKind and non-SMI length. This should not happen (and is checked against in JSArray::JSArrayVerify of objects_debug.cc). Therefore this CL replaces that handling with a CSA_ASSERT that the length is indeed SMI. The CL also simplifies loading of the (SMI) length on 64 bit architectures by using LoadAndUntagObjectField instead of LoadObjectField+SmiToWord. The CL does not add new tests, because test/mjsunit/array-length.js should cover this already. BUG=v8:5985 Review-Url: https://codereview.chromium.org/2714173002 Cr-Commit-Position: refs/heads/master@{#43431} Committed: https://chromium.googlesource.com/v8/v8/+/2a7957b957feb53a073d356a00b0fae5561e1625

Patch Set 1 #

Patch Set 2 : Fix comments #

Total comments: 4

Patch Set 3 : Assert on untagged #

Patch Set 4 : No 'ToWord32' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -4 lines) Patch
M src/builtins/builtins-array.cc View 1 2 3 1 chunk +6 lines, -4 lines 0 comments Download

Messages

Total messages: 31 (20 generated)
vabr (Chromium)
Hi Benedikt, Could you please check that I'm not doing something stupid in how I ...
3 years, 10 months ago (2017-02-24 14:12:55 UTC) #8
caitp
https://codereview.chromium.org/2714173002/diff/20001/src/builtins/builtins-array.cc File src/builtins/builtins-array.cc (right): https://codereview.chromium.org/2714173002/diff/20001/src/builtins/builtins-array.cc#newcode2027 src/builtins/builtins-array.cc:2027: CSA_ASSERT(&assembler, assembler.TaggedIsSmi(len)); You're doing a LoadAndUntagToWord32ObjectField, which untags the ...
3 years, 10 months ago (2017-02-24 16:09:16 UTC) #10
caitp
https://codereview.chromium.org/2714173002/diff/20001/src/builtins/builtins-array.cc File src/builtins/builtins-array.cc (right): https://codereview.chromium.org/2714173002/diff/20001/src/builtins/builtins-array.cc#newcode2027 src/builtins/builtins-array.cc:2027: CSA_ASSERT(&assembler, assembler.TaggedIsSmi(len)); On 2017/02/24 16:09:16, caitp wrote: > You're ...
3 years, 10 months ago (2017-02-24 16:12:42 UTC) #11
Benedikt Meurer
https://codereview.chromium.org/2714173002/diff/20001/src/builtins/builtins-array.cc File src/builtins/builtins-array.cc (right): https://codereview.chromium.org/2714173002/diff/20001/src/builtins/builtins-array.cc#newcode2027 src/builtins/builtins-array.cc:2027: CSA_ASSERT(&assembler, assembler.TaggedIsSmi(len)); > There may not be any point ...
3 years, 10 months ago (2017-02-24 17:50:06 UTC) #12
caitp
https://codereview.chromium.org/2714173002/diff/20001/src/builtins/builtins-array.cc File src/builtins/builtins-array.cc (right): https://codereview.chromium.org/2714173002/diff/20001/src/builtins/builtins-array.cc#newcode2027 src/builtins/builtins-array.cc:2027: CSA_ASSERT(&assembler, assembler.TaggedIsSmi(len)); On 2017/02/24 17:50:06, Benedikt Meurer wrote: > ...
3 years, 10 months ago (2017-02-24 18:19:05 UTC) #13
Benedikt Meurer
On 2017/02/24 18:19:05, caitp wrote: > https://codereview.chromium.org/2714173002/diff/20001/src/builtins/builtins-array.cc > File src/builtins/builtins-array.cc (right): > > https://codereview.chromium.org/2714173002/diff/20001/src/builtins/builtins-array.cc#newcode2027 > ...
3 years, 10 months ago (2017-02-24 18:41:21 UTC) #14
vabr (Chromium)
Hi caitp@ and Benedikt! First of all: thank you, caitp@, for your help here and ...
3 years, 10 months ago (2017-02-25 17:50:34 UTC) #24
Benedikt Meurer
Perfect, LGTM. For the CSA verification, you need to set the GN flag v8_enable_verify_csa to ...
3 years, 10 months ago (2017-02-25 17:55:29 UTC) #25
vabr (Chromium)
On 2017/02/25 17:55:29, Benedikt Meurer wrote: > Perfect, LGTM. > > For the CSA verification, ...
3 years, 10 months ago (2017-02-25 18:02:40 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2714173002/60001
3 years, 10 months ago (2017-02-25 18:02:54 UTC) #28
commit-bot: I haz the power
3 years, 10 months ago (2017-02-25 18:04:38 UTC) #31
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://chromium.googlesource.com/v8/v8/+/2a7957b957feb53a073d356a00b0fae5561...

Powered by Google App Engine
This is Rietveld 408576698