Uh oh!
There was an error while loading. Please reload this page.
lib: use more primordials - #35838
Conversation
nodejs-github-bot
commented
Oct 27, 2020
Review requested:
|
nodejs-github-bot
commented
Oct 27, 2020
ExE-Boss
left a comment
There was a problem hiding this comment.
Instead of FunctionPrototypeApply, this should use ReflectApply, which doesn’t go through the uncurryThis closure:
node/lib/internal/per_context/primordials.js
Lines 22 to 24 in 802c98d
Uh oh!
There was an error while loading. Please reload this page.
3b56f87 to
57c325aCompare
This comment has been minimized.
This comment has been minimized.
nodejs-github-bot
commented
Oct 29, 2020
aduh95
left a comment
There was a problem hiding this comment.
I just realized there are some unnecessary whitespace changes.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Trott
commented
Oct 30, 2020
Needs a rebase. |
7ec460c to
8c2c47aCompare
This comment has been minimized.
This comment has been minimized.
8c2c47a to
a3d70cdCompareThis replaces all Function.prototype.apply, Function.prototype.bind, Function.prototype.call to their primordials alter ego.
a3d70cd to
882e66eCompareaduh95
commented
Nov 7, 2020
I'm going to split it into smaller PRs, that's too many files to review for a single PR of that kind. |
This replaces all instances of
Function.prototype.apply,Function.prototype.bind, andFunction.prototype.callto their primordials alter ego.I've used search and replace to make this PR, I've excluded changes in files that are already covered by other PRs (#35885, #35875, #35734). No test is being affected by this PR.
ReflectApplyis used to replaceFunction.prototype.applybecause it has less overhead (see #35838 (review)). There is an argument to be made that allFunction.prototype.callcalls could also be replaced byReflectApply, but that's not done in this PR.Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes