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

Unified Diff: src/code-stubs-hydrogen.cc

Issue 1491223002: [turbofan] Desugar JSUnaryNot(x) to Select(x, false, true). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix typo in arm64. 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
« no previous file with comments | « src/code-stubs.h ('k') | src/compiler/ast-graph-builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stubs-hydrogen.cc
diff --git a/src/code-stubs-hydrogen.cc b/src/code-stubs-hydrogen.cc
index 62ba43f578b9b8ab84c2e0b5e8f4fde9bd0fa9ea..793034c1e2232b4b364c4ee16f86c56fd5903084 100644
--- a/src/code-stubs-hydrogen.cc
+++ b/src/code-stubs-hydrogen.cc
@@ -1705,31 +1705,13 @@ Handle<Code> StringAddStub::GenerateCode() {
template <>
HValue* CodeStubGraphBuilder<ToBooleanStub>::BuildCodeInitializedStub() {
ToBooleanStub* stub = casted_stub();
- HValue* true_value = NULL;
- HValue* false_value = NULL;
-
- switch (stub->mode()) {
- case ToBooleanStub::RESULT_AS_SMI:
- true_value = graph()->GetConstant1();
- false_value = graph()->GetConstant0();
- break;
- case ToBooleanStub::RESULT_AS_ODDBALL:
- true_value = graph()->GetConstantTrue();
- false_value = graph()->GetConstantFalse();
- break;
- case ToBooleanStub::RESULT_AS_INVERSE_ODDBALL:
- true_value = graph()->GetConstantFalse();
- false_value = graph()->GetConstantTrue();
- break;
- }
-
IfBuilder if_true(this);
if_true.If<HBranch>(GetParameter(0), stub->types());
if_true.Then();
- if_true.Return(true_value);
+ if_true.Return(graph()->GetConstantTrue());
if_true.Else();
if_true.End();
- return false_value;
+ return graph()->GetConstantFalse();
}
« no previous file with comments | « src/code-stubs.h ('k') | src/compiler/ast-graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698