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

Unified Diff: src/x64/full-codegen-x64.cc

Issue 650073002: vector-based ICs did not update type feedback counts correctly. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Ports. Created 6 years, 2 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/x64/full-codegen-x64.cc
diff --git a/src/x64/full-codegen-x64.cc b/src/x64/full-codegen-x64.cc
index 0d931141ed0652d6028d80299fba1a02c29520d0..a12c630453e07fc76d6f2c2755f69d2b99ff23b2 100644
--- a/src/x64/full-codegen-x64.cc
+++ b/src/x64/full-codegen-x64.cc
@@ -1149,7 +1149,8 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) {
// No need for a write barrier, we are storing a Smi in the feedback vector.
__ Move(rbx, FeedbackVector());
- __ Move(FieldOperand(rbx, FixedArray::OffsetOfElementAt(slot.ToInt())),
+ int vector_index = FeedbackVector()->GetIndex(slot);
+ __ Move(FieldOperand(rbx, FixedArray::OffsetOfElementAt(vector_index)),
TypeFeedbackVector::MegamorphicSentinel(isolate()));
__ Move(rbx, Smi::FromInt(1)); // Smi indicates slow check
__ movp(rcx, Operand(rsp, 0 * kPointerSize)); // Get enumerated object
@@ -2800,9 +2801,7 @@ void FullCodeGenerator::EmitCall(Call* expr, CallICState::CallType call_type) {
isolate(), arg_count, call_type);
__ Move(rdx, SmiFromSlot(expr->CallFeedbackSlot()));
__ movp(rdi, Operand(rsp, (arg_count + 1) * kPointerSize));
- // Don't assign a type feedback id to the IC, since type feedback is provided
- // by the vector above.
- CallIC(ic);
+ CallIC(ic, TypeFeedbackId(expr->CallFeedbackSlot().ToInt()));
RecordJSReturnSite(expr);

Powered by Google App Engine
This is Rietveld 408576698