From bbefb4d62135bc9c5029be6f94335be58544a449 Mon Sep 17 00:00:00 2001 From: cheezzario Date: Wed, 9 Jul 2025 11:56:23 +0300 Subject: [PATCH] [ArkTS][StdLib] Array index 'int' Description: Changing escompat.Array 'index' type from 'number' to 'int' Issue: https://gitee.com/openharmony/arkcompiler_runtime_core/issues/ICK4Q2 Testing: All required pre-merge tests passed. Results are available in the ggwatcher Signed-off-by: cheezzario --- ets2panda/compiler/core/ETSGen.cpp | 1 - ets2panda/compiler/scripts/signatures.yaml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/ets2panda/compiler/core/ETSGen.cpp b/ets2panda/compiler/core/ETSGen.cpp index 64969cbd23..1dcf579bb4 100644 --- a/ets2panda/compiler/core/ETSGen.cpp +++ b/ets2panda/compiler/core/ETSGen.cpp @@ -2465,7 +2465,6 @@ void ETSGen::NewArray(const ir::AstNode *const node, const VReg arr, const VReg void ETSGen::LoadResizableArrayLength(const ir::AstNode *node) { Ra().Emit(node, Signatures::BUILTIN_ARRAY_LENGTH, dummyReg_, 0); - Sa().Emit(node); SetAccumulatorType(Checker()->GlobalIntType()); } diff --git a/ets2panda/compiler/scripts/signatures.yaml b/ets2panda/compiler/scripts/signatures.yaml index d44d0d0c16..7dda2a7e5e 100644 --- a/ets2panda/compiler/scripts/signatures.yaml +++ b/ets2panda/compiler/scripts/signatures.yaml @@ -771,7 +771,7 @@ signatures: - callee: BUILTIN_ARRAY method_name: length params: [] - return_type: PRIMITIVE_DOUBLE + return_type: PRIMITIVE_INT ref: BUILTIN_ARRAY_LENGTH - callee: BUILTIN_ARRAY -- Gitee