Closed Bug 1659595 Opened 4 years ago Closed 4 years ago

Avoid creating atoms for BigInt property names

Categories

(Core :: JavaScript Engine, task, P1)

task

Tracking

()

RESOLVED FIXED
82 Branch
Tracking Status
firefox82 --- fixed

People

(Reporter: tcampbell, Assigned: mgaudet)

References

Details

Attachments

(1 file)

BigInt property keys need to be normalized to strings during parsing. This is currently done by allocating both a BigInt and a JSString. Instead we need something compatible with ParserAtom type.

This is a silly syntax and likely will rarely be used. We can do a naive normalization into a ParserAtom and that is probably good enough.

Summary: Rewrite GeneralParser::bigIntAtom() to avoid GC → Avoid creating atoms for BigInts

This parses numeric property names as if they were computed, which means we don't end up neeeding to atomize
them.

This does mean that numeric property names take a slower path on construction, meaning that it is possible
to measure a slowdown on executing the construction of a huge literal with thousands of numeric properties.

Assignee: tcampbell → mgaudet
Summary: Avoid creating atoms for BigInts → Avoid creating atoms for BigInt property names
Attachment #9170993 - Attachment description: Bug 1659595 - Avoid creating atoms for BigInts (and numeric types) when parsing r?jorendorff!,tcampbell!,jandem! → Bug 1659595 - Avoid creating atoms for BigInts when parsing r?jorendorff!,tcampbell!,jandem!
Pushed by mgaudet@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/bea475748ad2
Avoid creating atoms for BigInts when parsing r=jorendorff,tcampbell,jandem
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 82 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: