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

Unified Diff: src/code-stub-assembler.cc

Issue 2374703002: [stubs] remove unused BranchIfSameValueZero from CodeStubAssembler (Closed)
Patch Set: Created 4 years, 3 months 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/code-stub-assembler.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stub-assembler.cc
diff --git a/src/code-stub-assembler.cc b/src/code-stub-assembler.cc
index 5abfe384af369e2d1573bacdd219aa92af902c60..3b990867911a0856428165ad525eca85820edf0d 100644
--- a/src/code-stub-assembler.cc
+++ b/src/code-stub-assembler.cc
@@ -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,
« no previous file with comments | « src/code-stub-assembler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698