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

Unified Diff: src/factory.cc

Issue 1302173007: [es6] Introduce a dedicated JSIteratorResult type. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 months 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/factory.h ('k') | src/full-codegen/arm/full-codegen-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/factory.cc
diff --git a/src/factory.cc b/src/factory.cc
index e934f18054c73a33cd8eee79fb828683226f47b8..16c5feb93e22f4357740e9bc3c96e51832b38464 100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -1680,6 +1680,16 @@ Handle<JSSetIterator> Factory::NewJSSetIterator() {
}
+Handle<JSIteratorResult> Factory::NewJSIteratorResult(Handle<Object> value,
+ Handle<Object> done) {
+ Handle<JSIteratorResult> result = Handle<JSIteratorResult>::cast(
+ NewJSObjectFromMap(isolate()->iterator_result_map()));
+ result->set_value(*value);
+ result->set_done(*done);
+ return result;
+}
+
+
namespace {
ElementsKind GetExternalArrayElementsKind(ExternalArrayType type) {
« no previous file with comments | « src/factory.h ('k') | src/full-codegen/arm/full-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698