[Webkit-unassigned] [Bug 216172] [JSC] Use symbols as identifiers for class fields computed names storage

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Nov 9 17:45:21 PST 2020


https://bugs.webkit.org/show_bug.cgi?id=216172

--- Comment #28 from Yusuke Suzuki <ysuzuki at apple.com> ---
Comment on attachment 413577
  --> https://bugs.webkit.org/attachment.cgi?id=413577
Use symbols as identifiers, v10

View in context: https://bugs.webkit.org/attachment.cgi?id=413577&action=review

Looks good overall. Some nits.

> Source/JavaScriptCore/parser/Parser.cpp:2840
> +#define INSTANCE_COMPUTED_NAME_PREFIX "instanceComputedName"

Let's use `static constexpr ASCIILiteral instanceComputedNamePrefix { "instanceComputedName"_s };`

> Source/JavaScriptCore/parser/ParserArena.cpp:110
> +const Identifier& IdentifierArena::makePrivateIdentifier(VM& vm, const char* prefix, unsigned identifier)

Let's use `ASCIILiteral` instead of `const char*`.

> Source/WTF/wtf/text/SymbolRegistry.h:81
> +    enum class Type { PublicSymbol, PrivateSymbol };

Make it `enum class Type : uint8_t`

> Source/WTF/wtf/text/SymbolRegistry.h:83
> +    SymbolRegistry(Type type) { m_symbolType = type; };

Set it in initializer list instead of function body.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20201110/ebabb150/attachment.htm>


More information about the webkit-unassigned mailing list