summaryrefslogtreecommitdiff
path: root/deps/v8/src/code-stub-assembler.h
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/code-stub-assembler.h')
-rw-r--r--deps/v8/src/code-stub-assembler.h21
1 files changed, 17 insertions, 4 deletions
diff --git a/deps/v8/src/code-stub-assembler.h b/deps/v8/src/code-stub-assembler.h
index 8bd39369b7..2be168af85 100644
--- a/deps/v8/src/code-stub-assembler.h
+++ b/deps/v8/src/code-stub-assembler.h
@@ -1512,10 +1512,19 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler {
Node* to_index,
ParameterMode mode = INTPTR_PARAMETERS);
- void CopyPropertyArrayValues(
- Node* from_array, Node* to_array, Node* length,
- WriteBarrierMode barrier_mode = UPDATE_WRITE_BARRIER,
- ParameterMode mode = INTPTR_PARAMETERS);
+ enum class DestroySource { kNo, kYes };
+
+ // Specify DestroySource::kYes if {from_array} is being supplanted by
+ // {to_array}. This offers a slight performance benefit by simply copying the
+ // array word by word. The source may be destroyed at the end of this macro.
+ //
+ // Otherwise, specify DestroySource::kNo for operations where an Object is
+ // being cloned, to ensure that MutableHeapNumbers are unique between the
+ // source and cloned object.
+ void CopyPropertyArrayValues(Node* from_array, Node* to_array, Node* length,
+ WriteBarrierMode barrier_mode,
+ ParameterMode mode,
+ DestroySource destroy_source);
// Copies all elements from |from_array| of |length| size to
// |to_array| of the same size respecting the elements kind.
@@ -3073,6 +3082,10 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler {
void InitializeFunctionContext(Node* native_context, Node* context,
int slots);
+ // Allocate a clone of a mutable primitive, if {object} is a
+ // MutableHeapNumber.
+ TNode<Object> CloneIfMutablePrimitive(TNode<Object> object);
+
private:
friend class CodeStubArguments;