| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/lookup.h" | 5 #include "src/lookup.h" |
| 6 | 6 |
| 7 #include "src/bootstrapper.h" | 7 #include "src/bootstrapper.h" |
| 8 #include "src/deoptimizer.h" | 8 #include "src/deoptimizer.h" |
| 9 #include "src/elements.h" | 9 #include "src/elements.h" |
| 10 #include "src/field-type.h" | 10 #include "src/field-type.h" |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 while (!context->IsUndefined()) { | 164 while (!context->IsUndefined()) { |
| 165 Context* current_context = Context::cast(context); | 165 Context* current_context = Context::cast(context); |
| 166 if (current_context->get(index) == *holder_) { | 166 if (current_context->get(index) == *holder_) { |
| 167 return true; | 167 return true; |
| 168 } | 168 } |
| 169 context = current_context->get(Context::NEXT_CONTEXT_LINK); | 169 context = current_context->get(Context::NEXT_CONTEXT_LINK); |
| 170 } | 170 } |
| 171 return false; | 171 return false; |
| 172 } | 172 } |
| 173 | 173 |
| 174 void LookupIterator::UpdateProtector() { | 174 void LookupIterator::InternalUpdateProtector() { |
| 175 if (!FLAG_harmony_species) return; | |
| 176 | |
| 177 if (IsElement()) return; | |
| 178 if (isolate_->bootstrapper()->IsActive()) return; | 175 if (isolate_->bootstrapper()->IsActive()) return; |
| 179 if (!isolate_->IsArraySpeciesLookupChainIntact()) return; | 176 if (!isolate_->IsArraySpeciesLookupChainIntact()) return; |
| 180 | 177 |
| 181 if (*name_ == heap()->constructor_string()) { | 178 if (*name_ == heap()->constructor_string()) { |
| 182 // Setting the constructor property could change an instance's @@species | 179 // Setting the constructor property could change an instance's @@species |
| 183 if (holder_->IsJSArray()) { | 180 if (holder_->IsJSArray()) { |
| 184 isolate_->CountUsage( | 181 isolate_->CountUsage( |
| 185 v8::Isolate::UseCounterFeature::kArrayInstanceConstructorModified); | 182 v8::Isolate::UseCounterFeature::kArrayInstanceConstructorModified); |
| 186 isolate_->InvalidateArraySpeciesProtector(); | 183 isolate_->InvalidateArraySpeciesProtector(); |
| 187 } else if (holder_->map()->is_prototype_map()) { | 184 } else if (holder_->map()->is_prototype_map()) { |
| (...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 746 case v8::internal::kAccessor: | 743 case v8::internal::kAccessor: |
| 747 return ACCESSOR; | 744 return ACCESSOR; |
| 748 } | 745 } |
| 749 | 746 |
| 750 UNREACHABLE(); | 747 UNREACHABLE(); |
| 751 return state_; | 748 return state_; |
| 752 } | 749 } |
| 753 | 750 |
| 754 } // namespace internal | 751 } // namespace internal |
| 755 } // namespace v8 | 752 } // namespace v8 |
| OLD | NEW |