20:15
<bakkot>

instead of function.sent, what if GeneratorPrototype.bindFirstNextToFirstArgument:

const GeneratorProto = Object.getPrototypeOf(function*(){});

GeneratorProto.bindFirstNextToFirstArgument = function () {
  const genFn = this;
  return function (...args) {
    let realGen = null;

    return {
      next(value) {
        if (realGen === null) {
          realGen = genFn(value, ...args);
          return realGen.next();
        }
        return realGen.next(value);
      },
      return(value) {
        return (realGen ??= genFn(undefined, ...args)).return(value);
      },
      throw(err) {
        return (realGen ??= genFn(undefined, ...args)).throw(err);
      },
      [Symbol.iterator]() {
        return this;
      },
    };
  };
};

// usage
let wrapped = (function* (sent, x, y) {
  console.log(x, y, sent);
  yield 0;
}).bindFirstNextToFirstArgument();

let gen = wrapped(1, 2);
let rv = gen.next('first'); // prints 1, 2, 'first'
console.log(rv.value); // prints 0
20:16
<Michael Ficarra>
it wouldn't print 1, 2, 'first'?
20:18
<bakkot>
sorry, yes, was messing with it and forgot to fix that
20:19
<bakkot>
updated
23:24
<rbuckton>
I'm thinking of adding Regex Buffer Boundaries for Stage 2.7 as a late addition to the agenda. It's been sitting for 4 years waiting for reviewers for what is a very small proposal. Richard Gibson and waldemar signed up as reviewers in the December 2021 plenary, so if either of you have time to review by Friday, Michael Ficarra has already indicated to me that he should be able to review it.
23:26
<rbuckton>
Aside from the minor addition to the syntactic grammar, the spec text is quite literally just this: