X87: [turbofan] Desugar JSUnaryNot(x) to Select(x, false, true).
port 411c5b7fb0
(r32524)
original commit message:
Also remove the ResultMode from ToBooleanStub and always return true or
false and use the same mechanism in fullcodegen. This is in preparation
for adding ToBoolean hints to TurboFan.
Drive-by-fix: We can use the power of the ToBooleanIC in TurboFan now
that the ResultMode is gone (and the runtime always returns true or
false from the miss handler).
BUG=
Review URL: https://codereview.chromium.org/1500483002
Cr-Commit-Position: refs/heads/master@{#32543}
This commit is contained in:
parent
36c395ce3f
commit
aae3f9610e
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user