LibJS: Implement more IteratorOperations and organize file

Implemented IteratorComplete and IteratorValue, and sorted functions
based on their spec ordering.
This commit is contained in:
Matthew Olsson 2021-06-13 13:39:46 -07:00 committed by Andreas Kling
commit 14fff5df06
Notes: sideshowbarker 2024-07-18 12:02:30 +09:00
2 changed files with 25 additions and 14 deletions

View file

@ -19,12 +19,11 @@ enum class IteratorHint {
};
Object* get_iterator(GlobalObject&, Value value, IteratorHint hint = IteratorHint::Sync, Value method = {});
bool is_iterator_complete(Object& iterator_result);
Value create_iterator_result_object(GlobalObject&, Value value, bool done);
Object* iterator_next(Object& iterator, Value value = {});
bool iterator_complete(GlobalObject&, Object& iterator_result);
Value iterator_value(GlobalObject&, Object& iterator_result);
void iterator_close(Object& iterator);
Value create_iterator_result_object(GlobalObject&, Value value, bool done);
MarkedValueList iterable_to_list(GlobalObject&, Value iterable, Value method = {});
enum class CloseOnAbrupt {