Implement Iterator interface and Array iterators (#2640)

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
Robert Fancsik
2019-02-08 11:10:32 +01:00
committed by GitHub
parent 2dd854d28b
commit 4f5ffb4f3a
21 changed files with 1045 additions and 6 deletions
+13
View File
@@ -369,6 +369,12 @@ ecma_gc_mark (ecma_object_t *object_p) /**< object to mark from */
break;
}
#endif /* !CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN */
#ifndef CONFIG_DISABLE_ES2015_ITERATOR_BUILTIN
case ECMA_PSEUDO_ARRAY_ITERATOR:
{
break;
}
#endif /* !CONFIG_DISABLE_ES2015_ITERATOR_BUILTIN */
default:
{
JERRY_ASSERT (ext_object_p->u.pseudo_array.type == ECMA_PSEUDO_ARRAY_ARGUMENTS);
@@ -762,6 +768,13 @@ ecma_gc_free_object (ecma_object_t *object_p) /**< object to free */
return;
}
#endif /* !CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN */
#ifndef CONFIG_DISABLE_ES2015_ITERATOR_BUILTIN
case ECMA_PSEUDO_ARRAY_ITERATOR:
{
ecma_dealloc_extended_object (object_p, sizeof (ecma_extended_object_t));
return;
}
#endif /* !CONFIG_DISABLE_ES2015_ITERATOR_BUILTIN */
default:
{
JERRY_ASSERT (ext_object_p->u.pseudo_array.type == ECMA_PSEUDO_ARRAY_ARGUMENTS);