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

Unified Diff: src/objects.cc

Issue 1409123003: [runtime] Avoid @@isConcatSpreadable lookup for fast path Array.prototype.concat (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: merging with master Created 4 years, 7 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
« no previous file with comments | « src/lookup.cc ('k') | test/cctest/heap/test-heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 5648f667b841d601fc7810ab5f06b2eeb89d0c4d..b8ee1e415bfe9c19caf1f0abe0e092d5ce6e6f6e 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -1561,7 +1561,6 @@ bool Object::SameValueZero(Object* other) {
MaybeHandle<Object> Object::ArraySpeciesConstructor(
Isolate* isolate, Handle<Object> original_array) {
- Handle<Context> native_context = isolate->native_context();
Handle<Object> default_species = isolate->array_function();
if (!FLAG_harmony_species) {
return default_species;
@@ -1586,7 +1585,7 @@ MaybeHandle<Object> Object::ArraySpeciesConstructor(
isolate, constructor_context,
JSReceiver::GetFunctionRealm(Handle<JSReceiver>::cast(constructor)),
Object);
- if (*constructor_context != *native_context &&
+ if (*constructor_context != *isolate->native_context() &&
*constructor == constructor_context->array_function()) {
constructor = isolate->factory()->undefined_value();
}
@@ -4154,6 +4153,7 @@ Maybe<bool> Object::SetPropertyInternal(LookupIterator* it,
LanguageMode language_mode,
StoreFromKeyed store_mode,
bool* found) {
+ it->UpdateProtector();
DCHECK(it->IsFound());
ShouldThrow should_throw =
is_sloppy(language_mode) ? DONT_THROW : THROW_ON_ERROR;
@@ -4236,7 +4236,6 @@ Maybe<bool> Object::SetPropertyInternal(LookupIterator* it,
Maybe<bool> Object::SetProperty(LookupIterator* it, Handle<Object> value,
LanguageMode language_mode,
StoreFromKeyed store_mode) {
- it->UpdateProtector();
if (it->IsFound()) {
bool found = true;
Maybe<bool> result =
@@ -4264,7 +4263,6 @@ Maybe<bool> Object::SetSuperProperty(LookupIterator* it, Handle<Object> value,
StoreFromKeyed store_mode) {
Isolate* isolate = it->isolate();
- it->UpdateProtector();
if (it->IsFound()) {
bool found = true;
Maybe<bool> result =
@@ -4272,6 +4270,8 @@ Maybe<bool> Object::SetSuperProperty(LookupIterator* it, Handle<Object> value,
if (found) return result;
}
+ it->UpdateProtector();
+
// The property either doesn't exist on the holder or exists there as a data
// property.
@@ -4492,6 +4492,7 @@ Maybe<bool> Object::AddDataProperty(LookupIterator* it, Handle<Object> value,
JSObject::ValidateElements(receiver);
return result;
} else {
+ it->UpdateProtector();
// Migrate to the most up-to-date map that will be able to store |value|
// under it->name() with |attributes|.
it->PrepareTransitionToDataProperty(receiver, value, attributes,
« no previous file with comments | « src/lookup.cc ('k') | test/cctest/heap/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698