Ion's RA: reorder methods in BacktrackingAllocator.{cpp,h}
Categories
(Core :: JavaScript Engine: JIT, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox103 | --- | fixed |
People
(Reporter: jseward, Assigned: jseward)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
BacktrackingAllocator.cpp is a big, complex file. It contains the complete
register allocation pipeline and has dozens of methods and functions.
Unfortunately the organisation is poor, obscures the overall structure, and is
hard to follow:
-
often, no clear grouping of methods/functions into logical groups
-
inadequate group-heading comments, needed for top level navigation
-
inconsistencies in whether methods are defined before or after their use
points -
inconsistencies in the sequence of methods relative to flow in the allocator
pipeline
Any attempt to clean up the allocator first needs to address these structuring
issues. This patch:
-
makes no functional changes -- it merely reorders methods in
BacktrackingAllocator.cpp and adds a handful of top-level section marker
comments. The sequencing of methods is now definition-before-use. The top
level group sequencing has been changed so as to match the actual flow of
data through the allocation pipeline. -
The contents of
class BacktrackingAllocator
in BacktrackingAllocator.h are
rearranged to follow the .cpp changes. The rest of this file is unchanged. -
minor change: BacktrackingAllocator::SpillWeightFromUsePolicy was a free
method in the .h file. Has been moved to the .cpp file. -
minor change: typedef
LiveRangeVector
is unused and has been removed.
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 1•2 years ago
|
||
BacktrackingAllocator.cpp is a big, complex file. It contains the complete
register allocation pipeline and has dozens of methods and functions.
Unfortunately the organisation is poor, which obscures the overall structure
makes it hard to follow:
-
often, no clear grouping of methods/functions into logical groups
-
inadequate group-heading comments, needed for top level navigation
-
inconsistencies in whether methods are defined before or after their use
points -
inconsistencies in the sequence of methods relative to flow in the allocator
pipeline
Any attempt to clean up the allocator first needs to address these structuring
issues:
-
This patch makes no functional changes -- it merely reorders methods in
BacktrackingAllocator.cpp and adds a handful of top-level section marker
comments. The sequencing of methods is now definition-before-use. The top
level group sequencing has been changed so as to match the actual flow of
data through the allocation pipeline. -
The contents of class BacktrackingAllocator in BacktrackingAllocator.h are
rearranged to follow the .cpp changes. The rest of this file is unchanged. -
minor change: BacktrackingAllocator::SpillWeightFromUsePolicy was a free
method in the .h file. Has been moved to the .cpp file. -
minor change: typedef LiveRangeVector is unused and has been removed.
Pushed by nfay@mozilla.com: https://hg.mozilla.org/mozilla-central/rev/7903ed468b9c Ion's RA: reorder methods in BacktrackingAllocator.{cpp,h}. r=jandem.
Comment 3•2 years ago
|
||
bugherder |
Description
•