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

Issue 2243523002: [builtins] IndexOf/LastIndexOf implementation for typedarrays (Closed)

Created:
4 years, 4 months ago by mattloring
Modified:
4 years, 4 months ago
CC:
v8-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[builtins] IndexOf/LastIndexOf implementation for typedarrays Removes dependence on InnerArrayIndexOf/InnerArrayLastIndexOf and reduces type polution caused by sharing these functions between standard and typed arrays. BUG= Committed: https://crrev.com/b052909c2522857ef14440894523b5ab6defd7ea Cr-Commit-Position: refs/heads/master@{#38637}

Patch Set 1 #

Total comments: 8

Patch Set 2 : Ensure -0 is never returned #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+55 lines, -7 lines) Patch
M src/js/typedarray.js View 1 4 chunks +55 lines, -7 lines 1 comment Download

Messages

Total messages: 26 (16 generated)
mattloring
4 years, 4 months ago (2016-08-11 17:31:29 UTC) #3
Benedikt Meurer
Thanks. LGTM.
4 years, 4 months ago (2016-08-12 03:33:40 UTC) #5
Camillo Bruni
LGTM with nits: see my comments (mostly improvements to your existing code) https://codereview.chromium.org/2243523002/diff/1/src/js/typedarray.js File src/js/typedarray.js ...
4 years, 4 months ago (2016-08-12 09:35:17 UTC) #10
mattloring
I added extra logic to ensure -0 is never returned. Is there a standard way ...
4 years, 4 months ago (2016-08-12 17:52:43 UTC) #11
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/2243523002/20001
4 years, 4 months ago (2016-08-15 16:35:41 UTC) #18
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 4 months ago (2016-08-15 17:01:25 UTC) #20
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/b052909c2522857ef14440894523b5ab6defd7ea Cr-Commit-Position: refs/heads/master@{#38637}
4 years, 4 months ago (2016-08-15 17:01:36 UTC) #22
adamk
I'm curious what motivated this particular change. Is it a pre-requisite for moving TypedArray methods ...
4 years, 4 months ago (2016-08-15 20:38:54 UTC) #24
mattloring
On 2016/08/15 20:38:54, adamk wrote: > I'm curious what motivated this particular change. Is it ...
4 years, 4 months ago (2016-08-15 22:50:13 UTC) #25
adamk
4 years, 4 months ago (2016-08-15 23:36:13 UTC) #26
Message was sent while issue was closed.
On 2016/08/15 22:50:13, mattloring wrote:
> On 2016/08/15 20:38:54, adamk wrote:
> > I'm curious what motivated this particular change. Is it a pre-requisite for
> > moving TypedArray methods to C++?
> > 
> > Array methods are already designed (spec-wise) to be type polluted due to
> being
> > applicable to any array-like receiver, so even though this reduces the type
> > pollution in this specific case it doesn't eliminate the possibility of type
> > pollution in general.
> > 
> 
> This was a prerequisite refactor to making Array.prototype.indexOf a TF
builtin
> which
> is being done here: https://codereview.chromium.org/2232063002. The type
> pollution was
> raised as a concern during code review here:
> https://codereview.chromium.org/2232063002/patch/1/10006.

Ah, thanks for the context. 

> > https://codereview.chromium.org/2243523002/diff/20001/src/js/typedarray.js
> > File src/js/typedarray.js (left):
> > 
> >
>
https://codereview.chromium.org/2243523002/diff/20001/src/js/typedarray.js#ol...
> > src/js/typedarray.js:82: InnerArrayIndexOf = from.InnerArrayIndexOf;
> > I suspect these were the last importers of these functions, so array.js
should
> > probably be refactored to stop exporting them (and merge them into their
> single
> > caller)
> 
> I can take a look and, if they are no longer imported, remove them.

Thanks, though it looks like your other CL just deletes it anyway? Ok to wait
for that to land if it's coming soon.

Powered by Google App Engine
This is Rietveld 408576698