Chromium Code Reviews

Unified Diff: src/isolate.cc

Issue 2484003002: [builtins] implement JSBuiltinReducer for ArrayIteratorNext() (Closed)
Patch Set: bunch of changes Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: src/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index 995b2628becda2e6e9ead6f69e46c4563636535e..66c7341bddafc11f31ffdc0d68f01e8491b3fefd 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -2951,6 +2951,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);
« src/compiler/js-create-lowering.cc ('K') | « src/isolate.h ('k') | src/isolate-inl.h » ('j') | no next file with comments »

Powered by Google App Engine