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

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

Issue 2484003002: [builtins] implement JSBuiltinReducer for ArrayIteratorNext() (Closed)
Patch Set: fix tests when ignition is used Created 4 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-array.cc ('k') | test/mjsunit/es6/array-iterator-turbo.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-object.cc
diff --git a/src/runtime/runtime-object.cc b/src/runtime/runtime-object.cc
index b3f72d5f9c817a510dd42e08c2e766b5f1619299..c7e9cf3c9241efdb05e38f4127e41feb47b840d8 100644
--- a/src/runtime/runtime-object.cc
+++ b/src/runtime/runtime-object.cc
@@ -925,6 +925,17 @@ RUNTIME_FUNCTION(Runtime_CreateIterResultObject) {
return *isolate->factory()->NewJSIteratorResult(value, done->BooleanValue());
}
+RUNTIME_FUNCTION(Runtime_CreateKeyValueArray) {
+ HandleScope scope(isolate);
+ DCHECK_EQ(2, args.length());
+ CONVERT_ARG_HANDLE_CHECKED(Object, key, 0);
+ CONVERT_ARG_HANDLE_CHECKED(Object, value, 1);
+ Handle<FixedArray> elements = isolate->factory()->NewFixedArray(2);
+ elements->set(0, *key);
+ elements->set(1, *value);
+ return *isolate->factory()->NewJSArrayWithElements(elements, FAST_ELEMENTS,
+ 2);
+}
RUNTIME_FUNCTION(Runtime_IsAccessCheckNeeded) {
SealHandleScope shs(isolate);
« no previous file with comments | « src/runtime/runtime-array.cc ('k') | test/mjsunit/es6/array-iterator-turbo.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698