Remove remaining uses of JSContext in IonBuilder

RESOLVED FIXED in mozilla28

Status

()

Core
JavaScript Engine: JIT
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: bhackett, Assigned: bhackett)

Tracking

unspecified
mozilla28
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [qa-])

Attachments

(9 attachments)

(Assignee)

Description

4 years ago
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.
(Assignee)

Comment 1

4 years ago
Created attachment 827435 [details] [diff] [review]
use linear searches of shapes in annotated property caches

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)
(Assignee)

Comment 2

4 years ago
Created attachment 827436 [details] [diff] [review]
remove context uses from ScopeCoordinate APIs

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)
(Assignee)

Comment 3

4 years ago
Created attachment 827439 [details] [diff] [review]
use Ion allocator for TypeRepresentationSet

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)
(Assignee)

Comment 4

4 years ago
Created attachment 827441 [details] [diff] [review]
don't try to create the reg exp prototype

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)
(Assignee)

Comment 5

4 years ago
Created attachment 827446 [details] [diff] [review]
PJS changes

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)
(Assignee)

Comment 6

4 years ago
Created attachment 827447 [details] [diff] [review]
don't force instantiation of the math cache

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)
(Assignee)

Comment 7

4 years ago
Created attachment 827448 [details] [diff] [review]
don't root for calls to ArrayPrototypeHasIndexedProperty

Remove an unnecessary Handle requirement on ArrayPrototypeHasIndexedProperty.
Attachment #827448 - Flags: review?(jdemooij)
(Assignee)

Comment 8

4 years ago
Created attachment 827449 [details] [diff] [review]
don't call a generic ToNumber when inlining Math.pow

ToNumber can have side effects and should never be called by IonBuilder.
Attachment #827449 - Flags: review?(jdemooij)

Updated

4 years ago
Attachment #827436 - Flags: review?(luke) → review+

Updated

4 years ago
Attachment #827435 - Flags: review?(jdemooij) → review+

Updated

4 years ago
Attachment #827439 - Flags: review?(jdemooij) → review+

Updated

4 years ago
Attachment #827441 - Flags: review?(jdemooij) → review+

Updated

4 years ago
Attachment #827447 - Flags: review?(jdemooij) → review+

Updated

4 years ago
Attachment #827448 - Flags: review?(jdemooij) → review+

Updated

4 years ago
Attachment #827449 - Flags: review?(jdemooij) → review+

Comment 9

4 years ago
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+
(Assignee)

Updated

4 years ago
Whiteboard: [leave open]
(Assignee)

Comment 11

4 years ago
Created attachment 828057 [details] [diff] [review]
don't create template for intrinsic_NewDenseArray

Here's another intrinsic creating template objects which I missed yesterday.
Attachment #828057 - Flags: review?(shu)

Updated

4 years ago
Attachment #828057 - Flags: review?(shu) → review+
https://hg.mozilla.org/mozilla-central/rev/8196cbbcadcd
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28

Updated

4 years ago
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.