chakra-core / chakra-core/ChakraCore

Optimize OP_LdCustomSpreadIteratorList for arguments object

Open
#1,230 10 comments 0 reactions 0 assignees View on GitHub
good first issue help wanted Performance Proposal Suggestion
Dominant language
JavaScript
Stars
9.3k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

I was looking into the [code](https://github.com/Microsoft/ChakraCore/blob/master/lib/Runtime/Language/JavascriptOperators.cpp#L1405) of OP_LdCustomSpreadIteratorList and noticed that we optimize it by not creating SpreadArgument if parameter passed to OP_LdCustomSpreadIteratorList does not have user defined iterator. We do this check only for JavascriptArray and TypedArrayBase and we can expand it for ArgumentsObject as well. As per spec, both [unmapped](https://tc39.github.io/ecma262/#sec-createunmappedargumentsobject) and [mapped](https://tc39.github.io/ecma262/#sec-createmappedargumentsobject) argument objects has default `@@iterator` set to `Array.proto.values`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.