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

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

Issue 2035383003: [turbofan] Type feedback for numeric comparisons. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase, pure ops Created 4 years, 6 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/compiler/ast-graph-builder.cc ('k') | src/compiler/js-call-reducer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/bytecode-graph-builder.cc
diff --git a/src/compiler/bytecode-graph-builder.cc b/src/compiler/bytecode-graph-builder.cc
index 42e416598a2253942eaa718ed22a34e346cefeeb..66925c42a974aedf867aac165268420606054b00 100644
--- a/src/compiler/bytecode-graph-builder.cc
+++ b/src/compiler/bytecode-graph-builder.cc
@@ -1224,31 +1224,38 @@ void BytecodeGraphBuilder::BuildCompareOp(const Operator* js_op) {
}
void BytecodeGraphBuilder::VisitTestEqual() {
- BuildCompareOp(javascript()->Equal());
+ CompareOperationHints hints = CompareOperationHints::Any();
+ BuildCompareOp(javascript()->Equal(hints));
}
void BytecodeGraphBuilder::VisitTestNotEqual() {
- BuildCompareOp(javascript()->NotEqual());
+ CompareOperationHints hints = CompareOperationHints::Any();
+ BuildCompareOp(javascript()->NotEqual(hints));
}
void BytecodeGraphBuilder::VisitTestEqualStrict() {
- BuildCompareOp(javascript()->StrictEqual());
+ CompareOperationHints hints = CompareOperationHints::Any();
+ BuildCompareOp(javascript()->StrictEqual(hints));
}
void BytecodeGraphBuilder::VisitTestLessThan() {
- BuildCompareOp(javascript()->LessThan());
+ CompareOperationHints hints = CompareOperationHints::Any();
+ BuildCompareOp(javascript()->LessThan(hints));
}
void BytecodeGraphBuilder::VisitTestGreaterThan() {
- BuildCompareOp(javascript()->GreaterThan());
+ CompareOperationHints hints = CompareOperationHints::Any();
+ BuildCompareOp(javascript()->GreaterThan(hints));
}
void BytecodeGraphBuilder::VisitTestLessThanOrEqual() {
- BuildCompareOp(javascript()->LessThanOrEqual());
+ CompareOperationHints hints = CompareOperationHints::Any();
+ BuildCompareOp(javascript()->LessThanOrEqual(hints));
}
void BytecodeGraphBuilder::VisitTestGreaterThanOrEqual() {
- BuildCompareOp(javascript()->GreaterThanOrEqual());
+ CompareOperationHints hints = CompareOperationHints::Any();
+ BuildCompareOp(javascript()->GreaterThanOrEqual(hints));
}
void BytecodeGraphBuilder::VisitTestIn() {
@@ -1518,7 +1525,8 @@ void BytecodeGraphBuilder::BuildConditionalJump(Node* condition) {
void BytecodeGraphBuilder::BuildJumpIfEqual(Node* comperand) {
Node* accumulator = environment()->LookupAccumulator();
Node* condition =
- NewNode(javascript()->StrictEqual(), accumulator, comperand);
+ NewNode(javascript()->StrictEqual(CompareOperationHints::Any()),
+ accumulator, comperand);
BuildConditionalJump(condition);
}
@@ -1527,14 +1535,17 @@ void BytecodeGraphBuilder::BuildJumpIfToBooleanEqual(Node* comperand) {
Node* accumulator = environment()->LookupAccumulator();
Node* to_boolean =
NewNode(javascript()->ToBoolean(ToBooleanHint::kAny), accumulator);
- Node* condition = NewNode(javascript()->StrictEqual(), to_boolean, comperand);
+ Node* condition =
+ NewNode(javascript()->StrictEqual(CompareOperationHints::Any()),
+ to_boolean, comperand);
BuildConditionalJump(condition);
}
void BytecodeGraphBuilder::BuildJumpIfNotHole() {
Node* accumulator = environment()->LookupAccumulator();
- Node* condition = NewNode(javascript()->StrictEqual(), accumulator,
- jsgraph()->TheHoleConstant());
+ Node* condition =
+ NewNode(javascript()->StrictEqual(CompareOperationHints::Any()),
+ accumulator, jsgraph()->TheHoleConstant());
Node* node =
NewNode(common()->Select(MachineRepresentation::kTagged), condition,
jsgraph()->FalseConstant(), jsgraph()->TrueConstant());
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | src/compiler/js-call-reducer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698