diff --git a/.eslintrc b/.eslintrc index 928d63a..601e589 100644 --- a/.eslintrc +++ b/.eslintrc @@ -13,8 +13,7 @@ "GetIteratorFromMethod", "GetSetRecord", "IteratorClose", - "IteratorStep", - "IteratorValue", + "IteratorStepValue", "NormalCompletion", "SetDataSize", "ToBoolean", diff --git a/aos/SetDataSize.js b/aos/SetDataSize.js deleted file mode 100644 index a99e534..0000000 --- a/aos/SetDataSize.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; - -var tools = require('es-set/tools'); -var $setSize = tools.size; - -module.exports = function SetDataSize(setData) { - return $setSize(setData); -}; diff --git a/implementation.js b/implementation.js index beed737..f67b2ec 100644 --- a/implementation.js +++ b/implementation.js @@ -8,10 +8,8 @@ var Call = require('es-abstract/2024/Call'); var GetIteratorFromMethod = require('es-abstract/2024/GetIteratorFromMethod'); var GetSetRecord = require('./aos/GetSetRecord'); var IteratorClose = require('es-abstract/2024/IteratorClose'); -var IteratorStep = require('es-abstract/2024/IteratorStep'); -var IteratorValue = require('es-abstract/2024/IteratorValue'); +var IteratorStepValue = require('es-abstract/2024/IteratorStepValue'); var NormalCompletion = require('es-abstract/2024/NormalCompletion'); -var SetDataSize = require('./aos/SetDataSize'); var ToBoolean = require('es-abstract/2024/ToBoolean'); var isSet = require('is-set'); @@ -31,7 +29,7 @@ module.exports = function isDisjointFrom(other) { var otherRec = GetSetRecord(other); // step 3 - var thisSize = SetDataSize(O); // step 4 + var thisSize = $setSize(O); // SetDataSize(O.[[SetData]]); // step 4 if (thisSize <= otherRec['[[Size]]']) { // step 5 try { @@ -55,15 +53,14 @@ module.exports = function isDisjointFrom(other) { } } else { // step 6 var keysIter = GetIteratorFromMethod(otherRec['[[Set]]'], otherRec['[[Keys]]']); // step 6.a - var next = true; // step 6.b - while (next) { // step 6.c - next = IteratorStep(keysIter); // step 6.c.i - if (next) { // step 6.c.ii - var nextValue = IteratorValue(next); // step 6.c.ii.1 - // if (SetDataHas(O.[[SetData]], nextValue)) { // step 6.c.ii.2 - if ($setHas(O, nextValue)) { - IteratorClose(keysIter, NormalCompletion()); // step 6.c.ii.2.a - return false; // step 6.c.ii.2.b + var next; // step 6.b + while (!keysIter['[[Done]]']) { // step 6.c + next = IteratorStepValue(keysIter); // step 6.c.i + if (!keysIter['[[Done]]']) { // step 6.c.ii + // if (SetDataHas(O.[[SetData]], nextValue)) { // step 6.c.ii.1 + if ($setHas(O, next)) { + IteratorClose(keysIter, NormalCompletion()); // step 6.c.ii.1.a + return false; // step 6.c.ii.1.b } } }