Remove remaining uses of JSContext in IonBuilder

RESOLVED FIXED in mozilla28

Status

()

defect
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: bhackett, Assigned: bhackett)

Tracking

unspecified
mozilla28
x86
macOS
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [qa-])

Attachments

(9 attachments)

Except for the emergency repair added in bug 933734, the remaining uses of IonBuilder's context member are straightforward to remove.  Rather than file bugs for each of these separately this bug collates the various fixes required.
annotateGetPropertyCache and getPropTryCache use a context to allow hashification of shapes which they are searching.  These shapes are not in a dictionary though and can be searched linearly from off thread.  (Dictionary shapes can't be searched linearly while off thread because their next/prev pointers might change).
Assignee: nobody → bhackett1024
Attachment #827435 - Flags: review?(jdemooij)
Several APIs for interacting with aliasedvar scope coordinates take a context, which is only used to construct an unnecessary root inside StaticScopeIters.  This patch makes StaticScopeIter a template class like Shape::Range which either does or doesn't require a context.
Attachment #827436 - Flags: review?(luke)
This patch uses Ion's temp allocator for allocating the TypeRepresentationSet optionally created (fixing a leak in the process, since IonBuilders aren't explicitly destroyed).  TypeRepresentationSet doesn't release any other data in its destructor.
Attachment #827439 - Flags: review?(jdemooij)
When compiling JSOP_REGEXP IonBuilder gets the RegExp prototype from the global, but this will never need to create this prototype lazily since there is a regexp literal whose prototype is the object being searched for.
Attachment #827441 - Flags: review?(jdemooij)
Posted patch PJS changesSplinter Review
Change inlining of PJS natives to not force instantiation of constructor intrinsic functions, and store the ParallelArrayObject template in baseline caches, as is done for other natives.
Attachment #827446 - Flags: review?(shu)
The math cache will be instantiated the first time a math function is called so there is no need for IonBuilder to force its instantiation.
Attachment #827447 - Flags: review?(jdemooij)
Remove an unnecessary Handle requirement on ArrayPrototypeHasIndexedProperty.
Attachment #827448 - Flags: review?(jdemooij)
ToNumber can have side effects and should never be called by IonBuilder.
Attachment #827449 - Flags: review?(jdemooij)
Attachment #827436 - Flags: review?(luke) → review+
Attachment #827435 - Flags: review?(jdemooij) → review+
Attachment #827439 - Flags: review?(jdemooij) → review+
Attachment #827441 - Flags: review?(jdemooij) → review+
Attachment #827447 - Flags: review?(jdemooij) → review+
Attachment #827448 - Flags: review?(jdemooij) → review+
Attachment #827449 - Flags: review?(jdemooij) → review+
Comment on attachment 827446 [details] [diff] [review]
PJS changes

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

Looks good to me.
Attachment #827446 - Flags: review?(shu) → review+
Whiteboard: [leave open]
Here's another intrinsic creating template objects which I missed yesterday.
Attachment #828057 - Flags: review?(shu)
Attachment #828057 - Flags: review?(shu) → review+
https://hg.mozilla.org/mozilla-central/rev/8196cbbcadcd
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.