Closed Bug 1404310 Opened 7 years ago Closed 7 years ago

Simplify shape->hasSlot() code

Categories

(Core :: JavaScript Engine, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla58
Tracking Status
firefox58 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

Details

Attachments

(1 file, 1 obsolete file)

Attached 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)
Attached 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+
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
https://hg.mozilla.org/mozilla-central/rev/641d9a23bb4e
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: