Index: src/code-stub-assembler.cc |
diff --git a/src/code-stub-assembler.cc b/src/code-stub-assembler.cc |
index a8489d2a98a1b20dce0bbd8961ef073bfb425830..10ab67aef5397a9e1e09b978671b28ed292748b7 100644 |
--- a/src/code-stub-assembler.cc |
+++ b/src/code-stub-assembler.cc |
@@ -3582,30 +3582,15 @@ void CodeStubAssembler::UpdateFeedback(compiler::Node* feedback, |
compiler::Node* slot_id) { |
Label combine_feedback(this), record_feedback(this), end(this); |
+ // This method is used for binary op and compare feedback. These |
+ // vector nodes are initialized with a smi 0, so we can simply OR |
+ // our new feedback in place. |
Node* previous_feedback = |
LoadFixedArrayElement(type_feedback_vector, slot_id); |
- Node* is_uninitialized = WordEqual( |
- previous_feedback, |
- HeapConstant(TypeFeedbackVector::UninitializedSentinel(isolate()))); |
- BranchIf(is_uninitialized, &record_feedback, &combine_feedback); |
- |
- Bind(&record_feedback); |
- { |
- StoreFixedArrayElement(type_feedback_vector, slot_id, SmiTag(feedback), |
- SKIP_WRITE_BARRIER); |
- Goto(&end); |
- } |
- |
- Bind(&combine_feedback); |
- { |
- Node* untagged_previous_feedback = SmiUntag(previous_feedback); |
- Node* combined_feedback = Word32Or(untagged_previous_feedback, feedback); |
- StoreFixedArrayElement(type_feedback_vector, slot_id, |
- SmiTag(combined_feedback), SKIP_WRITE_BARRIER); |
- Goto(&end); |
- } |
- |
- Bind(&end); |
+ Node* untagged_previous_feedback = SmiUntag(previous_feedback); |
+ Node* combined_feedback = Word32Or(untagged_previous_feedback, feedback); |
+ StoreFixedArrayElement(type_feedback_vector, slot_id, |
+ SmiTag(combined_feedback), SKIP_WRITE_BARRIER); |
} |
compiler::Node* CodeStubAssembler::LoadReceiverMap(compiler::Node* receiver) { |