Bug 179001 - [ESNext] Implement support for BigInt
Summary: [ESNext] Implement support for BigInt
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 175359 179000 179002 179003 179004 179005 179006 179900 179901 179902 179903 181144 182216 182470 183721 183996 184327 184474 185379 185929 186173 186228 186229 186230 186231 186232 186233 186235 190798 190799 190800 190836 193240 193241 200745 206182
Blocks:
  Show dependency treegraph
 
Reported: 2017-10-30 03:59 PDT by Caio Lima
Modified: 2020-11-30 22:37 PST (History)
10 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Caio Lima 2017-10-30 03:59:14 PDT
It is an umbrella bug to keep track of BigInt work.
Comment 1 Shane Carr 2020-03-30 15:12:19 PDT
Also: https://bugs.webkit.org/show_bug.cgi?id=209782
Comment 2 John Leidegren 2020-11-28 12:46:34 PST
I would like to add to this that BigInts don't appear to work as keys in ES Collections. I just took Safari 14 for a spin and ran into the most bizzare bugs where I could insert multiple entries with the same bigint keys in a Map.

For example:

const m = new Map()
m.set(1n, 123)
m.set(1n, 456)

console.log(m)
Map {1n => 123, 1n => 456}

get(1n)
undefined

etc.

Not sure what's up but it is broken.
Comment 3 Yusuke Suzuki 2020-11-28 20:12:37 PST
(In reply to John Leidegren from comment #2)
> I would like to add to this that BigInts don't appear to work as keys in ES
> Collections. I just took Safari 14 for a spin and ran into the most bizzare
> bugs where I could insert multiple entries with the same bigint keys in a
> Map.
> 
> For example:
> 
> const m = new Map()
> m.set(1n, 123)
> m.set(1n, 456)
> 
> console.log(m)
> Map {1n => 123, 1n => 456}
> 
> get(1n)
> undefined
> 
> etc.
> 
> Not sure what's up but it is broken.

This is fixed in https://trac.webkit.org/changeset/267373/webkit/. You can try it in STP 115 or later :)
Comment 4 John Leidegren 2020-11-30 00:13:46 PST
Great! When will this be available to the general public? I'm unfamiliar with the release schedule of Safari but it looks to me that there will eventually be a Safari 14.1 release but that may take a while?
Comment 5 Yusuke Suzuki 2020-11-30 15:41:53 PST
(In reply to John Leidegren from comment #4)
> Great! When will this be available to the general public? I'm unfamiliar
> with the release schedule of Safari but it looks to me that there will
> eventually be a Safari 14.1 release but that may take a while?

We cannot comment on future Apple software releases. After the fix is released, we can comment on that.
Comment 6 John Leidegren 2020-11-30 22:37:11 PST
Ok, thanks anyway for the information. I'll wait patiently.