CARVIEW |
Select Language
HTTP/2 301
date: Tue, 22 Jul 2025 17:34:10 GMT
content-type: text/html; charset=utf-8
content-length: 0
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
location: https://github.com/chakra-core/ChakraCore/commit/91e0e91288ecadcfc01a41f2f0c7e878d2f3ee1a
cache-control: no-cache
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: origin-when-cross-origin, strict-origin-when-cross-origin
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
set-cookie: _gh_sess=kJ64PzH%2BS8tcc6ivQ2JuJMsxWxhe1o2ypIFKW2jG4fIFV8zKa3X330PNwKyQoPdhfeziTtrDOzrrYJq8dXHBoHBOrFVTHQW1ZgG%2BYUMq6KFbGVjc%2Ft%2BipyX%2F%2F%2B2bK%2BN6CvNUCbqLn8vqWUsyuL76vNhSpUwZb58ePi0pUHgjzrA217ZwM%2BksnObazhZSbkkt7mb72gfrqfW%2Bs0%2BDfLfr1ltz3lrzR%2FIbzuChQBRtaDiNKDTwmDUQzM5Vnd2aFqPkA22A87jeA9jciG5D0NNC0Q%3D%3D--yeUebzW%2FCN4smB2e--RrmgV11U2W0tHsPTdMcf1A%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.506671047.1753205650; Path=/; Domain=github.com; Expires=Wed, 22 Jul 2026 17:34:10 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Wed, 22 Jul 2026 17:34:10 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: CC56:1455CE:224482:283927:687FCB92
HTTP/2 200
date: Tue, 22 Jul 2025 17:34:12 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
x-repository-download: git clone https://github.com/chakra-core/ChakraCore.git
etag: W/"75dc6094b3e959b70c5175bba53e31d7"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
x-github-request-id: CC56:1455CE:2244CC:283970:687FCB92
Stack Arguments Optimization with presence of Formals. · chakra-core/ChakraCore@91e0e91 · GitHub
Dismiss banner
Copy file name to clipboardExpand all lines: lib/Backend/BackwardPass.cpp
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit 91e0e91
committed
Stack Arguments Optimization with presence of Formals.
Premise:
Whenever there is a use of "arguments" object in a function, we are supposed to create a Heap arguments object on the stack - so that both the formals and arguments element access can access a common memory.
The creation of this "heap arguments" object on the stack is currently optimized(not created) away in the jitted code, when there are no formals present in the function (but not in the presence of formals).
This change enables "heap arguments" object to be optimized away during the presence of formals.
This PR contains the following changes
Dead Store of ArgIns (when the formals are not being used in the body of the function )
PropertyId Array is moved from the Bytecode's auxiliary data to the function body itself.
¿ Layout change of all opcode that currently explicitly uses Property Id Array as one of its source operand.
¿ Byte code cache has been regenerated for Intl and Promise.
¿ Refactoring of all code that reads property id array of formals from auxiliary data.
LdPropId is no more accompanied with LdHeapArguments instruction.
Removal of Heap arguments creation in the jitted code, when the function has formals.
Removal of Scope object creation upon heap arguments optimization.
During javascript stack walking, we no more use the existing heap arguments object on the frame. Instead we create a copy of the heap arguments object and give it to the .caller. This makes us not to worry about other functions changing the formals value, interrupting the stack arguments optimization. -TEST instr at the beginning of the LdElem Fast path is also removed.
Field copy prop is disabled for arguments property (to avoid foo.arguments being field copy-proped)
Functioning of Heap Arguments Optimization with Formals.
We track several Instructions to facilitate this optimization in the forward and backward pass, along with the help from the front end. Parse:
We disable this optimization, when there are any write to formals.
We also disable this optimization, when we have any non-local references inside nested functions, deferred nested functions, and presence of any nested functions.
ForwardPass:
Track Scope object in LdHeapArgs (all versions of this opcode)
Track Formals array in LdSlotArr
Track Formals in LdSlot.
Trace Stack Sym for formals in inlinee.
Insert BailOnStackArgsOutOfActualsRange on LdElemI_A, when optimization is turned on.
DeadStorePass:
We are sure at this point, whether we will be doing the Stack arguments optimization for formals or not.
Insert ArgIns for formals at the beginning of the function.
Replace LdSlot with Ld_A with the tracked stack syms for formals.
Dead store all scope object related instrs (we are sure that only formals use scope object).
Remove BailOnStackArgsOutOfActualsRange, depending on whether the optimization is still turned on or not.
Perf Impact:
This change improves node.js - Specifically acme-benchmark(~16.3%) and tcpSlowPerf (~18.36%).
Speedometer benchmark - gets an overall 12 % improvement (Specifically 30% in react test)
This also has impact in real-world websites.
IE Perf Lab: https://ieperf-web-01/perfresults/Comparison?testRunId=419859&baseRunId=419858&lab=IEPERF&getRelatedRunData=false&priorities=0,1&categories=failures,warnings,improvements,no-change&search=
More than 95% websites show that they get benefited from this optimization [Trace was collected using web crawler].
Other benchmarks look flat.1 parent f0a9fa7 commit 91e0e91Copy full SHA for 91e0e91
File tree
Expand file treeCollapse file tree
73 files changed
+11995
-10541
lines changedFilter options
- lib
- Backend
- amd64
- arm
- i386
- Common
- Common
- Parser
- Runtime
- Base
- ByteCode
- Language
- Library
- InJavascript
- test
- Array
- Function
- PerfHint
- bailout
- loop
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Expand file treeCollapse file tree
73 files changed
+11995
-10541
lines changedlib/Backend/BackwardPass.cpp
Copy file name to clipboardExpand all lines: lib/Backend/BackwardPass.cpp+296-1Lines changed: 296 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
252 | 252 |
| |
253 | 253 |
| |
254 | 254 |
| |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
255 | 333 |
| |
256 | 334 |
| |
257 | 335 |
| |
| |||
260 | 338 |
| |
261 | 339 |
| |
262 | 340 |
| |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
263 | 353 |
| |
264 | 354 |
| |
265 | 355 |
| |
| |||
1818 | 1908 |
| |
1819 | 1909 |
| |
1820 | 1910 |
| |
| 1911 | + | |
| 1912 | + | |
| 1913 | + | |
| 1914 | + | |
| 1915 | + | |
| 1916 | + | |
| 1917 | + | |
| 1918 | + | |
| 1919 | + | |
| 1920 | + | |
| 1921 | + | |
1821 | 1922 |
| |
1822 | 1923 |
| |
1823 | 1924 |
| |
| |||
2415 | 2516 |
| |
2416 | 2517 |
| |
2417 | 2518 |
| |
| 2519 | + | |
| 2520 | + | |
2418 | 2521 |
| |
2419 | 2522 |
| |
2420 | 2523 |
| |
| |||
2427 | 2530 |
| |
2428 | 2531 |
| |
2429 | 2532 |
| |
| 2533 | + | |
| 2534 | + | |
| 2535 | + | |
| 2536 | + | |
| 2537 | + | |
2430 | 2538 |
| |
2431 | 2539 |
| |
2432 | 2540 |
| |
| |||
2502 | 2610 |
| |
2503 | 2611 |
| |
2504 | 2612 |
| |
| 2613 | + | |
| 2614 | + | |
| 2615 | + | |
| 2616 | + | |
| 2617 | + | |
2505 | 2618 |
| |
2506 | 2619 |
| |
2507 | 2620 |
| |
| |||
2735 | 2848 |
| |
2736 | 2849 |
| |
2737 | 2850 |
| |
| 2851 | + | |
| 2852 | + | |
| 2853 | + | |
| 2854 | + | |
| 2855 | + | |
| 2856 | + | |
| 2857 | + | |
| 2858 | + | |
| 2859 | + | |
| 2860 | + | |
| 2861 | + | |
| 2862 | + | |
| 2863 | + | |
| 2864 | + | |
| 2865 | + | |
| 2866 | + | |
| 2867 | + | |
| 2868 | + | |
| 2869 | + | |
| 2870 | + | |
| 2871 | + | |
| 2872 | + | |
| 2873 | + | |
| 2874 | + | |
| 2875 | + | |
| 2876 | + | |
| 2877 | + | |
| 2878 | + | |
| 2879 | + | |
| 2880 | + | |
| 2881 | + | |
| 2882 | + | |
| 2883 | + | |
| 2884 | + | |
| 2885 | + | |
| 2886 | + | |
| 2887 | + | |
| 2888 | + | |
| 2889 | + | |
| 2890 | + | |
| 2891 | + | |
| 2892 | + | |
| 2893 | + | |
| 2894 | + | |
| 2895 | + | |
| 2896 | + | |
| 2897 | + | |
| 2898 | + | |
| 2899 | + | |
| 2900 | + | |
| 2901 | + | |
| 2902 | + | |
| 2903 | + | |
| 2904 | + | |
| 2905 | + | |
| 2906 | + | |
| 2907 | + | |
| 2908 | + | |
| 2909 | + | |
| 2910 | + | |
| 2911 | + | |
| 2912 | + | |
| 2913 | + | |
| 2914 | + | |
| 2915 | + | |
| 2916 | + | |
| 2917 | + | |
| 2918 | + | |
| 2919 | + | |
| 2920 | + | |
| 2921 | + | |
| 2922 | + | |
| 2923 | + | |
| 2924 | + | |
| 2925 | + | |
| 2926 | + | |
| 2927 | + | |
| 2928 | + | |
| 2929 | + | |
| 2930 | + | |
| 2931 | + | |
| 2932 | + | |
| 2933 | + | |
| 2934 | + | |
| 2935 | + | |
| 2936 | + | |
| 2937 | + | |
| 2938 | + | |
| 2939 | + | |
| 2940 | + | |
| 2941 | + | |
| 2942 | + | |
| 2943 | + | |
| 2944 | + | |
| 2945 | + | |
| 2946 | + | |
| 2947 | + | |
| 2948 | + | |
| 2949 | + | |
| 2950 | + | |
| 2951 | + | |
| 2952 | + | |
| 2953 | + | |
| 2954 | + | |
| 2955 | + | |
| 2956 | + | |
| 2957 | + | |
| 2958 | + | |
| 2959 | + | |
| 2960 | + | |
| 2961 | + | |
| 2962 | + | |
| 2963 | + | |
| 2964 | + | |
| 2965 | + | |
| 2966 | + | |
| 2967 | + | |
| 2968 | + | |
| 2969 | + | |
| 2970 | + | |
| 2971 | + | |
| 2972 | + | |
| 2973 | + | |
| 2974 | + | |
| 2975 | + | |
| 2976 | + | |
| 2977 | + | |
| 2978 | + | |
| 2979 | + | |
| 2980 | + | |
| 2981 | + | |
| 2982 | + | |
| 2983 | + | |
| 2984 | + | |
| 2985 | + | |
| 2986 | + | |
| 2987 | + | |
| 2988 | + | |
| 2989 | + | |
| 2990 | + | |
| 2991 | + | |
| 2992 | + | |
| 2993 | + | |
| 2994 | + | |
| 2995 | + | |
| 2996 | + | |
| 2997 | + | |
| 2998 | + | |
| 2999 | + | |
| 3000 | + | |
| 3001 | + | |
| 3002 | + | |
| 3003 | + | |
| 3004 | + | |
| 3005 | + | |
| 3006 | + | |
2738 | 3007 |
| |
2739 | 3008 |
| |
2740 | 3009 |
| |
| |||
3772 | 4041 |
| |
3773 | 4042 |
| |
3774 | 4043 |
| |
| 4044 | + | |
| 4045 | + | |
| 4046 | + | |
| 4047 | + | |
| 4048 | + | |
| 4049 | + | |
3775 | 4050 |
| |
3776 | 4051 |
| |
3777 | 4052 |
| |
| |||
6258 | 6533 |
| |
6259 | 6534 |
| |
6260 | 6535 |
| |
6261 |
| - | |
| 6536 | + | |
| 6537 | + | |
| 6538 | + | |
| 6539 | + | |
| 6540 | + | |
| 6541 | + | |
| 6542 | + | |
| 6543 | + | |
6262 | 6544 |
| |
6263 | 6545 |
| |
6264 | 6546 |
| |
| |||
6296 | 6578 |
| |
6297 | 6579 |
| |
6298 | 6580 |
| |
| 6581 | + | |
| 6582 | + | |
| 6583 | + | |
| 6584 | + | |
| 6585 | + | |
| 6586 | + | |
| 6587 | + | |
| 6588 | + | |
| 6589 | + | |
| 6590 | + | |
| 6591 | + | |
| 6592 | + | |
| 6593 | + | |
6299 | 6594 |
| |
6300 | 6595 |
| |
6301 | 6596 |
| |
|
+6Lines changed: 6 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
24 | 24 |
| |
25 | 25 |
| |
26 | 26 |
| |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
27 | 33 |
| |
28 | 34 |
| |
29 | 35 |
| |
|
You can’t perform that action at this time.
0 commit comments