|
|
@ -78,7 +78,7 @@ impl Default for IteratorPrototypes { |
|
|
|
fn default() -> Self { |
|
|
|
fn default() -> Self { |
|
|
|
Self { |
|
|
|
Self { |
|
|
|
array: JsObject::default_with_static_shape(), |
|
|
|
array: JsObject::default_with_static_shape(), |
|
|
|
iterator: JsObject::default(), |
|
|
|
iterator: JsObject::default_with_static_shape(), |
|
|
|
async_iterator: JsObject::default(), |
|
|
|
async_iterator: JsObject::default(), |
|
|
|
async_from_sync_iterator: JsObject::default(), |
|
|
|
async_from_sync_iterator: JsObject::default(), |
|
|
|
set: JsObject::default(), |
|
|
|
set: JsObject::default(), |
|
|
@ -168,13 +168,12 @@ impl IntrinsicObject for Iterator { |
|
|
|
fn init(realm: &Realm) { |
|
|
|
fn init(realm: &Realm) { |
|
|
|
let _timer = Profiler::global().start_event("Iterator Prototype", "init"); |
|
|
|
let _timer = Profiler::global().start_event("Iterator Prototype", "init"); |
|
|
|
|
|
|
|
|
|
|
|
BuiltInBuilder::with_intrinsic::<Self>(realm) |
|
|
|
BuiltInBuilder::with_intrinsic_static_shape::<Self>( |
|
|
|
.static_method( |
|
|
|
realm, |
|
|
|
|v, _, _| Ok(v.clone()), |
|
|
|
&boa_builtins::ITERATOR_PROTOTYPE_STATIC_SHAPE, |
|
|
|
(JsSymbol::iterator(), js_string!("[Symbol.iterator]")), |
|
|
|
) |
|
|
|
0, |
|
|
|
.static_method_with_name(|v, _, _| Ok(v.clone()), js_string!("[Symbol.iterator]"), 0) |
|
|
|
) |
|
|
|
.build(); |
|
|
|
.build(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
fn get(intrinsics: &Intrinsics) -> JsObject { |
|
|
|
fn get(intrinsics: &Intrinsics) -> JsObject { |
|
|
|