Closed Bug 935032 Opened 11 years ago Closed 11 years ago

Remove remaining uses of JSContext in IonBuilder

Categories

(Core :: JavaScript Engine: JIT, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla28

People

(Reporter: bhackett1024, Assigned: bhackett1024)

References

Details

(Whiteboard: [qa-])

Attachments

(9 files)

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)
Attached patch PJS changes (deleted) — Splinter 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+
Status: NEW → RESOLVED
Closed: 11 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.

Attachment

General

Created:
Updated:
Size: