Closed Bug 893897 Opened 6 years ago Closed 6 years ago

Change deoptimization in MonitorAssign to only take effect once we have enough properties

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla25

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

Details

Attachments

(1 file)

We're trying to guard against hashtable-like things, but since we deoptimize other things that have the same proto (at least for DOM objects) it's better if we're not too eager about it.
Comment on attachment 775752 [details] [diff] [review]
Don't deoptimize typeobjects in TypeScript::MonitorAssign if they only have a few properties.

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

::: js/src/jsinferinlines.h
@@ +966,5 @@
>          uint32_t i;
>          if (js_IdIsIndex(id, &i))
>              return;
> +        // But if we don't have too many properties yet, don't do anything.  8
> +        // is a fairly random "not too many" value picked for no good reason.

Newline above this comment.  Maybe remove the second sentence, 8 was picked so that the deoptimization is more likely to kick in only after object initialization.
Attachment #775752 - Flags: review?(bhackett1024) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/fc6ed6c80500
Flags: in-testsuite?
Whiteboard: [need review]
Target Milestone: --- → mozilla25
https://hg.mozilla.org/mozilla-central/rev/fc6ed6c80500
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.