diff options
author | Anonymous <anon@mous.org> | 2022-02-12 00:48:23 -0800 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-02-13 14:44:36 +0100 |
commit | d1cc67bbe12d66aca2a716011697337664b72e6d (patch) | |
tree | b4d49b40067009ce0d530775cbe0109b17700a91 /Userland/Libraries/LibC/sys/utsname.h | |
parent | 3a184f784186ad1c5a9704b05ab0902d577d5748 (diff) | |
download | serenity-d1cc67bbe12d66aca2a716011697337664b72e6d.zip |
LibJS: Avoid unnecessary ToObject conversion when resolving references
When performing GetValue on a primitive type we do not need to perform
the ToObject conversion as it will resolve to a property on the
prototype object.
To avoid this we skip the initial ToObject conversion on the base value
as it only serves to get the primitive's boxed prototype. We further
specialize on PrimitiveString in order to get efficient behaviour
behaviour for the direct properties.
Depending on the tests anywhere from 20 to 60%, with significant loop
overhead.
Diffstat (limited to 'Userland/Libraries/LibC/sys/utsname.h')
0 files changed, 0 insertions, 0 deletions