summaryrefslogtreecommitdiffstats
path: root/chromium/v8/src/objects/js-iterator-helpers.tq
blob: 88a3e119b6191df351ae5183226194ca74df6cd6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Copyright 2023 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

@abstract
extern class JSIteratorHelper extends JSObject {
  underlying: iterator::IteratorRecord;
}

extern class JSIteratorMapHelper extends JSIteratorHelper {
  mapper: Callable;
  counter: Number;
}

extern class JSIteratorFilterHelper extends JSIteratorHelper {
  predicate: Callable;
  counter: Number;
}

extern class JSIteratorTakeHelper extends JSIteratorHelper {
  remaining: Number;
}

extern class JSIteratorDropHelper extends JSIteratorHelper {
  remaining: Number;
}

extern class JSIteratorFlatMapHelper extends JSIteratorHelper {
  mapper: Callable;
  counter: Number;
  innerIterator: iterator::IteratorRecord;
  innerAlive: Boolean;
}