diff options
Diffstat (limited to 'deps/v8/src/builtins/builtins-call-gen.cc')
-rw-r--r-- | deps/v8/src/builtins/builtins-call-gen.cc | 37 |
1 files changed, 16 insertions, 21 deletions
diff --git a/deps/v8/src/builtins/builtins-call-gen.cc b/deps/v8/src/builtins/builtins-call-gen.cc index 35aaee5ec20..4defe28cb7c 100644 --- a/deps/v8/src/builtins/builtins-call-gen.cc +++ b/deps/v8/src/builtins/builtins-call-gen.cc @@ -237,7 +237,7 @@ void CallOrConstructBuiltinsAssembler::CallOrConstructDoubleVarargs( TNode<Object> target, SloppyTNode<Object> new_target, TNode<FixedDoubleArray> elements, TNode<Int32T> length, TNode<Int32T> args_count, TNode<Context> context, TNode<Int32T> kind) { - Label if_holey_double(this), if_packed_double(this), if_done(this); + Label if_done(this); const ElementsKind new_kind = PACKED_ELEMENTS; const WriteBarrierMode barrier_mode = UPDATE_WRITE_BARRIER; @@ -245,27 +245,22 @@ void CallOrConstructBuiltinsAssembler::CallOrConstructDoubleVarargs( CSA_ASSERT(this, WordNotEqual(intptr_length, IntPtrConstant(0))); // Allocate a new FixedArray of Objects. - TNode<FixedArray> new_elements = AllocateFixedArray( - new_kind, intptr_length, CodeStubAssembler::kAllowLargeObjectAllocation); + TNode<FixedArray> new_elements = CAST(AllocateFixedArray( + new_kind, intptr_length, CodeStubAssembler::kAllowLargeObjectAllocation)); Branch(Word32Equal(kind, Int32Constant(HOLEY_DOUBLE_ELEMENTS)), - &if_holey_double, &if_packed_double); - - BIND(&if_holey_double); - { - // Fill the FixedArray with pointers to HeapObjects. - CopyFixedArrayElements(HOLEY_DOUBLE_ELEMENTS, elements, new_kind, - new_elements, intptr_length, intptr_length, - barrier_mode); - Goto(&if_done); - } - - BIND(&if_packed_double); - { - CopyFixedArrayElements(PACKED_DOUBLE_ELEMENTS, elements, new_kind, - new_elements, intptr_length, intptr_length, - barrier_mode); - Goto(&if_done); - } + [&] { + // Fill the FixedArray with pointers to HeapObjects. + CopyFixedArrayElements(HOLEY_DOUBLE_ELEMENTS, elements, new_kind, + new_elements, intptr_length, intptr_length, + barrier_mode); + Goto(&if_done); + }, + [&] { + CopyFixedArrayElements(PACKED_DOUBLE_ELEMENTS, elements, new_kind, + new_elements, intptr_length, intptr_length, + barrier_mode); + Goto(&if_done); + }); BIND(&if_done); { |