Closed Bug 1582858 Opened 5 years ago Closed 4 years ago

Fold Constants currently allocates GC things

Categories

(Core :: JavaScript Engine, task, P2)

task

Tracking

()

RESOLVED FIXED

People

(Reporter: mgaudet, Unassigned)

References

Details

Attachments

(2 obsolete files)

One thing blocking us having a totally GC avoiding parser is our FoldConstants path allocating new GCThings.

I know for sure when it folds string concatenation ("a"+"b") together it will allocate; I'm not sure about other cases.

Opening this issue for discussion and figuring out plan of attack.

I do have a preliminary patch which hoists FoldConstants out, and makes it a separate operation that clients need to opt into, but while that helps us keep the parse functions GC free, we still want to fold constants before bytecode emission.

Depends on: 1592105

Since the only GC allocation is for Atoms, this will be handled nicely by Bug 1592105. We can leave this bug open until then for tracking purposes. Technically, FoldConstants allocates non-atom strings and then atomizes them so a little care will need to be taken.

Attachment #9094315 - Attachment is obsolete: true
Attachment #9094316 - Attachment is obsolete: true

Fixed by Bug 1660798.

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

Attachment

General

Created:
Updated:
Size: