Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Unified Diff: src/runtime/runtime-collections.cc

Issue 693813002: Add debug mirror support for ES6 Map/Set iterators. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: added TODO Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/runtime/runtime.h ('k') | test/mjsunit/es6/mirror-iterators.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « src/runtime/runtime.h ('k') | test/mjsunit/es6/mirror-iterators.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698