Simplify shape->hasSlot() code

RESOLVED FIXED in Firefox 58

Status

()

RESOLVED FIXED
2 years ago
a year ago

People

(Reporter: jandem, Assigned: jandem)

Tracking

unspecified
mozilla58
Points:
---

Firefox Tracking Flags

(firefox58 fixed)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

2 years ago
Posted patch Patch (obsolete) — Splinter Review
Now that bug 1153592 is fixed, shape->hasSlot() implies shape->hasDefaultGetter() && shape->hasDefaultSetter().

This patch renames hasSlot() to isDataProperty() and removes now-redundant hasDaultGetter/hasDefaultSetter calls.

I also made isDataProperty() assert !isEmptyShape(), instead of checking for it, because almost all callers already know they have a non-empty shape.
Attachment #8913649 - Flags: review?(evilpies)
(Assignee)

Comment 1

2 years ago
Posted patch PatchSplinter Review
Attachment #8913649 - Attachment is obsolete: true
Attachment #8913649 - Flags: review?(evilpies)
Attachment #8913650 - Flags: review?(evilpies)
Comment on attachment 8913650 [details] [diff] [review]
Patch

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

Great improvement. Hopefully at some point we can remove array_length & co, so that isDataDescriptor == isDataProperty
Attachment #8913650 - Flags: review?(evilpies) → review+

Comment 3

2 years ago
Pushed by jandemooij@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/641d9a23bb4e
Rename Shape::hasSlot() to Shape::isDataProperty() and simplify callers. r=evilpie

Comment 4

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/641d9a23bb4e
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
status-firefox58: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
You need to log in before you can comment on or make changes to this bug.