Closed Bug 915473 Opened 6 years ago Closed 6 years ago

Distinguish stack type sets from compiler-created temporary type sets

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla26

People

(Reporter: bhackett1024, Assigned: bhackett1024)

References

Details

Attachments

(1 file)

Bug 785905 will require locking when the compilation thread wants to read StackTypeSets, and will prevent the compilation thread from being able to modify such type sets.  Currently compiler created temporary type sets are also StackTypeSets, and the compiler should be free to read and write these sets with abandon.  The attached patch adds a new class, TemporaryTypeSet, to distinguish from StackTypeSet.  It also removes some cruft remaining after the analysis purging code was removed.
Attachment #803397 - Flags: review?(jdemooij)
Comment on attachment 803397 [details] [diff] [review]
patch (5a2ab286a977)

Review of attachment 803397 [details] [diff] [review]:
-----------------------------------------------------------------

Independent of bug 785905, having this TemporaryTypeSet type is really nice.

::: js/src/jsinfer.cpp
@@ -4238,5 @@
>  
>  void
>  JSCompartment::sizeOfTypeInferenceData(JS::TypeInferenceSizes *sizes, mozilla::MallocSizeOf mallocSizeOf)
>  {
> -    sizes->analysisPool += analysisLifoAlloc.sizeOfExcludingThis(mallocSizeOf);

You should also remove TypeInferenceSizes::analysisPool + the about:memory entry in XPCJSRuntime.cpp
Attachment #803397 - Flags: review?(jdemooij) → review+
https://hg.mozilla.org/mozilla-central/rev/32da64c564db
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
Assignee: general → bhackett1024
You need to log in before you can comment on or make changes to this bug.