Files
scriptc/packages/runtime/src
Chris Tate 496cf577c7 Print iterators and iterator helper objects as Node does
console.log and util.inspect of a generator object, an iterator helper,
or an array or string iterator were refused, and printing a Map or Set
iterator threw "util.inspect of a dynamic Array Iterator is not
supported yet".

Compiled generators now carry the tag their object prints with:
"Generator" or "AsyncGenerator" by default, "Iterator Helper" for the
helpers, "Array Iterator" and "String Iterator" for the iterators the
compiler builds as generators. The spawn wrapper sets it through the new
scr_gen_set_tag; an adapter over another generator copies that
generator's tag (scr_gen_copy_tag), and generators that stand in for an
object of another class, such as a Set iterator adapted into an
iterator-typed slot, keep refusing to print. They print as Node's
Object [<tag>] {} at any depth, and Object.prototype.toString answers
[object <tag>].

The runtime's native iterators print as Node does: Object [Array
Iterator] {} and Object [String Iterator] {}, and for Map and Set
iterators the entries the next steps would produce, without advancing,
under [Set Iterator], [Set Entries], [Map Iterator] or [Map Entries],
as [Object [Set Iterator]] past the depth limit and {  } when none are
left. Object.prototype.toString answers [object Set Iterator] and the
other tags.
2026-10-19 01:10:39 -05:00
..
2026-10-18 00:42:37 -05:00
2026-10-18 11:24:11 -05:00
2026-10-18 03:52:20 -05:00
2026-10-18 03:52:20 -05:00
2026-10-18 20:25:10 -05:00
2026-10-07 19:07:02 -05:00
2026-10-13 19:48:11 -05:00
2026-10-18 01:06:58 -05:00
2026-10-14 17:27:02 -05:00
2026-10-18 01:06:58 -05:00
2026-10-18 01:06:58 -05:00
2026-10-13 19:48:11 -05:00
2026-10-18 20:25:10 -05:00
2026-10-17 17:57:22 -05:00
2026-10-18 01:06:58 -05:00
2026-10-14 17:27:02 -05:00
2026-10-17 17:57:22 -05:00