Chromium Code Reviews| Index: src/code-stub-assembler.cc |
| diff --git a/src/code-stub-assembler.cc b/src/code-stub-assembler.cc |
| index eb7e49da46d352883ccad891f19f348217b8cdec..497caddd11b86edb533de43ce1a3c5d9149cbe55 100644 |
| --- a/src/code-stub-assembler.cc |
| +++ b/src/code-stub-assembler.cc |
| @@ -471,6 +471,32 @@ Node* CodeStubAssembler::WordIsPositiveSmi(Node* a) { |
| IntPtrConstant(0)); |
| } |
| +void CodeStubAssembler::BranchIfSameValueZero(Node* a, Node* b, Node* context, |
| + Label* if_true, Label* if_false) { |
| + Label if_noteq(this), if_a_isnan(this); |
| + Node* heap_number_type = Int32Constant(HEAP_NUMBER_TYPE); |
| + BranchIf(CallRuntime(Runtime::kInlineStrictEqual, context, a, b), if_true, |
|
caitp
2016/07/15 17:24:35
this was the problem --- fixing this made the perf
|
| + &if_noteq); |
| + |
| + Bind(&if_noteq); |
| + GotoIf(WordIsSmi(a), if_false); |
| + |
| + Node* a_type = LoadInstanceType(a); |
| + GotoIf(WordNotEqual(a_type, heap_number_type), if_false); |
| + |
| + Node* a_value = LoadHeapNumberValue(a); |
| + BranchIfFloat64IsNaN(a_value, &if_a_isnan, if_false); |
| + |
| + Bind(&if_a_isnan); |
| + GotoIf(WordIsSmi(b), if_false); |
| + |
| + Node* b_type = LoadInstanceType(b); |
| + GotoIf(WordNotEqual(b_type, heap_number_type), if_false); |
| + |
| + Node* b_value = LoadHeapNumberValue(b); |
| + BranchIfFloat64IsNaN(b_value, if_true, if_false); |
| +} |
| + |
| Node* CodeStubAssembler::AllocateRawUnaligned(Node* size_in_bytes, |
| AllocationFlags flags, |
| Node* top_address, |