Open
Bug 563305
Opened 15 years ago
Updated 2 years ago
jsgc.cpp: replace handcrafted GC chunk layout with a real struct
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
ASSIGNED
People
(Reporter: jseward, Assigned: jseward)
References
Details
Attachments
(1 file)
13.66 KB,
patch
|
Details | Diff | Splinter Review |
In jsgc.cpp, the basic representation of the heap centers around 'gc
chunks', which contain a number of JSGCArenas and supporting data.
This is described in a bit comment at jsgc.cpp:142. For unclear
reasons, although every other data structure has a real C++
definition, this one doesn't. Consequently the code that manipulates
it is hard to follow and contains by-hand address arithmetic and bit
twiddling that we'd normally expect the compiler to do for us.
Hence: give a proper struct definition, GCChunk, and use its fields
in the obvious way, rather than manual address arithmetic, where possible.
A possible followup tidying is would be to change JSRuntime::gcChunks
from a vector of JSGCChunkInfo*s to a vector of GCChunk*s.
Assignee | ||
Comment 1•15 years ago
|
||
![]() |
||
Comment 2•15 years ago
|
||
In C++ you can use just "GCChunk" rather than "struct GCChunk" when referring to it, AIUI.
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•