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

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

Issue 2360233004: [interpreter] Fix word32 vs word64 bug in CodeStubAssembler::UpdateFeedback. (Closed)
Patch Set: Fix cctest, remove some dead code. 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
« no previous file with comments | « src/code-stub-assembler.h ('k') | test/cctest/interpreter/test-interpreter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stub-assembler.cc
diff --git a/src/code-stub-assembler.cc b/src/code-stub-assembler.cc
index 005d5e7f2e32f2f4c4b371fcf8798b159b069193..d3cbcc468465d70535d1049e07737ba7fdef4f7b 100644
--- a/src/code-stub-assembler.cc
+++ b/src/code-stub-assembler.cc
@@ -3994,17 +3994,16 @@ compiler::Node* CodeStubAssembler::LoadTypeFeedbackVectorForStub() {
void CodeStubAssembler::UpdateFeedback(compiler::Node* feedback,
compiler::Node* type_feedback_vector,
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.
+ // TODO(interpreter): Consider passing the feedback as Smi already to avoid
+ // the tagging completely.
Node* previous_feedback =
LoadFixedArrayElement(type_feedback_vector, slot_id);
- 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);
+ Node* combined_feedback = SmiOr(previous_feedback, SmiFromWord32(feedback));
+ StoreFixedArrayElement(type_feedback_vector, slot_id, combined_feedback,
+ SKIP_WRITE_BARRIER);
}
compiler::Node* CodeStubAssembler::LoadReceiverMap(compiler::Node* receiver) {
« no previous file with comments | « src/code-stub-assembler.h ('k') | test/cctest/interpreter/test-interpreter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698