[ptr-compr] Fix --no-debug-code issue with loading JSArray::length

Bug: v8:9717
Change-Id: I0d99cb8f8dedd22dae9f78b49a097e3dcbba02bb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1807368
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63840}
This commit is contained in:
Igor Sheludko 2019-09-17 15:12:11 +02:00 committed by Commit Bot
parent a9d7b45c7e
commit e27b7b6069

View File

@ -245,9 +245,7 @@ TF_BUILTIN(ArrayPrototypePop, CodeStubAssembler) {
BIND(&fast); BIND(&fast);
{ {
TNode<JSArray> array_receiver = CAST(receiver); TNode<JSArray> array_receiver = CAST(receiver);
CSA_ASSERT(this, TaggedIsPositiveSmi(LoadJSArrayLength(array_receiver))); TNode<IntPtrT> length = SmiUntag(LoadFastJSArrayLength(array_receiver));
TNode<IntPtrT> length =
LoadAndUntagObjectField(array_receiver, JSArray::kLengthOffset);
Label return_undefined(this), fast_elements(this); Label return_undefined(this), fast_elements(this);
GotoIf(IntPtrEqual(length, IntPtrConstant(0)), &return_undefined); GotoIf(IntPtrEqual(length, IntPtrConstant(0)), &return_undefined);