From 0bbfceb6da1039a00aff5a94f380e37264575eaa Mon Sep 17 00:00:00 2001 From: cheezzario Date: Tue, 15 Jul 2025 09:07:59 +0300 Subject: [PATCH] [ArkTS][StdLib] Array length: int Description: Change escompat.Array 'length' property type from 'number' to 'int' Issue: https://gitee.com/openharmony/arkcompiler_runtime_core/issues/ICM801 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 5b08e72fe6..0ab9cc3907 100644 --- a/ets2panda/compiler/core/ETSGen.cpp +++ b/ets2panda/compiler/core/ETSGen.cpp @@ -2482,7 +2482,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 15dfcdbfe9..4c2d7f39a4 100644 --- a/ets2panda/compiler/scripts/signatures.yaml +++ b/ets2panda/compiler/scripts/signatures.yaml @@ -773,7 +773,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