From f936b4e824d18dea4a5135762fec90ed0bf9b464 Mon Sep 17 00:00:00 2001 From: Michael Dyck Date: Thu, 13 Jan 2022 20:14:49 -0500 Subject: [PATCH] Editorial: Simplify IsFooDescriptor ops (#2624) i.e., IsAccessorDescriptor, IsDataDescriptor, IsGenericDescriptor - Prefer "has a field" over "does not have a field". - Prefer simple conditions over conjunctions. --- spec.html | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/spec.html b/spec.html index b52cfa05ef4..1840f02d292 100644 --- a/spec.html +++ b/spec.html @@ -4290,8 +4290,9 @@

1. If _Desc_ is *undefined*, return *false*. - 1. If _Desc_ does not have a [[Get]] field and _Desc_ does not have a [[Set]] field, return *false*. - 1. Return *true*. + 1. If _Desc_ has a [[Get]] field, return *true*. + 1. If _Desc_ has a [[Set]] field, return *true*. + 1. Return *false*. @@ -4305,8 +4306,9 @@

1. If _Desc_ is *undefined*, return *false*. - 1. If _Desc_ does not have a [[Value]] field and _Desc_ does not have a [[Writable]] field, return *false*. - 1. Return *true*. + 1. If _Desc_ has a [[Value]] field, return *true*. + 1. If _Desc_ has a [[Writable]] field, return *true*. + 1. Return *false*. @@ -4320,8 +4322,9 @@

1. If _Desc_ is *undefined*, return *false*. - 1. If IsAccessorDescriptor(_Desc_) and IsDataDescriptor(_Desc_) are both *false*, return *true*. - 1. Return *false*. + 1. If IsAccessorDescriptor(_Desc_) is *true*, return *false*. + 1. If IsDataDescriptor(_Desc_) is *true*, return *false*. + 1. Return *true*.