Distinguish stack type sets from compiler-created temporary type sets

RESOLVED FIXED in mozilla26

Status

()

Core
JavaScript Engine
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: bhackett, Assigned: bhackett)

Tracking

unspecified
mozilla26
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
Created attachment 803397 [details] [diff] [review]
patch (5a2ab286a977)

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+

Comment 3

5 years ago
https://hg.mozilla.org/mozilla-central/rev/32da64c564db
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26

Updated

5 years ago
Assignee: general → bhackett1024
You need to log in before you can comment on or make changes to this bug.