Closed Bug 1039607 Opened 10 years ago Closed 10 years ago

Escape Analysis: Support dynamic property on NewObjects.

Categories

(Core :: JavaScript Engine: JIT, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla34

People

(Reporter: nbp, Assigned: nbp)

References

Details

Attachments

(1 file)

This was part of Bug 992845, but as the patch got r+ and the implementation was wrong I stripped the implementation from the previous patch such as it can land without dynamic slot support.
This patch adds support for MSlots, MGuardShape, MLoadSlot, MStoreSlot when
we are escaping objects.  The test case ensure that we can correctly recover
the right values after the bailout, by reading both fixed slots and dynamic
slots.
Attachment #8457918 - Flags: review?(hv1989)
Comment on attachment 8457918 [details] [diff] [review]
Scalar Replacement support dynamic slots.

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

::: js/src/jit/ScalarReplacement.cpp
@@ +83,5 @@
>              return true;
> +
> +          case MDefinition::Op_Slots: {
> +#ifdef DEBUG
> +            // By construction, MSlots is only used by MStoreSlot and MLoadSlot.

// Assert that MSlots are only used by MStoreSlot and MLoadSlot.

@@ +87,5 @@
> +            // By construction, MSlots is only used by MStoreSlot and MLoadSlot.
> +            MSlots *ins = def->toSlots();
> +            MOZ_ASSERT(ins->object() != 0);
> +            for (MUseIterator i(ins->usesBegin()); i != ins->usesEnd(); i++) {
> +                // MSlots are not catured by resume points.

// toDefinition should normally never fail, since they don't get captured by resume points.
Attachment #8457918 - Flags: review?(hv1989) → review+
https://hg.mozilla.org/mozilla-central/rev/cb3487d8700b
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
Depends on: 1061665
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: