chakra-core / chakra-core/ChakraCore
Optimize OP_LdCustomSpreadIteratorList for arguments object
- 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
Assessment
This issue has not been assessed yet.