Closed Bug 1453932 Opened 6 years ago Closed 6 years ago

Optimize loads from CallSiteObject (tagged template literals)

Categories

(Core :: JavaScript Engine: JIT, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla61
Tracking Status
firefox61 --- fixed

People

(Reporter: evilpie, Assigned: evilpie)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 2 obsolete files)

The object with strings that we create for tagged templates is a constant frozen array, so we should be able to optimize the loads from that array.

I have a patch seems to work, but needs a few more comments and some of those trackOptimizationAttempt things.
Attachment #8967696 - Attachment is obsolete: true
Attachment #8968482 - Flags: review?(jdemooij)
Comment on attachment 8968482 [details] [diff] [review]
Optimize loads from CallSiteObjects for tagged template literals

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

Sweet.

::: js/src/jit-test/tests/ion/template-tag-callsiteobject.js
@@ +1,2 @@
> +function tagA(strings) {
> +	assertEq(strings.length, 2);

Nit: the indentation in this test looks a bit off.

::: js/src/jit/IonBuilder.cpp
@@ +8251,5 @@
> +IonBuilder::getElemTryCallSiteObject(bool* emitted, MDefinition* obj, MDefinition* index)
> +{
> +    MOZ_ASSERT(*emitted == false);
> +
> +    if (!obj->isConstant() || obj->type() != MIRType::Object) {

Nit: no {} here and ~4 times below.
Attachment #8968482 - Flags: review?(jdemooij) → review+
Priority: -- → P3
Attachment #8968482 - Attachment is obsolete: true
Attachment #8969205 - Flags: review?(jdemooij)
Attachment #8969205 - Flags: review?(jdemooij) → review+
Pushed by evilpies@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/0a19791ab773
Optimize loads from CallSiteObjects for tagged template literals. r=jandem
On AWFY this didn't help on the expected test templatestringtag-es6. Instead we seem to have a reversed a regression on map-set-es6. GC timing maybe?
https://hg.mozilla.org/mozilla-central/rev/0a19791ab773
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
You need to log in before you can comment on or make changes to this bug.