Commit 205bed0
lib: copy arguments object instead of leaking it
Instead of leaking the arguments object by passing it as an
argument to a function, copy it's contents to a new array,
then pass the array. This allows V8 to optimize the function
that contains this code, improving performance.
PR-URL: #4361
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>1 parent 9ebd559 commit 205bed0Copy full SHA for 205bed0
File tree
Expand file treeCollapse file tree
5 files changed
+43
-14
lines changedOpen diff view settings
Filter options
- lib
Expand file treeCollapse file tree
5 files changed
+43
-14
lines changedOpen diff view settings
Collapse file
+10-2Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
608 | 608 | |
609 | 609 | |
610 | 610 | |
611 | | - |
| 611 | + |
| 612 | + |
| 613 | + |
| 614 | + |
| 615 | + |
612 | 616 | |
613 | 617 | |
614 | | - |
| 618 | + |
| 619 | + |
| 620 | + |
| 621 | + |
| 622 | + |
615 | 623 | |
616 | 624 | |
617 | 625 | |
|
Collapse file
+5-1Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
972 | 972 | |
973 | 973 | |
974 | 974 | |
975 | | - |
| 975 | + |
| 976 | + |
| 977 | + |
| 978 | + |
| 979 | + |
976 | 980 | |
977 | 981 | |
978 | 982 | |
|
Collapse file
+14-8Lines changed: 14 additions & 8 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
290 | 290 | |
291 | 291 | |
292 | 292 | |
| 293 | + |
| 294 | + |
| 295 | + |
| 296 | + |
| 297 | + |
| 298 | + |
| 299 | + |
| 300 | + |
| 301 | + |
| 302 | + |
293 | 303 | |
294 | 304 | |
295 | 305 | |
| ||
302 | 312 | |
303 | 313 | |
304 | 314 | |
305 | | - |
306 | | - |
307 | | - |
308 | | - |
309 | | - |
| 315 | + |
310 | 316 | |
311 | 317 | |
312 | 318 | |
| ||
329 | 335 | |
330 | 336 | |
331 | 337 | |
332 | | - |
| 338 | + |
333 | 339 | |
334 | 340 | |
335 | 341 | |
336 | | - |
337 | | - |
| 342 | + |
| 343 | + |
338 | 344 | |
339 | 345 | |
340 | 346 | |
Collapse file
+4-1Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
84 | 84 | |
85 | 85 | |
86 | 86 | |
87 | | - |
| 87 | + |
| 88 | + |
| 89 | + |
| 90 | + |
88 | 91 | |
89 | 92 | |
90 | 93 | |
|
Collapse file
+10-2Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
59 | 59 | |
60 | 60 | |
61 | 61 | |
62 | | - |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | + |
63 | 67 | |
64 | 68 | |
65 | 69 | |
| ||
858 | 862 | |
859 | 863 | |
860 | 864 | |
861 | | - |
| 865 | + |
| 866 | + |
| 867 | + |
| 868 | + |
| 869 | + |
862 | 870 | |
863 | 871 | |
864 | 872 | |
|
0 commit comments