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

Unified Diff: src/full-codegen/x64/full-codegen-x64.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/full-codegen/mips64/full-codegen-mips64.cc ('k') | src/ic/ic.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen/x64/full-codegen-x64.cc
diff --git a/src/full-codegen/x64/full-codegen-x64.cc b/src/full-codegen/x64/full-codegen-x64.cc
index 39a826c4091609127f4aaf874f297fed488a241f..4908e8d641c97fdf2483419d28136f264b0c02d7 100644
--- a/src/full-codegen/x64/full-codegen-x64.cc
+++ b/src/full-codegen/x64/full-codegen-x64.cc
@@ -636,9 +636,8 @@ void FullCodeGenerator::DoTest(Expression* condition,
Label* fall_through) {
Handle<Code> ic = ToBooleanStub::GetUninitialized(isolate());
CallIC(ic, condition->test_id());
- __ testp(result_register(), result_register());
- // The stub returns nonzero for true.
- Split(not_zero, if_true, if_false, fall_through);
+ __ CompareRoot(result_register(), Heap::kTrueValueRootIndex);
+ Split(equal, if_true, if_false, fall_through);
}
@@ -2007,8 +2006,8 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
CallLoadIC(NOT_INSIDE_TYPEOF); // rax=result.done
Handle<Code> bool_ic = ToBooleanStub::GetUninitialized(isolate());
CallIC(bool_ic);
- __ testp(result_register(), result_register());
- __ j(zero, &l_try);
+ __ CompareRoot(result_register(), Heap::kTrueValueRootIndex);
+ __ j(not_equal, &l_try);
// result.value
__ Pop(load_receiver); // result
« no previous file with comments | « src/full-codegen/mips64/full-codegen-mips64.cc ('k') | src/ic/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698