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

Unified Diff: src/factory.cc

Issue 236143002: ES6: Add support for Map.prototype.forEach and Set.prototype.forEach (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: static-ify Created 6 years, 8 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/ia32/full-codegen-ia32.cc » ('j') | src/objects.cc » ('J')
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 fc49e32537ebec9a4799012bc10b4b7ccbeffc72..47e40f9bf9c327011557558715fcdbc334d1463d 100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -1996,4 +1996,14 @@ Handle<Object> Factory::ToBoolean(bool value) {
return value ? true_value() : false_value();
}
+Handle<JSObject> Factory::CreateIteratorResultObject(Handle<Object> value,
+ bool done) {
+ Handle<Map> map(isolate()->native_context()->iterator_result_map());
+ Handle<JSObject> result = NewJSObjectFromMap(map, NOT_TENURED, false);
+ JSObject::SetProperty(result, value_string(), value, NONE, SLOPPY).Assert();
adamk 2014/04/14 21:33:01 I think you can skip all the JSObject machinery he
arv (Not doing code reviews) 2014/04/14 21:41:56 Done.
+ JSObject::SetProperty(
+ result, done_string(), ToBoolean(done), NONE, SLOPPY).Assert();
+ return result;
+}
+
} } // namespace v8::internal
« no previous file with comments | « src/factory.h ('k') | src/ia32/full-codegen-ia32.cc » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698