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

Side by Side Diff: src/lookup.cc

Issue 1180753005: Cleanup typed array setters, the property is guaranteed to be there. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 5 years, 6 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 unified diff | Download patch
« no previous file with comments | « src/elements.cc ('k') | src/objects.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 Handle<Object> value = FetchValue(); 413 Handle<Object> value = FetchValue();
414 return value; 414 return value;
415 } 415 }
416 416
417 417
418 void LookupIterator::WriteDataValue(Handle<Object> value) { 418 void LookupIterator::WriteDataValue(Handle<Object> value) {
419 DCHECK_EQ(DATA, state_); 419 DCHECK_EQ(DATA, state_);
420 Handle<JSObject> holder = GetHolder<JSObject>(); 420 Handle<JSObject> holder = GetHolder<JSObject>();
421 if (IsElement()) { 421 if (IsElement()) {
422 ElementsAccessor* accessor = holder->GetElementsAccessor(); 422 ElementsAccessor* accessor = holder->GetElementsAccessor();
423 accessor->Set(holder, index_, value); 423 accessor->Set(handle(holder->elements()), index_, value);
424 } else if (holder->IsGlobalObject()) { 424 } else if (holder->IsGlobalObject()) {
425 Handle<GlobalDictionary> property_dictionary = 425 Handle<GlobalDictionary> property_dictionary =
426 handle(holder->global_dictionary()); 426 handle(holder->global_dictionary());
427 PropertyCell::UpdateCell(property_dictionary, dictionary_entry(), value, 427 PropertyCell::UpdateCell(property_dictionary, dictionary_entry(), value,
428 property_details_); 428 property_details_);
429 } else if (holder_map_->is_dictionary_map()) { 429 } else if (holder_map_->is_dictionary_map()) {
430 Handle<NameDictionary> property_dictionary = 430 Handle<NameDictionary> property_dictionary =
431 handle(holder->property_dictionary()); 431 handle(holder->property_dictionary());
432 property_dictionary->ValueAtPut(dictionary_entry(), *value); 432 property_dictionary->ValueAtPut(dictionary_entry(), *value);
433 } else if (property_details_.type() == v8::internal::DATA) { 433 } else if (property_details_.type() == v8::internal::DATA) {
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 case InterceptorState::kSkipNonMasking: 499 case InterceptorState::kSkipNonMasking:
500 return true; 500 return true;
501 case InterceptorState::kProcessNonMasking: 501 case InterceptorState::kProcessNonMasking:
502 return false; 502 return false;
503 } 503 }
504 } 504 }
505 return interceptor_state_ == InterceptorState::kProcessNonMasking; 505 return interceptor_state_ == InterceptorState::kProcessNonMasking;
506 } 506 }
507 } // namespace internal 507 } // namespace internal
508 } // namespace v8 508 } // namespace v8
OLDNEW
« no previous file with comments | « src/elements.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698