Delay rhs_instance_type load until needed in StrictEqual
When var_type_feedback is nullptr and {lhs} is not a String, rhs_instance_type is not needed. Bug: Change-Id: Ia39aa39ec7ad0063d2fb9b01fd326d7993ab4d26 Reviewed-on: https://chromium-review.googlesource.com/659340 Commit-Queue: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#48086}
This commit is contained in:
parent
ec952aaa68
commit
e80cbe03f8
@ -8824,9 +8824,6 @@ Node* CodeStubAssembler::StrictEqual(Node* lhs, Node* rhs,
|
||||
// Load the instance type of {lhs}.
|
||||
Node* lhs_instance_type = LoadMapInstanceType(lhs_map);
|
||||
|
||||
// Load the instance type of {rhs}.
|
||||
Node* rhs_instance_type = LoadInstanceType(rhs);
|
||||
|
||||
// Check if {lhs} is a String.
|
||||
Label if_lhsisstring(this), if_lhsisnotstring(this);
|
||||
Branch(IsStringInstanceType(lhs_instance_type), &if_lhsisstring,
|
||||
@ -8834,6 +8831,9 @@ Node* CodeStubAssembler::StrictEqual(Node* lhs, Node* rhs,
|
||||
|
||||
BIND(&if_lhsisstring);
|
||||
{
|
||||
// Load the instance type of {rhs}.
|
||||
Node* rhs_instance_type = LoadInstanceType(rhs);
|
||||
|
||||
// Check if {rhs} is also a String.
|
||||
Label if_rhsisstring(this, Label::kDeferred),
|
||||
if_rhsisnotstring(this);
|
||||
@ -8867,6 +8867,9 @@ Node* CodeStubAssembler::StrictEqual(Node* lhs, Node* rhs,
|
||||
|
||||
BIND(&if_lhsisbigint);
|
||||
{
|
||||
// Load the instance type of {rhs}.
|
||||
Node* rhs_instance_type = LoadInstanceType(rhs);
|
||||
|
||||
// Check if {rhs} is also a BigInt.
|
||||
Label if_rhsisbigint(this, Label::kDeferred),
|
||||
if_rhsisnotbigint(this);
|
||||
@ -8892,6 +8895,9 @@ Node* CodeStubAssembler::StrictEqual(Node* lhs, Node* rhs,
|
||||
|
||||
BIND(&if_lhsisnotbigint);
|
||||
if (var_type_feedback != nullptr) {
|
||||
// Load the instance type of {rhs}.
|
||||
Node* rhs_instance_type = LoadInstanceType(rhs);
|
||||
|
||||
Label if_lhsissymbol(this), if_lhsisreceiver(this);
|
||||
GotoIf(IsJSReceiverInstanceType(lhs_instance_type),
|
||||
&if_lhsisreceiver);
|
||||
|
Loading…
Reference in New Issue
Block a user