Closed Bug 1527912 Opened 6 years ago Closed 6 years ago

Add support for BigInt values

Categories

(DevTools :: Debugger, enhancement, P2)

enhancement

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1527867

People

(Reporter: wingo, Unassigned)

References

Details

Arbitrary-precision integers (BigInt values) are close to shipping in SpiderMonkey. We should verify that the debugger supports them adequately.

BigInt values are a new kind of primitive. I am not really sure what a debugger would want to do with them specifically other than showing them textually using their literal syntax (e.g. 1n), possibly in a number of different bases (e.g. contextual menu to show as 0x1n or 0b1n).

See also bug 1527867.

Specification here: https://tc39.github.io/proposal-bigint/

They are implemented in Chrome so checking what the Chrome debugger does might be a useful thing to do.

Hey :wingo, I believe we will have support for showing BigInt in the scopes panel and console fairly soon.

What issues are you seeing?

Flags: needinfo?(wingo)
Flags: needinfo?(nchevobbe)
Priority: -- → P2

Jason, this still need platform support.
I have a working patch but wanted to have a server test (which is challenging because we need to set the pref at the right moment so it's picked up in the test harness).
I might go with the patch and a frontend test, and file a bug for a server one.

Flags: needinfo?(nchevobbe)

By the way Andy, is there a bug we can follow that will enable big int in Nightly ?

For BigInt in nightly: https://bugzilla.mozilla.org/show_bug.cgi?id=1531293 (should land shortly)

For shipping BigInt (might slip to ff68): https://bugzilla.mozilla.org/show_bug.cgi?id=1527902

I don't have any specific feedback regarding bigint in devtools, the bug is mostly to verify that things work and that they print correctly and aren't confused with "normal" numbers :)

Flags: needinfo?(wingo)

I am not sure if you need to do anything about it, but there will be a new global as well (BigInt). I see that tern/ecma5.js has explicit support for e.g. Boolean; might need extending to support BigInt.

I think we can close it as dupe of Bug 1527867, where we setup the server support (client support landed in reps a while ago)

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.