Babel transpiles default parameter value into code, that could not be optimized in V8:
is transpiled to
with warning "Not optimized: Bad value context for arguments value".
{
findAll(src, accumulatedItems = []) {
// code
}
}
is transpiled to
{
findAll: function(src) {
var t = this, accumulatedItems = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : [];
// code
}
}
with warning "Not optimized: Bad value context for arguments value".
Комментариев нет:
Отправить комментарий