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

Unified Diff: src/compiler/bytecode-graph-builder.cc

Issue 1487973002: [turbofan] Add binary operation hints for javascript operators. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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/compiler/bytecode-graph-builder.cc
diff --git a/src/compiler/bytecode-graph-builder.cc b/src/compiler/bytecode-graph-builder.cc
index 03789b343904a2e9d72c708e3e767dc34e1a79f2..1aa8187dee5782bffd231459a2188b297a2e41b4 100644
--- a/src/compiler/bytecode-graph-builder.cc
+++ b/src/compiler/bytecode-graph-builder.cc
@@ -832,67 +832,79 @@ void BytecodeGraphBuilder::BuildBinaryOp(
void BytecodeGraphBuilder::VisitAdd(
const interpreter::BytecodeArrayIterator& iterator) {
- BuildBinaryOp(javascript()->Add(language_mode()), iterator);
+ BinaryOperationHints hints = BinaryOperationHints::Any();
+ BuildBinaryOp(javascript()->Add(language_mode(), hints), iterator);
}
void BytecodeGraphBuilder::VisitSub(
const interpreter::BytecodeArrayIterator& iterator) {
- BuildBinaryOp(javascript()->Subtract(language_mode()), iterator);
+ BinaryOperationHints hints = BinaryOperationHints::Any();
+ BuildBinaryOp(javascript()->Subtract(language_mode(), hints), iterator);
}
void BytecodeGraphBuilder::VisitMul(
const interpreter::BytecodeArrayIterator& iterator) {
- BuildBinaryOp(javascript()->Multiply(language_mode()), iterator);
+ BinaryOperationHints hints = BinaryOperationHints::Any();
+ BuildBinaryOp(javascript()->Multiply(language_mode(), hints), iterator);
}
void BytecodeGraphBuilder::VisitDiv(
const interpreter::BytecodeArrayIterator& iterator) {
- BuildBinaryOp(javascript()->Divide(language_mode()), iterator);
+ BinaryOperationHints hints = BinaryOperationHints::Any();
+ BuildBinaryOp(javascript()->Divide(language_mode(), hints), iterator);
}
void BytecodeGraphBuilder::VisitMod(
const interpreter::BytecodeArrayIterator& iterator) {
- BuildBinaryOp(javascript()->Modulus(language_mode()), iterator);
+ BinaryOperationHints hints = BinaryOperationHints::Any();
+ BuildBinaryOp(javascript()->Modulus(language_mode(), hints), iterator);
}
void BytecodeGraphBuilder::VisitBitwiseOr(
const interpreter::BytecodeArrayIterator& iterator) {
- BuildBinaryOp(javascript()->BitwiseOr(language_mode()), iterator);
+ BinaryOperationHints hints = BinaryOperationHints::Any();
+ BuildBinaryOp(javascript()->BitwiseOr(language_mode(), hints), iterator);
}
void BytecodeGraphBuilder::VisitBitwiseXor(
const interpreter::BytecodeArrayIterator& iterator) {
- BuildBinaryOp(javascript()->BitwiseXor(language_mode()), iterator);
+ BinaryOperationHints hints = BinaryOperationHints::Any();
+ BuildBinaryOp(javascript()->BitwiseXor(language_mode(), hints), iterator);
}
void BytecodeGraphBuilder::VisitBitwiseAnd(
const interpreter::BytecodeArrayIterator& iterator) {
- BuildBinaryOp(javascript()->BitwiseAnd(language_mode()), iterator);
+ BinaryOperationHints hints = BinaryOperationHints::Any();
+ BuildBinaryOp(javascript()->BitwiseAnd(language_mode(), hints), iterator);
}
void BytecodeGraphBuilder::VisitShiftLeft(
const interpreter::BytecodeArrayIterator& iterator) {
- BuildBinaryOp(javascript()->ShiftLeft(language_mode()), iterator);
+ BinaryOperationHints hints = BinaryOperationHints::Any();
+ BuildBinaryOp(javascript()->ShiftLeft(language_mode(), hints), iterator);
}
void BytecodeGraphBuilder::VisitShiftRight(
const interpreter::BytecodeArrayIterator& iterator) {
- BuildBinaryOp(javascript()->ShiftRight(language_mode()), iterator);
+ BinaryOperationHints hints = BinaryOperationHints::Any();
+ BuildBinaryOp(javascript()->ShiftRight(language_mode(), hints), iterator);
}
void BytecodeGraphBuilder::VisitShiftRightLogical(
const interpreter::BytecodeArrayIterator& iterator) {
- BuildBinaryOp(javascript()->ShiftRightLogical(language_mode()), iterator);
+ BinaryOperationHints hints = BinaryOperationHints::Any();
+ BuildBinaryOp(javascript()->ShiftRightLogical(language_mode(), hints),
+ iterator);
}

Powered by Google App Engine
This is Rietveld 408576698