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

Unified Diff: src/interpreter/bytecode-array-builder.cc

Issue 2286273002: [interpreter] Make the comparison bytecode handlers collect type feedback. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix. Created 4 years, 4 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-array-builder.cc
diff --git a/src/interpreter/bytecode-array-builder.cc b/src/interpreter/bytecode-array-builder.cc
index 35997e7d4be2a742e50a25ed16a773a2251465d4..1f069954992d8a523a1d51496285301a0c884adb 100644
--- a/src/interpreter/bytecode-array-builder.cc
+++ b/src/interpreter/bytecode-array-builder.cc
@@ -175,9 +175,14 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::TypeOf() {
return *this;
}
-BytecodeArrayBuilder& BytecodeArrayBuilder::CompareOperation(Token::Value op,
- Register reg) {
- Output(BytecodeForCompareOperation(op), RegisterOperand(reg));
+BytecodeArrayBuilder& BytecodeArrayBuilder::CompareOperation(
+ Token::Value op, Register reg, int feedback_slot) {
+ if (op == Token::INSTANCEOF || op == Token::IN) {
+ Output(BytecodeForCompareOperation(op), RegisterOperand(reg));
+ } else {
+ Output(BytecodeForCompareOperation(op), RegisterOperand(reg),
+ UnsignedOperand(feedback_slot));
+ }
return *this;
}

Powered by Google App Engine
This is Rietveld 408576698