Bug 247424 - Wrong names of getter and setter "0" for class
Summary: Wrong names of getter and setter "0" for class
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: David Degazio
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-11-03 08:43 PDT by Kanguk Lee
Modified: 2022-11-16 09:33 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kanguk Lee 2022-11-03 08:43:16 PDT
// input.js
class x { get 0 ( ) { } }
print(
    Object.getOwnPropertyDescriptor(x.prototype, "0").get.name
);
_______________________________________________________________

Hello,

JSC generates the name of the getter `get 0 ( ) { }` / `set 0 ( ) { }` as "get " / "set " but it should be "get 0" / "set 0".

Running the input.js with JSC prints

---
$ jsc input.js
get 
---

while other engines behave like

---
# V8 (used console.log)
$ node input.js
get 0

# GraalJS
$ js input.js
get 0
---


WebKit version: 615.1.10
Comment 1 Radar WebKit Bug Importer 2022-11-03 18:04:35 PDT
<rdar://problem/101940115>
Comment 2 David Degazio 2022-11-14 16:15:32 PST
Pull request: https://github.com/WebKit/WebKit/pull/6494
Comment 3 EWS 2022-11-16 09:33:04 PST
Committed 256740@main (ad1302fe8297): <https://commits.webkit.org/256740@main>

Reviewed commits have been landed. Closing PR #6494 and removing active labels.