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

Unified Diff: src/isolate.cc

Issue 2465253011: Fastpath some spread-call desugaring. (Closed)
Patch Set: Handles double arrays too 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/isolate.h ('k') | src/isolate-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index c55e00eefa54897c10c4e9fc1f1d3aefaa6bc205..b5613a8ca50e6f975d3c57c3c25f499182ed61e8 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -2822,7 +2822,7 @@ bool Isolate::IsFastArrayConstructorPrototypeChainIntact() {
PropertyCell* no_elements_cell = heap()->array_protector();
bool cell_reports_intact =
no_elements_cell->value()->IsSmi() &&
- Smi::cast(no_elements_cell->value())->value() == kArrayProtectorValid;
+ Smi::cast(no_elements_cell->value())->value() == kProtectorValid;
#ifdef DEBUG
Map* root_array_map =
@@ -2881,7 +2881,7 @@ bool Isolate::IsIsConcatSpreadableLookupChainIntact() {
Cell* is_concat_spreadable_cell = heap()->is_concat_spreadable_protector();
bool is_is_concat_spreadable_set =
Smi::cast(is_concat_spreadable_cell->value())->value() ==
- kArrayProtectorInvalid;
+ kProtectorInvalid;
#ifdef DEBUG
Map* root_array_map = get_initial_js_array_map(GetInitialFastElementsKind());
if (root_array_map == NULL) {
@@ -2916,7 +2916,7 @@ void Isolate::UpdateArrayProtectorOnSetElement(Handle<JSObject> object) {
if (!IsArrayOrObjectPrototype(*object)) return;
PropertyCell::SetValueWithInvalidation(
factory()->array_protector(),
- handle(Smi::FromInt(kArrayProtectorInvalid), this));
+ handle(Smi::FromInt(kProtectorInvalid), this));
}
void Isolate::InvalidateHasInstanceProtector() {
@@ -2924,7 +2924,7 @@ void Isolate::InvalidateHasInstanceProtector() {
DCHECK(IsHasInstanceLookupChainIntact());
PropertyCell::SetValueWithInvalidation(
factory()->has_instance_protector(),
- handle(Smi::FromInt(kArrayProtectorInvalid), this));
+ handle(Smi::FromInt(kProtectorInvalid), this));
DCHECK(!IsHasInstanceLookupChainIntact());
}
@@ -2932,15 +2932,14 @@ void Isolate::InvalidateIsConcatSpreadableProtector() {
DCHECK(factory()->is_concat_spreadable_protector()->value()->IsSmi());
DCHECK(IsIsConcatSpreadableLookupChainIntact());
factory()->is_concat_spreadable_protector()->set_value(
- Smi::FromInt(kArrayProtectorInvalid));
+ Smi::FromInt(kProtectorInvalid));
DCHECK(!IsIsConcatSpreadableLookupChainIntact());
}
void Isolate::InvalidateArraySpeciesProtector() {
DCHECK(factory()->species_protector()->value()->IsSmi());
DCHECK(IsArraySpeciesLookupChainIntact());
- factory()->species_protector()->set_value(
- Smi::FromInt(kArrayProtectorInvalid));
+ factory()->species_protector()->set_value(Smi::FromInt(kProtectorInvalid));
DCHECK(!IsArraySpeciesLookupChainIntact());
}
@@ -2949,10 +2948,18 @@ void Isolate::InvalidateStringLengthOverflowProtector() {
DCHECK(IsStringLengthOverflowIntact());
PropertyCell::SetValueWithInvalidation(
factory()->string_length_protector(),
- handle(Smi::FromInt(kArrayProtectorInvalid), this));
+ handle(Smi::FromInt(kProtectorInvalid), this));
DCHECK(!IsStringLengthOverflowIntact());
}
+void Isolate::InvalidateArrayIteratorProtector() {
+ DCHECK(factory()->array_iterator_protector()->value()->IsSmi());
+ DCHECK(IsArrayIteratorLookupChainIntact());
+ factory()->array_iterator_protector()->set_value(
+ Smi::FromInt(kProtectorInvalid));
+ DCHECK(!IsArrayIteratorLookupChainIntact());
+}
+
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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698