Index: src/runtime/runtime-collections.cc |
diff --git a/src/runtime/runtime-collections.cc b/src/runtime/runtime-collections.cc |
index c1a63dc8b4373b115288801773479f8a3d1c9f75..45ac41c6209d702b28f7788c33fd89d19266944f 100644 |
--- a/src/runtime/runtime-collections.cc |
+++ b/src/runtime/runtime-collections.cc |
@@ -92,6 +92,20 @@ RUNTIME_FUNCTION(Runtime_SetIteratorInitialize) { |
} |
+RUNTIME_FUNCTION(Runtime_SetIteratorClone) { |
+ HandleScope scope(isolate); |
+ DCHECK(args.length() == 1); |
+ CONVERT_ARG_HANDLE_CHECKED(JSSetIterator, holder, 0); |
+ |
+ Handle<JSSetIterator> result = isolate->factory()->NewJSSetIterator(); |
+ result->set_table(holder->table()); |
+ result->set_index(Smi::FromInt(Smi::cast(holder->index())->value())); |
+ result->set_kind(Smi::FromInt(Smi::cast(holder->kind())->value())); |
+ |
+ return *result; |
+} |
+ |
+ |
RUNTIME_FUNCTION(Runtime_SetIteratorNext) { |
SealHandleScope shs(isolate); |
DCHECK(args.length() == 2); |
@@ -197,6 +211,20 @@ RUNTIME_FUNCTION(Runtime_MapIteratorInitialize) { |
} |
+RUNTIME_FUNCTION(Runtime_MapIteratorClone) { |
+ HandleScope scope(isolate); |
+ DCHECK(args.length() == 1); |
+ CONVERT_ARG_HANDLE_CHECKED(JSMapIterator, holder, 0); |
+ |
+ Handle<JSMapIterator> result = isolate->factory()->NewJSMapIterator(); |
+ result->set_table(holder->table()); |
+ result->set_index(Smi::FromInt(Smi::cast(holder->index())->value())); |
+ result->set_kind(Smi::FromInt(Smi::cast(holder->kind())->value())); |
+ |
+ return *result; |
+} |
+ |
+ |
RUNTIME_FUNCTION(Runtime_GetWeakMapEntries) { |
HandleScope scope(isolate); |
DCHECK(args.length() == 1); |