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

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

Issue 2405253006: [builtins] implement Array.prototype[@@iterator] in TFJ builtins (Closed)
Patch Set: add array_iterator_protector, and check array_protector in holey fast arrays Created 4 years, 2 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
Index: src/runtime/runtime-array.cc
diff --git a/src/runtime/runtime-array.cc b/src/runtime/runtime-array.cc
index f790f617d7a96bf5c0b7e9d4e1b810bb4cd53ccc..388946d7cfe97cd7e34caf6f361b472c14e887c3 100644
--- a/src/runtime/runtime-array.cc
+++ b/src/runtime/runtime-array.cc
@@ -71,6 +71,10 @@ RUNTIME_FUNCTION(Runtime_SpecialArrayFunctions) {
InstallBuiltin(isolate, holder, "splice", Builtins::kArraySplice);
InstallBuiltin(isolate, holder, "includes", Builtins::kArrayIncludes, 2);
InstallBuiltin(isolate, holder, "indexOf", Builtins::kArrayIndexOf, 2);
+ InstallBuiltin(isolate, holder, "keys", Builtins::kArrayPrototypeKeys, 0);
+ InstallBuiltin(isolate, holder, "values", Builtins::kArrayPrototypeValues, 0);
+ InstallBuiltin(isolate, holder, "entries", Builtins::kArrayPrototypeEntries,
+ 0);
return *holder;
}
@@ -639,5 +643,10 @@ RUNTIME_FUNCTION(Runtime_ArrayIndexOf) {
return Smi::FromInt(-1);
}
+RUNTIME_FUNCTION(Runtime_InvalidateArrayIteratorProtector) {
+ isolate->InvalidateArrayIteratorProtector();
+ return isolate->heap()->undefined_value();
+}
+
} // namespace internal
} // namespace v8
« src/builtins/builtins-array.cc ('K') | « src/runtime/runtime.h ('k') | src/v8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698