lowering TypedArray/Array#at method

34 views
Skip to first unread message

Gus Caplan

unread,
Jan 23, 2021, 11:01:29 PM1/23/21
to v8-dev
Hi all,

I'm working on adding reductions for the recently added relative indexing methods (String#at, Array#at, TypedArray#at). I've created a lowering for String#at successfully but I'm not sure what to do for Array#at and TypedArray#at. If I understand correctly, they need to handle all the different ElementKinds and ExternalArrayTypes and then emit loads to the underlying fixedarray or buffer based on that, but I'm not quite sure how to go about that. I'd also like to provide a fast path for `Array.prototype.at.call(array-like, index)`, but I'm not sure how to emit the generic property loads from the js call reducer.

Thanks
Reply all
Reply to author
Forward
0 new messages