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

Unified Diff: src/code-stub-assembler.cc

Issue 2342853002: [TypeFeedbackVector] special ic slots for interpreter compare/binary ops. (Closed)
Patch Set: Code comments. Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
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) {

Powered by Google App Engine
This is Rietveld 408576698