| 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/v8.h" | 5 #include "src/v8.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/lookup.h" | 9 #include "src/lookup.h" |
| 10 #include "src/lookup-inl.h" | 10 #include "src/lookup-inl.h" |
| (...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 Handle<Object> value = FetchValue(); | 407 Handle<Object> value = FetchValue(); |
| 408 return value; | 408 return value; |
| 409 } | 409 } |
| 410 | 410 |
| 411 | 411 |
| 412 void LookupIterator::WriteDataValue(Handle<Object> value) { | 412 void LookupIterator::WriteDataValue(Handle<Object> value) { |
| 413 DCHECK_EQ(DATA, state_); | 413 DCHECK_EQ(DATA, state_); |
| 414 Handle<JSObject> holder = GetHolder<JSObject>(); | 414 Handle<JSObject> holder = GetHolder<JSObject>(); |
| 415 if (IsElement()) { | 415 if (IsElement()) { |
| 416 ElementsAccessor* accessor = holder->GetElementsAccessor(); | 416 ElementsAccessor* accessor = holder->GetElementsAccessor(); |
| 417 accessor->Set(holder->elements(), index_, *value); | 417 accessor->Set(holder->elements(), number_, *value); |
| 418 } else if (holder->IsGlobalObject()) { | 418 } else if (holder->IsGlobalObject()) { |
| 419 Handle<GlobalDictionary> property_dictionary = | 419 Handle<GlobalDictionary> property_dictionary = |
| 420 handle(holder->global_dictionary()); | 420 handle(holder->global_dictionary()); |
| 421 PropertyCell::UpdateCell(property_dictionary, dictionary_entry(), value, | 421 PropertyCell::UpdateCell(property_dictionary, dictionary_entry(), value, |
| 422 property_details_); | 422 property_details_); |
| 423 } else if (holder_map_->is_dictionary_map()) { | 423 } else if (holder_map_->is_dictionary_map()) { |
| 424 NameDictionary* property_dictionary = holder->property_dictionary(); | 424 NameDictionary* property_dictionary = holder->property_dictionary(); |
| 425 property_dictionary->ValueAtPut(dictionary_entry(), *value); | 425 property_dictionary->ValueAtPut(dictionary_entry(), *value); |
| 426 } else if (property_details_.type() == v8::internal::DATA) { | 426 } else if (property_details_.type() == v8::internal::DATA) { |
| 427 holder->WriteToField(descriptor_number(), *value); | 427 holder->WriteToField(descriptor_number(), *value); |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 492 case InterceptorState::kSkipNonMasking: | 492 case InterceptorState::kSkipNonMasking: |
| 493 return true; | 493 return true; |
| 494 case InterceptorState::kProcessNonMasking: | 494 case InterceptorState::kProcessNonMasking: |
| 495 return false; | 495 return false; |
| 496 } | 496 } |
| 497 } | 497 } |
| 498 return interceptor_state_ == InterceptorState::kProcessNonMasking; | 498 return interceptor_state_ == InterceptorState::kProcessNonMasking; |
| 499 } | 499 } |
| 500 } // namespace internal | 500 } // namespace internal |
| 501 } // namespace v8 | 501 } // namespace v8 |
| OLD | NEW |