[JSC] Use PackedPtr for VariableEnvironment
authorysuzuki@apple.com <ysuzuki@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 4 Feb 2020 04:22:29 +0000 (04:22 +0000)
committerysuzuki@apple.com <ysuzuki@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 4 Feb 2020 04:22:29 +0000 (04:22 +0000)
commit798cbdf1f5fb5c28c27602d0b320ef36a44370ea
tree6eafba0dc312feadffee09bafc44bbd0735447cd
parent873af5005ba18f015beee5b1fc449e70fc88b752
[JSC] Use PackedPtr for VariableEnvironment
https://bugs.webkit.org/show_bug.cgi?id=207172

Reviewed by Mark Lam.

Since VariableEnvironment's KeyValue is key: pointer + value: 2 byte, using PackedPtr can make it 8 bytes, 50% reduction.

* parser/VariableEnvironment.h:
* runtime/CachedTypes.cpp:
(JSC::CachedRefPtr::encode):
(JSC::CachedRefPtr::decode const): CachedTypes should handle PackedPtr too since VariableEnvironment starts using it.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255659 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/parser/VariableEnvironment.h
Source/JavaScriptCore/runtime/CachedTypes.cpp