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

Unified Diff: src/interpreter/bytecode-generator.cc

Issue 2122183002: [Interpreter] Collect type feedback for calls in the bytecode handler (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updated cctest.status Created 4 years, 5 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/interpreter/bytecode-generator.cc
diff --git a/src/interpreter/bytecode-generator.cc b/src/interpreter/bytecode-generator.cc
index bdc5370f5a30ac5779f65f6999c3470256a712cf..8ac0def9b653cc0047678c38900ac1609da6fc40 100644
--- a/src/interpreter/bytecode-generator.cc
+++ b/src/interpreter/bytecode-generator.cc
@@ -2522,8 +2522,16 @@ void BytecodeGenerator::VisitCall(Call* expr) {
}
builder()->SetExpressionPosition(expr);
- builder()->Call(callee, receiver, 1 + args->length(),
- feedback_index(expr->CallFeedbackICSlot()),
+ int feedback_slot_index = feedback_index(expr->CallFeedbackICSlot());
+ if (expr->CallFeedbackICSlot().IsInvalid()) {
+ DCHECK(call_type == Call::POSSIBLY_EVAL_CALL);
+ // Valid type feedback slots can only be greater than kReservedIndexCount.
+ // We use 0 to indicate an invalid slot it. Statically assert that 0 cannot
+ // be a valid slot id.
+ STATIC_ASSERT(TypeFeedbackVector::kReservedIndexCount > 0);
+ feedback_slot_index = 0;
mythria 2016/07/12 09:01:34 @mvstanton, this is where we pass 0 for invalid sl
rmcilroy 2016/07/12 09:36:20 I think feedback_slot_index will already be zero f
mvstanton 2016/07/12 13:25:22 Sounds good.
mythria 2016/07/12 15:20:35 As discussed offline, it will be 0 but it is depen
+ }
+ builder()->Call(callee, receiver, 1 + args->length(), feedback_slot_index,
expr->tail_call_mode());
execution_result()->SetResultInAccumulator();
}

Powered by Google App Engine
This is Rietveld 408576698