Commit 1957427f authored by Marja Hölttä's avatar Marja Hölttä Committed by V8 LUCI CQ

[rab/gsab] Rename some uses of LoadJSArrayBufferViewByteLength

It sometimes meant just the field and sometimes the computed byte
length. This rename makes it less confusing.

Bug: v8:11111
Change-Id: I64bb8b6b9be2befb57d53ae5456b6ce8f6472456
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3657429Reviewed-by: 's avatarShu-yu Guo <syg@chromium.org>
Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80695}
parent 9ec29a44
......@@ -140,7 +140,7 @@ TF_BUILTIN(TypedArrayPrototypeByteLength, TypedArrayBuiltinsAssembler) {
// Default to zero if the {receiver}s buffer was detached.
TNode<UintPtrT> byte_length = Select<UintPtrT>(
IsDetachedBuffer(receiver_buffer), [=] { return UintPtrConstant(0); },
[=] { return LoadJSArrayBufferViewByteLength(receiver_array); });
[=] { return LoadJSArrayBufferViewRawByteLength(receiver_array); });
Return(ChangeUintPtrToTagged(byte_length));
}
}
......
......@@ -14126,7 +14126,7 @@ TNode<JSArrayBuffer> CodeStubAssembler::LoadJSArrayBufferViewBuffer(
JSArrayBufferView::kBufferOffset);
}
TNode<UintPtrT> CodeStubAssembler::LoadJSArrayBufferViewByteLength(
TNode<UintPtrT> CodeStubAssembler::LoadJSArrayBufferViewRawByteLength(
TNode<JSArrayBufferView> array_buffer_view) {
return LoadObjectField<UintPtrT>(array_buffer_view,
JSArrayBufferView::kByteLengthOffset);
......@@ -14233,7 +14233,7 @@ CodeStubAssembler::LoadVariableLengthJSArrayBufferViewByteLength(
// Check if the backing RAB has shrunk so that the buffer is out of
// bounds.
TNode<UintPtrT> array_byte_length =
LoadJSArrayBufferViewByteLength(array);
LoadJSArrayBufferViewRawByteLength(array);
GotoIfNot(UintPtrGreaterThanOrEqual(
buffer_byte_length,
UintPtrAdd(array_byte_offset, array_byte_length)),
......@@ -14278,7 +14278,7 @@ void CodeStubAssembler::IsJSArrayBufferViewDetachedOrOutOfBounds(
// Check if the backing RAB has shrunk so that the buffer is out of
// bounds.
TNode<UintPtrT> array_byte_length =
LoadJSArrayBufferViewByteLength(array_buffer_view);
LoadJSArrayBufferViewRawByteLength(array_buffer_view);
Branch(UintPtrGreaterThanOrEqual(
buffer_byte_length,
UintPtrAdd(array_byte_offset, array_byte_length)),
......
......@@ -3696,7 +3696,7 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
// JSArrayBufferView helpers
TNode<JSArrayBuffer> LoadJSArrayBufferViewBuffer(
TNode<JSArrayBufferView> array_buffer_view);
TNode<UintPtrT> LoadJSArrayBufferViewByteLength(
TNode<UintPtrT> LoadJSArrayBufferViewRawByteLength(
TNode<JSArrayBufferView> array_buffer_view);
TNode<UintPtrT> LoadJSArrayBufferViewByteOffset(
......
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