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

Unified Diff: src/full-codegen/x87/full-codegen-x87.cc

Issue 1500483002: X87: [turbofan] Desugar JSUnaryNot(x) to Select(x, false, true). (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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen/x87/full-codegen-x87.cc
diff --git a/src/full-codegen/x87/full-codegen-x87.cc b/src/full-codegen/x87/full-codegen-x87.cc
index 486ddd93e45ea5d631f2272a23f6b7026502213b..bafd91908d77e06a0dabead94ba42d8cd23e6370 100644
--- a/src/full-codegen/x87/full-codegen-x87.cc
+++ b/src/full-codegen/x87/full-codegen-x87.cc
@@ -621,9 +621,8 @@ void FullCodeGenerator::DoTest(Expression* condition,
Label* fall_through) {
Handle<Code> ic = ToBooleanStub::GetUninitialized(isolate());
CallIC(ic, condition->test_id());
- __ test(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);
}
@@ -1977,8 +1976,8 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
CallLoadIC(NOT_INSIDE_TYPEOF); // result.done in eax
Handle<Code> bool_ic = ToBooleanStub::GetUninitialized(isolate());
CallIC(bool_ic);
- __ test(eax, eax);
- __ 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 | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698