mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 02:12:09 -05:00
LibJS: Add fast_is<ArrayIterator>()
This commit is contained in:
parent
73ceb475b9
commit
373ec387c1
2 changed files with 5 additions and 0 deletions
|
@ -28,6 +28,7 @@ private:
|
|||
|
||||
ArrayIterator(Value array, Object::PropertyKind iteration_kind, Object& prototype);
|
||||
|
||||
virtual bool is_array_iterator() const override { return true; }
|
||||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
|
||||
Value m_array;
|
||||
|
@ -35,4 +36,7 @@ private:
|
|||
size_t m_index { 0 };
|
||||
};
|
||||
|
||||
template<>
|
||||
inline bool Object::fast_is<ArrayIterator>() const { return is_array_iterator(); }
|
||||
|
||||
}
|
||||
|
|
|
@ -191,6 +191,7 @@ public:
|
|||
virtual bool is_native_function() const { return false; }
|
||||
virtual bool is_ecmascript_function_object() const { return false; }
|
||||
virtual bool is_iterator_record() const { return false; }
|
||||
virtual bool is_array_iterator() const { return false; }
|
||||
|
||||
// B.3.7 The [[IsHTMLDDA]] Internal Slot, https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
|
||||
virtual bool is_htmldda() const { return false; }
|
||||
|
|
Loading…
Add table
Reference in a new issue