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

Side by Side Diff: src/code-stub-assembler.cc

Issue 2821213004: [keyed-store-generic] Update protectors if needed (Closed)
Patch Set: --no-stress-opt Created 3 years, 8 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/code-stub-assembler.h ('k') | src/ic/keyed-store-generic.cc » ('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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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 #include "src/code-stub-assembler.h" 4 #include "src/code-stub-assembler.h"
5 #include "src/code-factory.h" 5 #include "src/code-factory.h"
6 #include "src/frames-inl.h" 6 #include "src/frames-inl.h"
7 #include "src/frames.h" 7 #include "src/frames.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 5778 matching lines...) Expand 10 before | Expand all | Expand 10 after
5789 Node* slot_id) { 5789 Node* slot_id) {
5790 // This method is used for binary op and compare feedback. These 5790 // This method is used for binary op and compare feedback. These
5791 // vector nodes are initialized with a smi 0, so we can simply OR 5791 // vector nodes are initialized with a smi 0, so we can simply OR
5792 // our new feedback in place. 5792 // our new feedback in place.
5793 Node* previous_feedback = LoadFixedArrayElement(feedback_vector, slot_id); 5793 Node* previous_feedback = LoadFixedArrayElement(feedback_vector, slot_id);
5794 Node* combined_feedback = SmiOr(previous_feedback, feedback); 5794 Node* combined_feedback = SmiOr(previous_feedback, feedback);
5795 StoreFixedArrayElement(feedback_vector, slot_id, combined_feedback, 5795 StoreFixedArrayElement(feedback_vector, slot_id, combined_feedback,
5796 SKIP_WRITE_BARRIER); 5796 SKIP_WRITE_BARRIER);
5797 } 5797 }
5798 5798
5799 void CodeStubAssembler::CheckForAssociatedProtector(Node* name,
5800 Label* if_protector) {
5801 // This list must be kept in sync with LookupIterator::UpdateProtector!
5802 // TODO(jkummerow): Would it be faster to have a bit in Symbol::flags()?
5803 GotoIf(WordEqual(name, LoadRoot(Heap::kconstructor_stringRootIndex)),
5804 if_protector);
5805 GotoIf(WordEqual(name, LoadRoot(Heap::kiterator_symbolRootIndex)),
5806 if_protector);
5807 GotoIf(WordEqual(name, LoadRoot(Heap::kspecies_symbolRootIndex)),
5808 if_protector);
5809 GotoIf(WordEqual(name, LoadRoot(Heap::kis_concat_spreadable_symbolRootIndex)),
5810 if_protector);
5811 // Fall through if no case matched.
5812 }
5813
5799 Node* CodeStubAssembler::LoadReceiverMap(Node* receiver) { 5814 Node* CodeStubAssembler::LoadReceiverMap(Node* receiver) {
5800 return Select(TaggedIsSmi(receiver), 5815 return Select(TaggedIsSmi(receiver),
5801 [=] { return LoadRoot(Heap::kHeapNumberMapRootIndex); }, 5816 [=] { return LoadRoot(Heap::kHeapNumberMapRootIndex); },
5802 [=] { return LoadMap(receiver); }, 5817 [=] { return LoadMap(receiver); },
5803 MachineRepresentation::kTagged); 5818 MachineRepresentation::kTagged);
5804 } 5819 }
5805 5820
5806 Node* CodeStubAssembler::TryToIntptr(Node* key, Label* miss) { 5821 Node* CodeStubAssembler::TryToIntptr(Node* key, Label* miss) {
5807 VARIABLE(var_intptr_key, MachineType::PointerRepresentation()); 5822 VARIABLE(var_intptr_key, MachineType::PointerRepresentation());
5808 Label done(this, &var_intptr_key), key_is_smi(this); 5823 Label done(this, &var_intptr_key), key_is_smi(this);
(...skipping 2781 matching lines...) Expand 10 before | Expand all | Expand 10 after
8590 formatted.c_str(), TENURED); 8605 formatted.c_str(), TENURED);
8591 CallRuntime(Runtime::kGlobalPrint, NoContextConstant(), 8606 CallRuntime(Runtime::kGlobalPrint, NoContextConstant(),
8592 HeapConstant(string)); 8607 HeapConstant(string));
8593 } 8608 }
8594 CallRuntime(Runtime::kDebugPrint, NoContextConstant(), tagged_value); 8609 CallRuntime(Runtime::kDebugPrint, NoContextConstant(), tagged_value);
8595 #endif 8610 #endif
8596 } 8611 }
8597 8612
8598 } // namespace internal 8613 } // namespace internal
8599 } // namespace v8 8614 } // namespace v8
OLDNEW
« no previous file with comments | « src/code-stub-assembler.h ('k') | src/ic/keyed-store-generic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698