Simplify GC allocation functions a little
Categories
(Core :: JavaScript: GC, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox92 | --- | fixed |
People
(Reporter: jonco, Assigned: jonco)
Details
Attachments
(3 files)
At the moment there is some complexity around our allocation functions:
- there's sepcializations for the string allocation functions and it's not obvious why they're needed
- we template the allocation implementations on the type and I think this is unnecessary
Assignee | ||
Comment 1•3 years ago
|
||
Currently there's some strangeness about AllocateString with its
specializations for fat inline strings. If we make MapTypeToFinailzeKind work
for all dervied types we can make this generic. I also had to move this to
AllocKind.h so we can see it here.
Secondly, AllocateStringImpl doesn't really do much with its template type
argument so we can remove this and just pass in the size an alloc kind.
Assignee | ||
Comment 2•3 years ago
|
||
This returns a gc::AllocKind so let's rename it to something more obvious.
Depends on D121541
Assignee | ||
Comment 3•3 years ago
|
||
We can remove the type template from the tenured allocation function too along
the same lines as the first patch.
Depends on D121542
Pushed by jcoppeard@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b57d2918ed0a Simplify GC string allocation functions r=sfink https://hg.mozilla.org/integration/autoland/rev/946746faed17 Rename MapTypeToFinalizeKind to MapTypeToAllocKind r=sfink https://hg.mozilla.org/integration/autoland/rev/005ac67674b1 Simplify tenured allocation function r=sfink
Comment 5•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/b57d2918ed0a
https://hg.mozilla.org/mozilla-central/rev/946746faed17
https://hg.mozilla.org/mozilla-central/rev/005ac67674b1
Description
•