Commit eb976c3e authored by Santiago Aboy Solanes's avatar Santiago Aboy Solanes Committed by Commit Bot

[csa][cleanup] TNodify PrepareValueForWriteToTypedArray

Using templates seems like the best way to go. We are duplicating code
but seems like a fair trade-off.

Bug: v8:6949
Change-Id: I22b3d5e2e74bfc2bf46f95656782aae4944d72de
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2727816Reviewed-by: 's avatarDan Elphick <delphick@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73126}
parent 4db38b0c
This diff is collapsed.
......@@ -3203,10 +3203,6 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
TNode<Uint8T> Int32ToUint8Clamped(TNode<Int32T> int32_value);
TNode<Uint8T> Float64ToUint8Clamped(TNode<Float64T> float64_value);
Node* PrepareValueForWriteToTypedArray(TNode<Object> input,
ElementsKind elements_kind,
TNode<Context> context);
template <typename T>
TNode<T> PrepareValueForWriteToTypedArray(TNode<Object> input,
ElementsKind elements_kind,
......@@ -3828,6 +3824,19 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
void TryPlainPrimitiveNonNumberToNumber(TNode<HeapObject> input,
TVariable<Number>* var_result,
Label* if_bailout);
template <typename TValue>
void EmitElementStoreTypedArray(TNode<JSTypedArray> typed_array,
TNode<IntPtrT> key, TNode<Object> value,
ElementsKind elements_kind,
KeyedAccessStoreMode store_mode,
Label* bailout, TNode<Context> context,
TVariable<Object>* maybe_converted_value);
template <typename TValue>
void EmitElementStoreTypedArrayUpdateValue(
TNode<Object> value, ElementsKind elements_kind,
TNode<TValue> converted_value, TVariable<Object>* maybe_converted_value);
};
class V8_EXPORT_PRIVATE CodeStubArguments {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment