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

Unified Diff: src/isolate.cc

Issue 2484003002: [builtins] implement JSBuiltinReducer for ArrayIteratorNext() (Closed)
Patch Set: add (some) test coverage, and fix some bugs found by it 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
Index: src/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index b0139a70a68e4fc4f32bdf94c4833cc233087986..f66344cfe9c7a5cd827c504cd2591d9751f01946 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -2953,6 +2953,14 @@ void Isolate::InvalidateStringLengthOverflowProtector() {
DCHECK(!IsStringLengthOverflowIntact());
}
+void Isolate::InvalidateArrayIteratorProtector() {
+ DCHECK(factory()->array_iterator_protector()->value()->IsSmi());
+ DCHECK(CanInlineArrayIterator());
+ factory()->array_iterator_protector()->set_value(
+ Smi::FromInt(kArrayProtectorInvalid));
+ DCHECK(!CanInlineArrayIterator());
+}
+
bool Isolate::IsAnyInitialArrayPrototype(Handle<JSArray> array) {
DisallowHeapAllocation no_gc;
return IsInAnyContext(*array, Context::INITIAL_ARRAY_PROTOTYPE_INDEX);
« no previous file with comments | « src/isolate.h ('k') | src/isolate-inl.h » ('j') | test/mjsunit/es6/array-iterator-turbo.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698