Closed Bug 1137017 Opened 10 years ago Closed 10 years ago

sixgill improvements: handle more code, GC

Categories

(Core :: JavaScript: GC, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: sfink, Assigned: sfink)

References

(Blocks 1 open bug)

Details

Attachments

(3 files, 2 obsolete files)

I have another stack of sixgill changes built up. I'm just going to post the changes that I think are useful to review. I have other stuff that doesn't seem worth chewing up review time that I plan to build with but not request review for. These include: - making it compatible with gcc 4.9 - getting rid of a bunch of warnings - statically linking with libgmp (required for several gcc versions) - building without cvc3 (to avoid the dependency) - adding the ability for xmanager to log and replay all input from plugins - some fixes to the memory tracking - improved a couple of error messages I suppose I should put up a repo on github or somewhere for these.
Attached patch Handle sizeof and alignof (obsolete) (deleted) — Splinter Review
Handle sizeof and alignof. sizeof seems to be the largest source of unhandled constructs currently. This is totally cargo-culted.
Attachment #8569552 - Flags: review?(bhackett1024)
Attached patch imported patch GC (obsolete) (deleted) — Splinter Review
This implements a bare-bones garbage collector, relying on the existing marking infrastructure. I don't really have any clue about the data structures and in particular where all the roots are hiding, so I just added stuff until it stopped crashing. This seems to free a large number of objects while producing bitwise identical .xdb files (at least for a compiling a single unified file). I don't know whether it really reduces memory usage or not. (Hmm... come to think of it, I bet I should be doing UnPersist before deleting...)
Attachment #8569554 - Flags: review?(bhackett1024)
Attached patch patch (deleted) — Splinter Review
Well, it doesn't crash with the UnPersist added. Must be correct. :-)
Attachment #8569555 - Flags: review?(bhackett1024)
Attachment #8569554 - Attachment is obsolete: true
Attachment #8569554 - Flags: review?(bhackett1024)
Comment on attachment 8569552 [details] [diff] [review] Handle sizeof and alignof Review of attachment 8569552 [details] [diff] [review]: ----------------------------------------------------------------- This patch just seems to be translating sizeof(e) into just e, i.e. it passes through the operand. I think you would need to be using TREE_TYPE, TYPE_SIZE, and XIL_ExpInt to get the type of the expression and compute a constant for its size.
Attachment #8569552 - Flags: review?(bhackett1024)
Attachment #8569555 - Flags: review?(bhackett1024) → review+
Attached patch Handle sizeof and alignof (deleted) — Splinter Review
Ok, let me try this again. More cargo-culting.
Attachment #8570227 - Flags: review?(bhackett1024)
Attachment #8569552 - Attachment is obsolete: true
Attachment #8570227 - Flags: review?(bhackett1024) → review+
Attached patch Stop leaking strings (deleted) — Splinter Review
When I implemented name mangling, I just freely leaked strings all over. As long as I'm fixing memory problems, I should really clean them up. This really wants RAII, but it's a quick fix.
Attachment #8570851 - Flags: review?(bhackett1024)
Comment on attachment 8570851 [details] [diff] [review] Stop leaking strings Review of attachment 8570851 [details] [diff] [review]: ----------------------------------------------------------------- ::: gcc/xgill.c @@ +70,5 @@ > + > + XIL_ReleaseCString(dst); > + dst->str = src->str; > + dst->owned = src->owned; > + src->owned = 0; false
Attachment #8570851 - Flags: review?(bhackett1024) → review+
I have deployed builds with all these changes.
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Blocks: 1246326
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: