[stubs] remove unused BranchIfSameValueZero from CodeStubAssembler
BUG=v8:5268, v8:5162 R=ishell@chromium.org Review-Url: https://codereview.chromium.org/2374703002 Cr-Commit-Position: refs/heads/master@{#39766}
This commit is contained in:
parent
f9a2c8b111
commit
ccdfa302ba
@ -497,80 +497,6 @@ Node* CodeStubAssembler::WordIsPositiveSmi(Node* a) {
|
||||
IntPtrConstant(0));
|
||||
}
|
||||
|
||||
void CodeStubAssembler::BranchIfSameValueZero(Node* a, Node* b, Node* context,
|
||||
Label* if_true, Label* if_false) {
|
||||
Node* number_map = HeapNumberMapConstant();
|
||||
Label a_isnumber(this), a_isnotnumber(this), b_isnumber(this), a_isnan(this),
|
||||
float_not_equal(this);
|
||||
// If register A and register B are identical, goto `if_true`
|
||||
GotoIf(WordEqual(a, b), if_true);
|
||||
// If either register A or B are Smis, goto `if_false`
|
||||
GotoIf(Word32Or(WordIsSmi(a), WordIsSmi(b)), if_false);
|
||||
// GotoIf(WordIsSmi(b), if_false);
|
||||
|
||||
Node* a_map = LoadMap(a);
|
||||
Node* b_map = LoadMap(b);
|
||||
Branch(WordEqual(a_map, number_map), &a_isnumber, &a_isnotnumber);
|
||||
|
||||
// If both register A and B are HeapNumbers, return true if they are equal,
|
||||
// or if both are NaN
|
||||
Bind(&a_isnumber);
|
||||
{
|
||||
Branch(WordEqual(b_map, number_map), &b_isnumber, if_false);
|
||||
|
||||
Bind(&b_isnumber);
|
||||
Node* a_value = LoadHeapNumberValue(a);
|
||||
Node* b_value = LoadHeapNumberValue(b);
|
||||
BranchIfFloat64Equal(a_value, b_value, if_true, &float_not_equal);
|
||||
|
||||
Bind(&float_not_equal);
|
||||
BranchIfFloat64IsNaN(a_value, &a_isnan, if_false);
|
||||
|
||||
Bind(&a_isnan);
|
||||
BranchIfFloat64IsNaN(a_value, if_true, if_false);
|
||||
}
|
||||
|
||||
Bind(&a_isnotnumber);
|
||||
{
|
||||
Label a_isstring(this), a_isnotstring(this);
|
||||
Node* a_instance_type = LoadMapInstanceType(a_map);
|
||||
|
||||
Branch(Int32LessThan(a_instance_type, Int32Constant(FIRST_NONSTRING_TYPE)),
|
||||
&a_isstring, &a_isnotstring);
|
||||
|
||||
Bind(&a_isstring);
|
||||
{
|
||||
Label b_isstring(this), b_isnotstring(this);
|
||||
Node* b_instance_type = LoadInstanceType(b_map);
|
||||
|
||||
Branch(
|
||||
Int32LessThan(b_instance_type, Int32Constant(FIRST_NONSTRING_TYPE)),
|
||||
&b_isstring, if_false);
|
||||
|
||||
Bind(&b_isstring);
|
||||
{
|
||||
Callable callable = CodeFactory::StringEqual(isolate());
|
||||
Node* result = CallStub(callable, context, a, b);
|
||||
Branch(WordEqual(BooleanConstant(true), result), if_true, if_false);
|
||||
}
|
||||
}
|
||||
|
||||
Bind(&a_isnotstring);
|
||||
{
|
||||
// Check if {lhs} is a Simd128Value.
|
||||
Label a_issimd128value(this);
|
||||
Branch(Word32Equal(a_instance_type, Int32Constant(SIMD128_VALUE_TYPE)),
|
||||
&a_issimd128value, if_false);
|
||||
|
||||
Bind(&a_issimd128value);
|
||||
{
|
||||
// Load the map of {rhs}.
|
||||
BranchIfSimd128Equal(a, a_map, b, b_map, if_true, if_false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CodeStubAssembler::BranchIfSimd128Equal(Node* lhs, Node* lhs_map,
|
||||
Node* rhs, Node* rhs_map,
|
||||
Label* if_equal,
|
||||
|
@ -177,10 +177,6 @@ class CodeStubAssembler : public compiler::CodeAssembler {
|
||||
if_notequal);
|
||||
}
|
||||
|
||||
void BranchIfSameValueZero(compiler::Node* a, compiler::Node* b,
|
||||
compiler::Node* context, Label* if_true,
|
||||
Label* if_false);
|
||||
|
||||
void BranchIfFastJSArray(compiler::Node* object, compiler::Node* context,
|
||||
Label* if_true, Label* if_false);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user