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

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

Issue 2624753002: [ignition] Use Smis directly for type feedback (Closed)
Patch Set: Created 3 years, 11 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 97f77e22244d1b043c4cadfe483a075a9425b256..c362a4fe9910983c8d2fa5f2ecee62b139641d54 100644
--- a/src/code-stub-assembler.cc
+++ b/src/code-stub-assembler.cc
@@ -131,6 +131,13 @@ Node* CodeStubAssembler::SelectTaggedConstant(Node* condition, Node* true_value,
MachineRepresentation::kTagged);
}
+Node* CodeStubAssembler::SelectSmiConstant(Node* condition, Smi* true_value,
+ Smi* false_value) {
+ return SelectConstant(condition, SmiConstant(true_value),
+ SmiConstant(false_value),
+ MachineRepresentation::kTaggedSigned);
+}
+
Node* CodeStubAssembler::NoContextConstant() { return NumberConstant(0); }
#define HEAP_CONSTANT_ACCESSOR(rootName, name) \
@@ -5463,11 +5470,9 @@ void CodeStubAssembler::UpdateFeedback(Node* feedback,
// 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.
- // TODO(interpreter): Consider passing the feedback as Smi already to avoid
- // the tagging completely.
Node* previous_feedback =
LoadFixedArrayElement(type_feedback_vector, slot_id);
- Node* combined_feedback = SmiOr(previous_feedback, SmiFromWord32(feedback));
+ Node* combined_feedback = SmiOr(previous_feedback, feedback);
StoreFixedArrayElement(type_feedback_vector, slot_id, combined_feedback,
SKIP_WRITE_BARRIER);
}
« src/code-stub-assembler.h ('K') | « src/code-stub-assembler.h ('k') | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698