diff --git a/arkui-plugins/memo-plugins/memo-cache-factory.ts b/arkui-plugins/memo-plugins/memo-cache-factory.ts index 1ca4234ed596b0ebecb6b28d244b19272ebb1d75..d3d5350e1acc0c4970214ecc0011f8b5003745f6 100644 --- a/arkui-plugins/memo-plugins/memo-cache-factory.ts +++ b/arkui-plugins/memo-plugins/memo-cache-factory.ts @@ -175,8 +175,9 @@ export class RewriteFactory { expectReturn ?? arkts.factory.createPrimitiveType(arkts.Es2pandaPrimitiveType.PRIMITIVE_TYPE_VOID); const _isVoidReturn = isVoidType(returnType); + const _returnType = _isVoidReturn ? arkts.factory.createETSUndefinedType() : returnType; const scopeDeclaration = factory.createScopeDeclaration( - returnType, + _returnType, positionalIdTracker.id(_callName), declaredParams.length ); diff --git a/arkui-plugins/memo-plugins/memo-factory.ts b/arkui-plugins/memo-plugins/memo-factory.ts index 948fb082ebea21ea33a76a2652465c111505dada..7ca74abbbefd01a4bf8bf77d64752676f6f7e1db 100644 --- a/arkui-plugins/memo-plugins/memo-factory.ts +++ b/arkui-plugins/memo-plugins/memo-factory.ts @@ -231,7 +231,7 @@ export class factory { ), returnTypeAnnotation ? [returnTypeAnnotation] - : [arkts.factory.createPrimitiveType(arkts.Es2pandaPrimitiveType.PRIMITIVE_TYPE_VOID)], + : [arkts.factory.createETSUndefinedType()], [factory.createIdArgument(hash), arkts.factory.createNumericLiteral(cnt)] ) ), @@ -357,12 +357,13 @@ export class factory { const paramInfos = buildeParamInfos(parameters); const gensymParamsCount = fixGensymParams(paramInfos, node); const parameterNames = paramInfos.map((it) => it.ident.name); - const scopeDeclaration = factory.createScopeDeclaration(returnTypeInfo.node, hash, parameterNames.length); + const isVoidValue = !!returnTypeInfo.isVoid; + const _returnType = isVoidValue ? arkts.factory.createETSUndefinedType() : returnTypeInfo.node; + const scopeDeclaration = factory.createScopeDeclaration(_returnType, hash, parameterNames.length); const memoParametersDeclaration = parameterNames.length ? factory.createMemoParameterDeclaration(parameterNames) : undefined; const syntheticReturnStatement = factory.createSyntheticReturnStatement(!!returnTypeInfo.isStableThis); - const isVoidValue = !!returnTypeInfo.isVoid; const unchangedCheck = factory.createIfStatementWithSyntheticReturnStatement( syntheticReturnStatement, isVoidValue diff --git a/arkui-plugins/memo-plugins/utils.ts b/arkui-plugins/memo-plugins/utils.ts index e3b415e7fa2216438caddbf64d73efd2ed1455d7..36962225d7373190e81cb6e0120ffb99e776bb40 100644 --- a/arkui-plugins/memo-plugins/utils.ts +++ b/arkui-plugins/memo-plugins/utils.ts @@ -616,7 +616,7 @@ export function buildReturnTypeInfo( ): ReturnTypeInfo { const newReturnType = !!returnType ? returnType.clone() - : arkts.factory.createPrimitiveType(arkts.Es2pandaPrimitiveType.PRIMITIVE_TYPE_VOID); + : arkts.factory.createETSUndefinedType(); return { node: newReturnType, isMemo, diff --git a/arkui-plugins/test/demo/mock/memo/functions/internal-memo-arg.ets b/arkui-plugins/test/demo/mock/memo/functions/internal-memo-arg.ets index 38f146018c0a4ec38b5456efd91e5a647acaf7be..d9868a38e56ff6654b01cfb7a9d7ed93381fb736 100644 --- a/arkui-plugins/test/demo/mock/memo/functions/internal-memo-arg.ets +++ b/arkui-plugins/test/demo/mock/memo/functions/internal-memo-arg.ets @@ -55,7 +55,7 @@ export class MemoCallbackContext { } @memo_intrinsic() export function contextLocalScope(name: string, value: Value, @memo() content: (()=> void)) { - const scope = __context().scope(__id(), 1); + const scope = __context().scope(__id(), 1); scope.param(0, value, undefined, name, true); if (scope.unchanged) { scope.cached; @@ -66,7 +66,7 @@ export class MemoCallbackContext { } @memo_intrinsic() export function NodeAttach(create: (()=> Node), @memo() update: ((node: Node)=> void), reuseKey?: string): void { - const scope = __context().scope(__id(), 0, create, undefined, undefined, undefined, reuseKey); + const scope = __context().scope(__id(), 0, create, undefined, undefined, undefined, reuseKey); if (scope.unchanged) { scope.cached; } else { diff --git a/arkui-plugins/test/ut/memo-plugins/function-declarations/argument-call.test.ts b/arkui-plugins/test/ut/memo-plugins/function-declarations/argument-call.test.ts index 1506b9ca1a38bdce1d4197f24956746f45c044be..35340e7bb1975f106cc0b23da76c89f0bf6239c2 100644 --- a/arkui-plugins/test/ut/memo-plugins/function-declarations/argument-call.test.ts +++ b/arkui-plugins/test/ut/memo-plugins/function-declarations/argument-call.test.ts @@ -33,7 +33,7 @@ import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id import { memo as memo } from \"arkui.stateManagement.runtime\"; function main() {} @memo() function memo_arg_call(__memo_context: __memo_context_type, __memo_id: __memo_id_type, arg1: number, arg2: ((x: number)=> number), @memo() arg3: ((__memo_context: __memo_context_type, __memo_id: __memo_id_type, x: number)=> number), arg4?: ((x: number)=> number), @memo() arg5?: ((__memo_context: __memo_context_type, __memo_id: __memo_id_type, x: number)=> number)) { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 5); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 5); const __memo_parameter_arg1 = __memo_scope.param(0, arg1), __memo_parameter_arg2 = __memo_scope.param(1, arg2), __memo_parameter_arg3 = __memo_scope.param(2, arg3), __memo_parameter_arg4 = __memo_scope.param(3, arg4), __memo_parameter_arg5 = __memo_scope.param(4, arg5); if (__memo_scope.unchanged) { __memo_scope.cached; @@ -51,7 +51,7 @@ function main() {} } } @memo() function memo_arg_call_with_lowering(__memo_context: __memo_context_type, __memo_id: __memo_id_type, arg1: number, arg4?: ((x: number)=> number), @memo() arg5?: ((__memo_context: __memo_context_type, __memo_id: __memo_id_type, x: number)=> number)) { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 3); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 3); const __memo_parameter_arg1 = __memo_scope.param(0, arg1), __memo_parameter_arg4 = __memo_scope.param(1, arg4), __memo_parameter_arg5 = __memo_scope.param(2, arg5); if (__memo_scope.unchanged) { __memo_scope.cached; @@ -80,7 +80,7 @@ function main() {} return __memo_scope.recache(20); }) as ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> int))); let arg3: int = (((gensym%%_) !== (undefined)) ? gensym%%_ : (arg1 as int)); - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 4); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 4); const __memo_parameter_arg1 = __memo_scope.param(0, arg1), __memo_parameter_arg2 = __memo_scope.param(1, arg2), __memo_parameter_arg3 = __memo_scope.param(2, arg3), __memo_parameter_arg4 = __memo_scope.param(3, arg4); if (__memo_scope.unchanged) { __memo_scope.cached; diff --git a/arkui-plugins/test/ut/memo-plugins/function-declarations/complex-memo-intrinsic.test.ts b/arkui-plugins/test/ut/memo-plugins/function-declarations/complex-memo-intrinsic.test.ts index ba06b5787d39a952bd0dfaa26076b8baf031861d..30be2371fb169d3416441d3247f7db8d7aac2a9d 100644 --- a/arkui-plugins/test/ut/memo-plugins/function-declarations/complex-memo-intrinsic.test.ts +++ b/arkui-plugins/test/ut/memo-plugins/function-declarations/complex-memo-intrinsic.test.ts @@ -109,13 +109,13 @@ export type SimpleArray = (Array | ReadonlyArray | Readonly>); class Use { @memo() public test(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { - const __memo_scope = __memo_context.scope(((__memo_id) + (228150357)), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + (228150357)), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; } const style = @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type, attributes: IA) => { - const __memo_scope = __memo_context.scope(((__memo_id) + (237001330)), 1); + const __memo_scope = __memo_context.scope(((__memo_id) + (237001330)), 1); const __memo_parameter_attributes = __memo_scope.param(0, attributes); if (__memo_scope.unchanged) { __memo_scope.cached; diff --git a/arkui-plugins/test/ut/memo-plugins/function-declarations/declare-and-call.test.ts b/arkui-plugins/test/ut/memo-plugins/function-declarations/declare-and-call.test.ts index b4d2d21c4e4376797b78044103e26192daa60794..14556e0f95504a0ec92e844da217f8a6011a3739 100644 --- a/arkui-plugins/test/ut/memo-plugins/function-declarations/declare-and-call.test.ts +++ b/arkui-plugins/test/ut/memo-plugins/function-declarations/declare-and-call.test.ts @@ -35,7 +35,7 @@ import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id import { memo as memo } from \"arkui.stateManagement.runtime\"; function main() {} @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -43,7 +43,7 @@ function main() {} funcA(__memo_context, ((__memo_id) + ())); funcWithMemoBuilder(__memo_context, ((__memo_id) + ()), { builder: ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -65,7 +65,7 @@ function main() {} }); @memo() function funcA(__memo_context: __memo_context_type, __memo_id: __memo_id_type): void @memo() function funcB(__memo_context: __memo_context_type, __memo_id: __memo_id_type): void { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -77,7 +77,7 @@ function main() {} } } @memo() function funcWithMemoBuilder(__memo_context: __memo_context_type, __memo_id: __memo_id_type, @memo() memo_arg: MemoBuilder): void { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 1); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 1); const __memo_parameter_memo_arg = __memo_scope.param(0, memo_arg); if (__memo_scope.unchanged) { __memo_scope.cached; @@ -92,7 +92,7 @@ function funcWithArg(arg: (()=> void)): void {} function func(): void {} class A { @memo() public foo(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; diff --git a/arkui-plugins/test/ut/memo-plugins/function-declarations/inner-functions.test.ts b/arkui-plugins/test/ut/memo-plugins/function-declarations/inner-functions.test.ts index a73b950b6e13f509ac97580facb00a16306e1f18..de82b995e891aabd1924e53913f7f0cbacea7719 100644 --- a/arkui-plugins/test/ut/memo-plugins/function-declarations/inner-functions.test.ts +++ b/arkui-plugins/test/ut/memo-plugins/function-declarations/inner-functions.test.ts @@ -35,7 +35,7 @@ import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id import { memo as memo } from \"arkui.stateManagement.runtime\"; function main() {} @memo() function foo(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -46,13 +46,13 @@ function main() {} } } @memo() function bar(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; } const qux = @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -71,14 +71,14 @@ function main() {} } class A { @memo() public goo(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; } let func = (() => {}); let func2 = @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; diff --git a/arkui-plugins/test/ut/memo-plugins/function-declarations/internal-memo-arg.test.ts b/arkui-plugins/test/ut/memo-plugins/function-declarations/internal-memo-arg.test.ts index 02fc30648d42839da531deb3fa2280e52eba2436..6e47350f3f883b7703e20e7e9a1e5787555bf68b 100644 --- a/arkui-plugins/test/ut/memo-plugins/function-declarations/internal-memo-arg.test.ts +++ b/arkui-plugins/test/ut/memo-plugins/function-declarations/internal-memo-arg.test.ts @@ -68,7 +68,7 @@ export function __id(): __memo_id_type } @memo_intrinsic() export function contextLocalScope(__memo_context: __memo_context_type, __memo_id: __memo_id_type, name: string, value: Value, @memo() content: ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void)) { - const scope = __memo_context.scope(__memo_id, 1); + const scope = __memo_context.scope(__memo_id, 1); scope.param(0, value, undefined, name, true); if (scope.unchanged) { scope.cached; @@ -79,7 +79,7 @@ export function __id(): __memo_id_type } @memo_intrinsic() export function NodeAttach(__memo_context: __memo_context_type, __memo_id: __memo_id_type, create: (()=> Node), @memo() update: ((__memo_context: __memo_context_type, __memo_id: __memo_id_type, node: Node)=> void), reuseKey?: string): void { - const scope = __memo_context.scope(__memo_id, 0, create, undefined, undefined, undefined, reuseKey); + const scope = __memo_context.scope(__memo_id, 0, create, undefined, undefined, undefined, reuseKey); if (scope.unchanged) { scope.cached; } else { @@ -88,7 +88,7 @@ export function __id(): __memo_id_type update(__memo_context, ((__memo_id) + (6025780)), (__memo_context.node as Node)); } else { memoEntry(__memo_context, 0, ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + (31840240)), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + (31840240)), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -111,7 +111,7 @@ export function __id(): __memo_id_type } @memo() export function Repeat(__memo_context: __memo_context_type, __memo_id: __memo_id_type, count: int, @memo() action: ((__memo_context: __memo_context_type, __memo_id: __memo_id_type, index: int)=> void)) { - const __memo_scope = __memo_context.scope(((__memo_id) + (200707415)), 2); + const __memo_scope = __memo_context.scope(((__memo_id) + (200707415)), 2); const __memo_parameter_count = __memo_scope.param(0, count), __memo_parameter_action = __memo_scope.param(1, action); if (__memo_scope.unchanged) { __memo_scope.cached; @@ -153,7 +153,7 @@ export class MemoCallbackContext { export class CustomComponent { @memo() public static _instantiateImpl(__memo_context: __memo_context_type, __memo_id: __memo_id_type): void { - const __memo_scope = __memo_context.scope(((__memo_id) + (214802466)), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + (214802466)), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; diff --git a/arkui-plugins/test/ut/memo-plugins/function-declarations/type-reference.test.ts b/arkui-plugins/test/ut/memo-plugins/function-declarations/type-reference.test.ts index eca62211fc62871f30dcbfc225feb97dc0c82677..087741dd47bdf6baadd581ae44d64f983ddd77c5 100644 --- a/arkui-plugins/test/ut/memo-plugins/function-declarations/type-reference.test.ts +++ b/arkui-plugins/test/ut/memo-plugins/function-declarations/type-reference.test.ts @@ -41,7 +41,7 @@ function main() {} return __memo_scope.cached; } return __memo_scope.recache(((__memo_context: __memo_context_type, __memo_id: __memo_id_type, item: Item): void => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 1); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 1); const __memo_parameter_item = __memo_scope.param(0, item); if (__memo_scope.unchanged) { __memo_scope.cached; @@ -63,13 +63,13 @@ interface Attribute { } class B { @memo() public build(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; } A(__memo_context, ((__memo_id) + ())).each(__memo_context, ((__memo_id) + ()), ((__memo_context: __memo_context_type, __memo_id: __memo_id_type, ri: Item) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 1); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 1); const __memo_parameter_ri = __memo_scope.param(0, ri); if (__memo_scope.unchanged) { __memo_scope.cached; diff --git a/arkui-plugins/test/ut/memo-plugins/function-declarations/void-return-type.test.ts b/arkui-plugins/test/ut/memo-plugins/function-declarations/void-return-type.test.ts index fd2f3cb8885fe73b2a58e68377b065d63ca14a04..728004ce886f2626fc08855ce0f90035cd7bcbbe 100644 --- a/arkui-plugins/test/ut/memo-plugins/function-declarations/void-return-type.test.ts +++ b/arkui-plugins/test/ut/memo-plugins/function-declarations/void-return-type.test.ts @@ -35,7 +35,7 @@ import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id import { memo as memo } from \"arkui.stateManagement.runtime\"; function main() {} @memo() function func(__memo_context: __memo_context_type, __memo_id: __memo_id_type): void { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; diff --git a/arkui-plugins/test/ut/memo-plugins/lambda-literals/argument-call.test.ts b/arkui-plugins/test/ut/memo-plugins/lambda-literals/argument-call.test.ts index 18b3a26e3c2fdeeca0190011d9eb903b497f1a4b..3319ddde63d71432b2689f6492eb8e04e63cdddb 100644 --- a/arkui-plugins/test/ut/memo-plugins/lambda-literals/argument-call.test.ts +++ b/arkui-plugins/test/ut/memo-plugins/lambda-literals/argument-call.test.ts @@ -35,7 +35,7 @@ function main() {} ((arg: (()=> void)) => {})((() => {})); ((arg: @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void)) => {})(@memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -48,7 +48,7 @@ function main() {} ((gensym%%_1?: @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void)) => { let arg: @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void) = (((gensym%%_1) !== (undefined)) ? gensym%%_1 : (((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + (201676739)), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + (201676739)), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -59,7 +59,7 @@ function main() {} } }) as @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void))); })(@memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + (209782503)), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + (209782503)), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -71,14 +71,14 @@ function main() {} })); @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; } @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type, gensym%%_?: @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void)) => { let arg: @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void) = (((gensym%%_) !== (undefined)) ? gensym%%_ : (((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -88,7 +88,7 @@ function main() {} return; } }) as @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void))); - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 1); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 1); const __memo_parameter_arg = __memo_scope.param(0, arg); if (__memo_scope.unchanged) { __memo_scope.cached; @@ -99,7 +99,7 @@ function main() {} return; } })(__memo_context, ((__memo_id) + ()), @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -116,14 +116,14 @@ function main() {} }); @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; } let goo = @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type, gensym%%_?: string) => { let name: string = (((gensym%%_) !== (undefined)) ? gensym%%_ : (\"old\" as string)); - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 1); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 1); const __memo_parameter_name = __memo_scope.param(0, name); if (__memo_scope.unchanged) { __memo_scope.cached; @@ -144,7 +144,7 @@ function main() {} (() => { let foo = ((gensym%%_?: @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void)) => { let arg: @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void) = (((gensym%%_) !== (undefined)) ? gensym%%_ : (((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -156,7 +156,7 @@ function main() {} }) as @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void))); }); foo(@memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; diff --git a/arkui-plugins/test/ut/memo-plugins/lambda-literals/function-with-receiver.test.ts b/arkui-plugins/test/ut/memo-plugins/lambda-literals/function-with-receiver.test.ts index 60d5c5985a778d9007d1fda091eeccd099ccc8d8..c66c18648fbcb69a0d6266a19d172d5139740b81 100644 --- a/arkui-plugins/test/ut/memo-plugins/lambda-literals/function-with-receiver.test.ts +++ b/arkui-plugins/test/ut/memo-plugins/lambda-literals/function-with-receiver.test.ts @@ -44,7 +44,7 @@ import { memo as memo } from "arkui.stateManagement.runtime"; function main() {} @memo() function foo1(this: B, __memo_context: __memo_context_type, __memo_id: __memo_id_type, str: string): void { - const __memo_scope = __memo_context.scope(((__memo_id) + (38567515)), 2); + const __memo_scope = __memo_context.scope(((__memo_id) + (38567515)), 2); const __memo_parameter_this = __memo_scope.param(0, this), __memo_parameter_str = __memo_scope.param(1, str); if (__memo_scope.unchanged) { __memo_scope.cached; diff --git a/arkui-plugins/test/ut/memo-plugins/lambda-literals/trailing-lambdas.test.ts b/arkui-plugins/test/ut/memo-plugins/lambda-literals/trailing-lambdas.test.ts index b2465acc7af6249c504a615323acf7e4e6e429a0..13a973259e78365cef4d1ec6ddc69f46641a2b0f 100644 --- a/arkui-plugins/test/ut/memo-plugins/lambda-literals/trailing-lambdas.test.ts +++ b/arkui-plugins/test/ut/memo-plugins/lambda-literals/trailing-lambdas.test.ts @@ -35,7 +35,7 @@ import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id import { memo as memo } from \"arkui.stateManagement.runtime\"; function main() {} @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -45,7 +45,7 @@ function main() {} console.log(); })); a.goo(((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -57,7 +57,7 @@ function main() {} } })); a.koo(__memo_context, ((__memo_id) + ()), ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -72,7 +72,7 @@ function main() {} console.log(); })); par(((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -84,7 +84,7 @@ function main() {} } })); kar(__memo_context, ((__memo_id) + ()), ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -101,7 +101,7 @@ function main() {} } }); @memo() function bar(__memo_context: __memo_context_type, __memo_id: __memo_id_type, f?: (()=> void)): void { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 1); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 1); const __memo_parameter_f = __memo_scope.param(0, f); if (__memo_scope.unchanged) { __memo_scope.cached; @@ -114,7 +114,7 @@ function main() {} } function par(f?: @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void)): void {} @memo() function kar(__memo_context: __memo_context_type, __memo_id: __memo_id_type, @memo() f?: ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void)): void { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 1); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 1); const __memo_parameter_f = __memo_scope.param(0, f); if (__memo_scope.unchanged) { __memo_scope.cached; @@ -127,7 +127,7 @@ function par(f?: @memo() ((__memo_context: __memo_context_type, __memo_id: __mem } class A { @memo() public foo(__memo_context: __memo_context_type, __memo_id: __memo_id_type, p?: (()=> void)): void { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 1); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 1); const __memo_parameter_p = __memo_scope.param(0, p); if (__memo_scope.unchanged) { __memo_scope.cached; @@ -140,7 +140,7 @@ class A { } public goo(@memo() p?: ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void)): void {} @memo() public koo(__memo_context: __memo_context_type, __memo_id: __memo_id_type, @memo() p?: ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void)): void { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 1); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 1); const __memo_parameter_p = __memo_scope.param(0, p); if (__memo_scope.unchanged) { __memo_scope.cached; diff --git a/arkui-plugins/test/ut/memo-plugins/lambda-literals/void-lambda.test.ts b/arkui-plugins/test/ut/memo-plugins/lambda-literals/void-lambda.test.ts index 37b1c13655ec89a611c7d49d6fc1f13b28810d15..eff93d6fd213c8e9cb9e5b164cb9a30ac6944d56 100644 --- a/arkui-plugins/test/ut/memo-plugins/lambda-literals/void-lambda.test.ts +++ b/arkui-plugins/test/ut/memo-plugins/lambda-literals/void-lambda.test.ts @@ -35,7 +35,7 @@ import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id import { memo as memo } from \"arkui.stateManagement.runtime\"; function main() {} @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type): void => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -46,7 +46,7 @@ function main() {} } }); @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type, arg?: (()=> string)): void => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 1); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 1); const __memo_parameter_arg = __memo_scope.param(0, arg); if (__memo_scope.unchanged) { __memo_scope.cached; diff --git a/arkui-plugins/test/ut/memo-plugins/lambda-literals/with-receiver.test.ts b/arkui-plugins/test/ut/memo-plugins/lambda-literals/with-receiver.test.ts index 748b1dd4b520b4881721b271ec8c6fedc6884833..e031f864d87d5a37d3f26c3857d3703b1cc1c500 100644 --- a/arkui-plugins/test/ut/memo-plugins/lambda-literals/with-receiver.test.ts +++ b/arkui-plugins/test/ut/memo-plugins/lambda-literals/with-receiver.test.ts @@ -37,14 +37,14 @@ import { memo as memo } from \"arkui.stateManagement.runtime\"; function main() {} @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; } let x = new Person(); fullName(x, __memo_context, ((__memo_id) + ()), ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -58,7 +58,7 @@ function main() {} let f2: F2 = goo; let a = new A(); f1(a, __memo_context, ((__memo_id) + ()), ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -69,7 +69,7 @@ function main() {} } })); f1(a, __memo_context, ((__memo_id) + ()), ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -80,7 +80,7 @@ function main() {} } })); f2(__memo_context, ((__memo_id) + ()), a, ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -97,7 +97,7 @@ function main() {} }); @memo() function fullName(this: Person, __memo_context: __memo_context_type, __memo_id: __memo_id_type, @memo() arg?: ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void)): void { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 2); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 2); const __memo_parameter_this = __memo_scope.param(0, this), __memo_parameter_arg = __memo_scope.param(1, arg); if (__memo_scope.unchanged) { __memo_scope.cached; @@ -110,7 +110,7 @@ function main() {} } @memo() function foo(this: A, __memo_context: __memo_context_type, __memo_id: __memo_id_type, @memo() arg?: ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void)): void { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 2); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 2); const __memo_parameter_this = __memo_scope.param(0, this), __memo_parameter_arg = __memo_scope.param(1, arg); if (__memo_scope.unchanged) { __memo_scope.cached; @@ -123,7 +123,7 @@ function main() {} } @memo() function goo(__memo_context: __memo_context_type, __memo_id: __memo_id_type, a: A, @memo() arg?: ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void)): void { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 2); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 2); const __memo_parameter_a = __memo_scope.param(0, a), __memo_parameter_arg = __memo_scope.param(1, arg); if (__memo_scope.unchanged) { __memo_scope.cached; diff --git a/arkui-plugins/test/ut/memo-plugins/method-declarations/argument-call.test.ts b/arkui-plugins/test/ut/memo-plugins/method-declarations/argument-call.test.ts index f56a4c7cf0253c6502ce49436f73e8021dcd995b..4815096bdd3056cebefbbe3a28fa7057e6fcae2c 100644 --- a/arkui-plugins/test/ut/memo-plugins/method-declarations/argument-call.test.ts +++ b/arkui-plugins/test/ut/memo-plugins/method-declarations/argument-call.test.ts @@ -34,7 +34,7 @@ import { memo as memo } from \"arkui.stateManagement.runtime\"; function main() {} class Test { @memo() public lambda_arg(__memo_context: __memo_context_type, __memo_id: __memo_id_type, @memo() arg: ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void)) { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 1); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 1); const __memo_parameter_arg = __memo_scope.param(0, arg); if (__memo_scope.unchanged) { __memo_scope.cached; @@ -46,7 +46,7 @@ class Test { } } @memo() public lambda_arg_with_arg(__memo_context: __memo_context_type, __memo_id: __memo_id_type, @memo() arg: ((__memo_context: __memo_context_type, __memo_id: __memo_id_type, value: string)=> string)) { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 1); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 1); const __memo_parameter_arg = __memo_scope.param(0, arg); if (__memo_scope.unchanged) { __memo_scope.cached; @@ -58,7 +58,7 @@ class Test { } } @memo() public memo_content(__memo_context: __memo_context_type, __memo_id: __memo_id_type, @memo() content: ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void)) { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 1); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 1); const __memo_parameter_content = __memo_scope.param(0, content); if (__memo_scope.unchanged) { __memo_scope.cached; @@ -71,7 +71,7 @@ class Test { } } @memo() public compute_test(__memo_context: __memo_context_type, __memo_id: __memo_id_type, @memo() arg1: (((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void) | undefined), arg2: ((()=> void) | undefined), content: ((()=> void) | undefined)): void { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 3); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 3); const __memo_parameter_arg1 = __memo_scope.param(0, arg1), __memo_parameter_arg2 = __memo_scope.param(1, arg2), __memo_parameter_content = __memo_scope.param(2, content); if (__memo_scope.unchanged) { __memo_scope.cached; @@ -86,14 +86,14 @@ class Test { } class Use { @memo() public test(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; } const test = new Test(); test.lambda_arg(__memo_context, ((__memo_id) + ()), ((__memo_context: __memo_context_type, __memo_id: __memo_id_type): void => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -112,7 +112,7 @@ class Use { return __memo_scope.recache(__memo_parameter_value.value); })); test.compute_test(__memo_context, ((__memo_id) + ()), ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; diff --git a/arkui-plugins/test/ut/memo-plugins/method-declarations/callable.test.ts b/arkui-plugins/test/ut/memo-plugins/method-declarations/callable.test.ts index c611a8e99dcd1ac328a65bc6a48a66103cc53a5a..7ba7e61fc92563adebcf0b8f86d16af6e3033811 100644 --- a/arkui-plugins/test/ut/memo-plugins/method-declarations/callable.test.ts +++ b/arkui-plugins/test/ut/memo-plugins/method-declarations/callable.test.ts @@ -33,14 +33,14 @@ import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id import { memo as memo } from \"arkui.stateManagement.runtime\"; function main() {} @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; } A.$_invoke(__memo_context, ((__memo_id) + ())); B.$_invoke(((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -63,7 +63,7 @@ function main() {} }); class A { @memo() public static $_invoke(__memo_context: __memo_context_type, __memo_id: __memo_id_type): void { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; diff --git a/arkui-plugins/test/ut/memo-plugins/method-declarations/declare-and-call.test.ts b/arkui-plugins/test/ut/memo-plugins/method-declarations/declare-and-call.test.ts index d1e6012ea7cdde4b5b9293f6336e1a4abfd535f4..a32b01e5ea78f91635f51f2747c631f4a62187d5 100644 --- a/arkui-plugins/test/ut/memo-plugins/method-declarations/declare-and-call.test.ts +++ b/arkui-plugins/test/ut/memo-plugins/method-declarations/declare-and-call.test.ts @@ -35,7 +35,7 @@ import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id import { memo as memo } from \"arkui.stateManagement.runtime\"; function main() {} @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -55,7 +55,7 @@ declare abstract class A { } class AA extends A { @memo() public x(__memo_context: __memo_context_type, __memo_id: __memo_id_type): void { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; diff --git a/arkui-plugins/test/ut/memo-plugins/method-declarations/internal-calls.test.ts b/arkui-plugins/test/ut/memo-plugins/method-declarations/internal-calls.test.ts index caf2b1b9fc3addf9a3e03f33f6be9cb5b60fe728..916420a9bcf9f5295faac8d758cf8fd588fc1ad9 100644 --- a/arkui-plugins/test/ut/memo-plugins/method-declarations/internal-calls.test.ts +++ b/arkui-plugins/test/ut/memo-plugins/method-declarations/internal-calls.test.ts @@ -41,7 +41,7 @@ export function __id(): __memo_id_type type MemoType = @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void); class Test { @memo() public void_method(__memo_context: __memo_context_type, __memo_id: __memo_id_type): void { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -52,7 +52,7 @@ class Test { } } @memo() public internal_call(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -64,7 +64,7 @@ class Test { } } @memo() public method_with_internals(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -78,7 +78,7 @@ class Test { } public memo_lambda() { @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -90,7 +90,7 @@ class Test { }); } @memo() public memo_variables(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -130,7 +130,7 @@ class Test { return 20; }) as (()=> int))); let arg3: int = (((gensym%%_3) !== (undefined)) ? gensym%%_3 : (arg1 as int)); - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 4); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 4); const __memo_parameter_arg1 = __memo_scope.param(0, arg1), __memo_parameter_arg2 = __memo_scope.param(1, arg2), __memo_parameter_arg3 = __memo_scope.param(2, arg3), __memo_parameter_arg4 = __memo_scope.param(3, arg4); if (__memo_scope.unchanged) { __memo_scope.cached; @@ -144,7 +144,7 @@ class Test { } } @memo() public optional_args(__memo_context: __memo_context_type, __memo_id: __memo_id_type, arg1?: int, arg2?: (()=> int)) { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 2); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 2); const __memo_parameter_arg1 = __memo_scope.param(0, arg1), __memo_parameter_arg2 = __memo_scope.param(1, arg2); if (__memo_scope.unchanged) { __memo_scope.cached; @@ -160,7 +160,7 @@ class Test { } } @memo() public type_alias(__memo_context: __memo_context_type, __memo_id: __memo_id_type, arg: MemoType) { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 1); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 1); const __memo_parameter_arg = __memo_scope.param(0, arg); if (__memo_scope.unchanged) { __memo_scope.cached; diff --git a/arkui-plugins/test/ut/memo-plugins/method-declarations/non-void-method.test.ts b/arkui-plugins/test/ut/memo-plugins/method-declarations/non-void-method.test.ts index 8957ca871ad3e5e0da09ea031a439130286396e6..9551067c720bbefc39a1f22c72272f42b3efd8f2 100644 --- a/arkui-plugins/test/ut/memo-plugins/method-declarations/non-void-method.test.ts +++ b/arkui-plugins/test/ut/memo-plugins/method-declarations/non-void-method.test.ts @@ -43,7 +43,7 @@ export function __id(): __memo_id_type @Retention({policy:"SOURCE"}) @interface memo_skip {} class Test { @memo() public void_method(__memo_context: __memo_context_type, __memo_id: __memo_id_type): void { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -103,7 +103,7 @@ class Test { } class Use { @memo() public test(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; diff --git a/arkui-plugins/test/ut/memo-plugins/method-declarations/void-method.test.ts b/arkui-plugins/test/ut/memo-plugins/method-declarations/void-method.test.ts index 41e73d5bb6563d50dc70a623b274578e99c570a5..43eb6ebe5659a045504b90bcc1d6f75d0280d1a6 100644 --- a/arkui-plugins/test/ut/memo-plugins/method-declarations/void-method.test.ts +++ b/arkui-plugins/test/ut/memo-plugins/method-declarations/void-method.test.ts @@ -41,7 +41,7 @@ class A { } class Test { @memo() public void_method(__memo_context: __memo_context_type, __memo_id: __memo_id_type): void { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -52,7 +52,7 @@ class Test { } } @memo() public a_method_with_implicit_return_type(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -63,7 +63,7 @@ class Test { } } @memo() public void_method_with_arg(__memo_context: __memo_context_type, __memo_id: __memo_id_type, arg: string) { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 1); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 1); const __memo_parameter_arg = __memo_scope.param(0, arg); if (__memo_scope.unchanged) { __memo_scope.cached; @@ -75,7 +75,7 @@ class Test { } } @memo() public void_method_with_return(__memo_context: __memo_context_type, __memo_id: __memo_id_type, arg: string) { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 1); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 1); const __memo_parameter_arg = __memo_scope.param(0, arg); if (__memo_scope.unchanged) { __memo_scope.cached; @@ -87,7 +87,7 @@ class Test { } } @memo() public static static_method_with_type_parameter(__memo_context: __memo_context_type, __memo_id: __memo_id_type, arg: T): void { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 1); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 1); const __memo_parameter_arg = __memo_scope.param(0, arg); if (__memo_scope.unchanged) { __memo_scope.cached; @@ -99,7 +99,7 @@ class Test { } } @memo() public obj_arg(__memo_context: __memo_context_type, __memo_id: __memo_id_type, arg: A) { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 1); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 1); const __memo_parameter_arg = __memo_scope.param(0, arg); if (__memo_scope.unchanged) { __memo_scope.cached; @@ -114,7 +114,7 @@ class Test { } class Use { @memo() public test(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; diff --git a/arkui-plugins/test/ut/memo-plugins/property-declarations/class-constructor.test.ts b/arkui-plugins/test/ut/memo-plugins/property-declarations/class-constructor.test.ts index b3be707bacd797ed55de8322d0854c2c26cf204d..eb0970255b5c5088f9161849effc7bd075c0945f 100644 --- a/arkui-plugins/test/ut/memo-plugins/property-declarations/class-constructor.test.ts +++ b/arkui-plugins/test/ut/memo-plugins/property-declarations/class-constructor.test.ts @@ -35,14 +35,14 @@ import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id import { memo as memo } from \"arkui.stateManagement.runtime\"; function main() {} @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; } let a = new AA({ a: ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -72,7 +72,7 @@ class AA { (((gensym%%_) == (null)) ? undefined : gensym%%_.a)}); } @memo() public build(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; diff --git a/arkui-plugins/test/ut/memo-plugins/property-declarations/class-properties.test.ts b/arkui-plugins/test/ut/memo-plugins/property-declarations/class-properties.test.ts index 1a97511af702bcfdf1e613dbc950f2081d37d235..d2b8f2940583679001289f29f9cf50ebcc834b27 100644 --- a/arkui-plugins/test/ut/memo-plugins/property-declarations/class-properties.test.ts +++ b/arkui-plugins/test/ut/memo-plugins/property-declarations/class-properties.test.ts @@ -39,7 +39,7 @@ class A { @memo() public memo_arg: ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void); @memo() public memo_optional_arg?: (((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void) | undefined); @memo() public memo_union_arg: (((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void) | undefined) = ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -53,7 +53,7 @@ class A { public constructor() { this.arg = (() => {}); this.memo_arg = ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -64,7 +64,7 @@ class A { } }); this.arg_memo_type = ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -76,7 +76,7 @@ class A { }); } @memo() public build(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; diff --git a/arkui-plugins/test/ut/memo-plugins/property-declarations/interfaces.test.ts b/arkui-plugins/test/ut/memo-plugins/property-declarations/interfaces.test.ts index a28664fde2474320eb0656d51a88c3ef73b1cb8c..4aa135095e3d027cd6a2df65d995685ba3ff2a52 100644 --- a/arkui-plugins/test/ut/memo-plugins/property-declarations/interfaces.test.ts +++ b/arkui-plugins/test/ut/memo-plugins/property-declarations/interfaces.test.ts @@ -33,7 +33,7 @@ import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id import { memo as memo } from \"arkui.stateManagement.runtime\"; function main() {} @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -41,7 +41,7 @@ function main() {} let a: A = { arg: (() => {}), memo_arg: ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -52,7 +52,7 @@ function main() {} } }), memo_union_arg: ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -63,7 +63,7 @@ function main() {} } }), arg_memo_type: ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; diff --git a/arkui-plugins/test/ut/ui-plugins/builder-lambda/if-break-in-nested-content.test.ts b/arkui-plugins/test/ut/ui-plugins/builder-lambda/if-break-in-nested-content.test.ts index 5c6a393ff785fb0decc0cc4b7c0124415517c00a..4bd49b883d930f50345c84dd70e10fd667d15ed4 100644 --- a/arkui-plugins/test/ut/ui-plugins/builder-lambda/if-break-in-nested-content.test.ts +++ b/arkui-plugins/test/ut/ui-plugins/builder-lambda/if-break-in-nested-content.test.ts @@ -98,44 +98,44 @@ function main() {} public __initializeStruct(initializers: (__Options_A | undefined), @memo() content: (((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void) | undefined)): void {} public __updateStruct(initializers: (__Options_A | undefined)): void {} @memo() public build(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; } Column(__memo_context, ((__memo_id) + ()), undefined, undefined, @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; } Column(__memo_context, ((__memo_id) + ()), undefined, undefined, @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; } Column(__memo_context, ((__memo_id) + ()), undefined, undefined, @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; } Column(__memo_context, ((__memo_id) + ()), undefined, undefined, @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; } ConditionScope(__memo_context, ((__memo_id) + ()), @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; } if (false) { ConditionBranch(__memo_context, ((__memo_id) + ()), @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -170,14 +170,14 @@ function main() {} } })); ConditionScope(__memo_context, ((__memo_id) + ()), @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; } if (true) { ConditionBranch(__memo_context, ((__memo_id) + ()), @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; diff --git a/arkui-plugins/test/ut/ui-plugins/builder-lambda/if-else-in-content.test.ts b/arkui-plugins/test/ut/ui-plugins/builder-lambda/if-else-in-content.test.ts index bf60c883dd8fd4b874144b98fc072a61e768fea4..f86006d9f2b662281b7afec1af90ed5af50ea04c 100644 --- a/arkui-plugins/test/ut/ui-plugins/builder-lambda/if-else-in-content.test.ts +++ b/arkui-plugins/test/ut/ui-plugins/builder-lambda/if-else-in-content.test.ts @@ -113,39 +113,39 @@ function main() {} public __initializeStruct(initializers: (__Options_IfElse | undefined), @memo() content: (((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void) | undefined)): void {} public __updateStruct(initializers: (__Options_IfElse | undefined)): void {} @memo() public build(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; } Column(__memo_context, ((__memo_id) + ()), undefined, undefined, @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; } ConditionScope(__memo_context, ((__memo_id) + ()), @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; } if (true) { ConditionBranch(__memo_context, ((__memo_id) + ()), @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; } ConditionScope(__memo_context, ((__memo_id) + ()), @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; } if (false) { ConditionBranch(__memo_context, ((__memo_id) + ()), @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -158,14 +158,14 @@ function main() {} })); } else { ConditionScope(__memo_context, ((__memo_id) + ()), @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; } if (true) { ConditionBranch(__memo_context, ((__memo_id) + ()), @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -178,7 +178,7 @@ function main() {} })); } else { ConditionBranch(__memo_context, ((__memo_id) + ()), @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -208,14 +208,14 @@ function main() {} })); } else { ConditionScope(__memo_context, ((__memo_id) + ()), @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; } if (false) { ConditionBranch(__memo_context, ((__memo_id) + ()), @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -228,7 +228,7 @@ function main() {} })); } else { ConditionBranch(__memo_context, ((__memo_id) + ()), @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; diff --git a/arkui-plugins/test/ut/ui-plugins/builder-lambda/simple-component.test.ts b/arkui-plugins/test/ut/ui-plugins/builder-lambda/simple-component.test.ts index e8e1ace16621ce77238c023b35f9aec5457e3673..57c3e242cd99814cae4c0cc682ccbf45fed6c9cc 100644 --- a/arkui-plugins/test/ut/ui-plugins/builder-lambda/simple-component.test.ts +++ b/arkui-plugins/test/ut/ui-plugins/builder-lambda/simple-component.test.ts @@ -55,13 +55,13 @@ import { Column as Column, ColumnAttribute as ColumnAttribute } from \"arkui.com function main() {} class MyStateSample { @memo() public build(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { - const __memo_scope = __memo_context.scope(((__memo_id) + (263357132)), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + (263357132)), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; } Column(__memo_context, ((__memo_id) + (65509320)), undefined, undefined, @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + (147296800)), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + (147296800)), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; diff --git a/arkui-plugins/test/ut/ui-plugins/builder-lambda/switch-case-in-content.test.ts b/arkui-plugins/test/ut/ui-plugins/builder-lambda/switch-case-in-content.test.ts index 9559e935a6c74a53cc54fe160748a28160a664ad..d3a09a7c314a749b89a394934383bbba267a0fa6 100644 --- a/arkui-plugins/test/ut/ui-plugins/builder-lambda/switch-case-in-content.test.ts +++ b/arkui-plugins/test/ut/ui-plugins/builder-lambda/switch-case-in-content.test.ts @@ -124,19 +124,19 @@ function main() {} this.__backing_num = value; } @memo() public build(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; } Column(__memo_context, ((__memo_id) + ()), undefined, undefined, @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; } ConditionScope(__memo_context, ((__memo_id) + ()), @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -144,7 +144,7 @@ function main() {} switch (this.num) { case \"0\": { ConditionBranch(__memo_context, ((__memo_id) + ()), @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -158,7 +158,7 @@ function main() {} } case \"1\": { ConditionBranch(__memo_context, ((__memo_id) + ()), @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -174,7 +174,7 @@ function main() {} } case \"2\": { ConditionBranch(__memo_context, ((__memo_id) + ()), @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -190,7 +190,7 @@ function main() {} } default: { ConditionBranch(__memo_context, ((__memo_id) + ()), @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; diff --git a/arkui-plugins/test/ut/ui-plugins/decorators/builder-param/builder-param-passing.test.ts b/arkui-plugins/test/ut/ui-plugins/decorators/builder-param/builder-param-passing.test.ts index bed12d063ca9608ec71fc5987e3bae456cc668bd..ebb8c68c538cda7e878f152a1e30bad63cb568fa 100644 --- a/arkui-plugins/test/ut/ui-plugins/decorators/builder-param/builder-param-passing.test.ts +++ b/arkui-plugins/test/ut/ui-plugins/decorators/builder-param/builder-param-passing.test.ts @@ -148,7 +148,7 @@ function main() {} } @memo() public customBuilder(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { - const __memo_scope = __memo_context.scope(((__memo_id) + (252759234)), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + (252759234)), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -160,7 +160,7 @@ function main() {} } @memo() public build(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { - const __memo_scope = __memo_context.scope(((__memo_id) + (209256344)), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + (209256344)), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -182,7 +182,7 @@ function main() {} public __updateStruct(initializers: (__Options_Parent | undefined)): void {} @memo() public componentBuilder(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { - const __memo_scope = __memo_context.scope(((__memo_id) + (219399173)), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + (219399173)), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -195,13 +195,13 @@ function main() {} } @memo() public build(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { - const __memo_scope = __memo_context.scope(((__memo_id) + (135515930)), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + (135515930)), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; } Column(__memo_context, ((__memo_id) + (136716185)), undefined, undefined, @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + (54078781)), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + (54078781)), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -215,7 +215,7 @@ function main() {} return new Child(); }), { customBuilderParam: @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + (76711614)), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + (76711614)), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -230,7 +230,7 @@ function main() {} Child._instantiateImpl(__memo_context, ((__memo_id) + (213687742)), undefined, (() => { return new Child(); }), undefined, undefined, @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + (192802443)), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + (192802443)), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; diff --git a/arkui-plugins/test/ut/ui-plugins/decorators/builder-param/init-with-local-builder.test.ts b/arkui-plugins/test/ut/ui-plugins/decorators/builder-param/init-with-local-builder.test.ts index 36276ba82f94353aa20e4c17b9d0da5d44b3f27c..c65876141e351fc6bafedf9be2af7c155e3857aa 100644 --- a/arkui-plugins/test/ut/ui-plugins/decorators/builder-param/init-with-local-builder.test.ts +++ b/arkui-plugins/test/ut/ui-plugins/decorators/builder-param/init-with-local-builder.test.ts @@ -136,7 +136,7 @@ function main() {} } @memo() public doNothingBuilder(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { - const __memo_scope = __memo_context.scope(((__memo_id) + (174403279)), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + (174403279)), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -148,7 +148,7 @@ function main() {} } @memo() public doNothingBuilder2(__memo_context: __memo_context_type, __memo_id: __memo_id_type, str: string) { - const __memo_scope = __memo_context.scope(((__memo_id) + (76253767)), 1); + const __memo_scope = __memo_context.scope(((__memo_id) + (76253767)), 1); const __memo_parameter_str = __memo_scope.param(0, str); if (__memo_scope.unchanged) { __memo_scope.cached; @@ -161,7 +161,7 @@ function main() {} } @memo() public build(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { - const __memo_scope = __memo_context.scope(((__memo_id) + (179390036)), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + (179390036)), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; diff --git a/arkui-plugins/test/ut/ui-plugins/decorators/builder-param/optional-builder-param.test.ts b/arkui-plugins/test/ut/ui-plugins/decorators/builder-param/optional-builder-param.test.ts index 1a32d8c7a24067b98c9fb01c7ba20ed4fee65102..1463c68025fd46903d2d0c9604c4f6915dabd9db 100644 --- a/arkui-plugins/test/ut/ui-plugins/decorators/builder-param/optional-builder-param.test.ts +++ b/arkui-plugins/test/ut/ui-plugins/decorators/builder-param/optional-builder-param.test.ts @@ -155,7 +155,7 @@ import { Component as Component, Entry as Entry, Builder as Builder, BuilderPara function main() {} @memo() function showTextBuilder(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { - const __memo_scope = __memo_context.scope(((__memo_id) + (183537441)), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + (183537441)), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -198,26 +198,26 @@ function main() {} } @memo() public build(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { - const __memo_scope = __memo_context.scope(((__memo_id) + (234402485)), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + (234402485)), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; } Row(__memo_context, ((__memo_id) + (46726221)), undefined, undefined, @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + (213104625)), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + (213104625)), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; } ConditionScope(__memo_context, ((__memo_id) + ()), @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; } if (this.customBuilderParam2) { ConditionBranch(__memo_context, ((__memo_id) + ()), @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -235,14 +235,14 @@ function main() {} } })); ConditionScope(__memo_context, ((__memo_id) + ()), @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; } if (this.customBuilderParam2) { ConditionBranch(__memo_context, ((__memo_id) + ()), @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -281,7 +281,7 @@ function main() {} public __updateStruct(initializers: (__Options_Parent | undefined)): void {} @memo() public componentBuilder(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { - const __memo_scope = __memo_context.scope(((__memo_id) + (179117969)), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + (179117969)), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -294,13 +294,13 @@ function main() {} } @memo() public build(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { - const __memo_scope = __memo_context.scope(((__memo_id) + (245938697)), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + (245938697)), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; } Column(__memo_context, ((__memo_id) + (78055758)), undefined, undefined, @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + (136716185)), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + (136716185)), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -309,7 +309,7 @@ function main() {} return new Child(); }), { customBuilderParam2: @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + (213687742)), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + (213687742)), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; diff --git a/arkui-plugins/test/ut/ui-plugins/wrap-builder/builder-in-generic.test.ts b/arkui-plugins/test/ut/ui-plugins/wrap-builder/builder-in-generic.test.ts index 4f7fc9dc54b685a163191f5e54ea64eb2f85de53..3edafdc23788af32d33360bcfb4d710f8f33e5fb 100644 --- a/arkui-plugins/test/ut/ui-plugins/wrap-builder/builder-in-generic.test.ts +++ b/arkui-plugins/test/ut/ui-plugins/wrap-builder/builder-in-generic.test.ts @@ -147,14 +147,14 @@ __EntryWrapper.RegisterNamedRouter(\"\", new __EntryWrapper(), ({ integratedHsp: \"false\", } as NavInterface)); @memo() function MyBuilder(__memo_context: __memo_context_type, __memo_id: __memo_id_type, value: string, size: number) { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 2); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 2); const __memo_parameter_value = __memo_scope.param(0, value), __memo_parameter_size = __memo_scope.param(1, size); if (__memo_scope.unchanged) { __memo_scope.cached; return; } Text(__memo_context, ((__memo_id) + ()), @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type, instance: TextAttribute): void => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 1); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 1); const __memo_parameter_instance = __memo_scope.param(0, instance); if (__memo_scope.unchanged) { __memo_scope.cached; @@ -172,14 +172,14 @@ __EntryWrapper.RegisterNamedRouter(\"\", new __EntryWrapper(), ({ } } @memo() function YourBuilder(__memo_context: __memo_context_type, __memo_id: __memo_id_type, value: string, size: number) { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 2); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 2); const __memo_parameter_value = __memo_scope.param(0, value), __memo_parameter_size = __memo_scope.param(1, size); if (__memo_scope.unchanged) { __memo_scope.cached; return; } Text(__memo_context, ((__memo_id) + ()), @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type, instance: TextAttribute): void => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 1); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 1); const __memo_parameter_instance = __memo_scope.param(0, instance); if (__memo_scope.unchanged) { __memo_scope.cached; @@ -210,13 +210,13 @@ __EntryWrapper.RegisterNamedRouter(\"\", new __EntryWrapper(), ({ this.__backing_message!.set(value); } @memo() public build(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; } Row(__memo_context, ((__memo_id) + ()), @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type, instance: RowAttribute): void => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 1); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 1); const __memo_parameter_instance = __memo_scope.param(0, instance); if (__memo_scope.unchanged) { __memo_scope.cached; @@ -228,7 +228,7 @@ __EntryWrapper.RegisterNamedRouter(\"\", new __EntryWrapper(), ({ return; } }), undefined, @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -237,7 +237,7 @@ __EntryWrapper.RegisterNamedRouter(\"\", new __EntryWrapper(), ({ ForEach(__memo_context, ((__memo_id) + ()), ((): Array<@Builder() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type, value: string, size: number)=> void)> => { return builderArr; }), ((__memo_context: __memo_context_type, __memo_id: __memo_id_type, @memo() item: @Builder() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type, value: string, size: number)=> void)) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 1); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 1); const __memo_parameter_item = __memo_scope.param(0, item); if (__memo_scope.unchanged) { __memo_scope.cached; @@ -269,7 +269,7 @@ __EntryWrapper.RegisterNamedRouter(\"\", new __EntryWrapper(), ({ } class __EntryWrapper extends EntryPoint { @memo() public entry(__memo_context: __memo_context_type, __memo_id: __memo_id_type): void { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; diff --git a/arkui-plugins/test/ut/ui-plugins/wrap-builder/init-with-builder.test.ts b/arkui-plugins/test/ut/ui-plugins/wrap-builder/init-with-builder.test.ts index c3443baebc981a5bdd94c81d55d5e2b17df311b1..06231c6f2222825d7d72baff32ff7426e3836cd5 100644 --- a/arkui-plugins/test/ut/ui-plugins/wrap-builder/init-with-builder.test.ts +++ b/arkui-plugins/test/ut/ui-plugins/wrap-builder/init-with-builder.test.ts @@ -100,14 +100,14 @@ function main() {} globalBuilder = wrapBuilder(myBuilder); @memo() function myBuilder(__memo_context: __memo_context_type, __memo_id: __memo_id_type, value: string, size: number) { - const __memo_scope = __memo_context.scope(((__memo_id) + (52041161)), 2); + const __memo_scope = __memo_context.scope(((__memo_id) + (52041161)), 2); const __memo_parameter_value = __memo_scope.param(0, value), __memo_parameter_size = __memo_scope.param(1, size); if (__memo_scope.unchanged) { __memo_scope.cached; return; } Text(__memo_context, ((__memo_id) + (175145513)), @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type, instance: TextAttribute): void => { - const __memo_scope = __memo_context.scope(((__memo_id) + (47330804)), 1); + const __memo_scope = __memo_context.scope(((__memo_id) + (47330804)), 1); const __memo_parameter_instance = __memo_scope.param(0, instance); if (__memo_scope.unchanged) { __memo_scope.cached; @@ -134,13 +134,13 @@ globalBuilder = wrapBuilder(myBuilder); public __updateStruct(initializers: (__Options_ImportStruct | undefined)): void {} @memo() public build(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { - const __memo_scope = __memo_context.scope(((__memo_id) + (172572715)), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + (172572715)), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; } Column(__memo_context, ((__memo_id) + (213104625)), undefined, undefined, @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + (211301233)), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + (211301233)), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; diff --git a/arkui-plugins/test/ut/ui-plugins/wrap-builder/wrap-builder-in-generic.test.ts b/arkui-plugins/test/ut/ui-plugins/wrap-builder/wrap-builder-in-generic.test.ts index d5e87c590cc30d38d715a493fcccfbfe00a7cda6..f180ac50f539bf34b3969f3ad4ee224a47c96129 100644 --- a/arkui-plugins/test/ut/ui-plugins/wrap-builder/wrap-builder-in-generic.test.ts +++ b/arkui-plugins/test/ut/ui-plugins/wrap-builder/wrap-builder-in-generic.test.ts @@ -147,14 +147,14 @@ __EntryWrapper.RegisterNamedRouter(\"\", new __EntryWrapper(), ({ integratedHsp: \"false\", } as NavInterface)); @memo() function MyBuilder(__memo_context: __memo_context_type, __memo_id: __memo_id_type, value: string, size: number) { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 2); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 2); const __memo_parameter_value = __memo_scope.param(0, value), __memo_parameter_size = __memo_scope.param(1, size); if (__memo_scope.unchanged) { __memo_scope.cached; return; } Text(__memo_context, ((__memo_id) + ()), @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type, instance: TextAttribute): void => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 1); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 1); const __memo_parameter_instance = __memo_scope.param(0, instance); if (__memo_scope.unchanged) { __memo_scope.cached; @@ -172,14 +172,14 @@ __EntryWrapper.RegisterNamedRouter(\"\", new __EntryWrapper(), ({ } } @memo() function YourBuilder(__memo_context: __memo_context_type, __memo_id: __memo_id_type, value: string, size: number) { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 2); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 2); const __memo_parameter_value = __memo_scope.param(0, value), __memo_parameter_size = __memo_scope.param(1, size); if (__memo_scope.unchanged) { __memo_scope.cached; return; } Text(__memo_context, ((__memo_id) + ()), @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type, instance: TextAttribute): void => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 1); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 1); const __memo_parameter_instance = __memo_scope.param(0, instance); if (__memo_scope.unchanged) { __memo_scope.cached; @@ -210,13 +210,13 @@ __EntryWrapper.RegisterNamedRouter(\"\", new __EntryWrapper(), ({ this.__backing_message!.set(value); } @memo() public build(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; } Row(__memo_context, ((__memo_id) + ()), @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type, instance: RowAttribute): void => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 1); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 1); const __memo_parameter_instance = __memo_scope.param(0, instance); if (__memo_scope.unchanged) { __memo_scope.cached; @@ -228,7 +228,7 @@ __EntryWrapper.RegisterNamedRouter(\"\", new __EntryWrapper(), ({ return; } }), undefined, @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -237,7 +237,7 @@ __EntryWrapper.RegisterNamedRouter(\"\", new __EntryWrapper(), ({ ForEach(__memo_context, ((__memo_id) + ()), ((): Array void)>> => { return builderArr; }), ((__memo_context: __memo_context_type, __memo_id: __memo_id_type, item: WrappedBuilder<@Builder() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type, value: string, size: number)=> void)>) => { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 1); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 1); const __memo_parameter_item = __memo_scope.param(0, item); if (__memo_scope.unchanged) { __memo_scope.cached; @@ -269,7 +269,7 @@ __EntryWrapper.RegisterNamedRouter(\"\", new __EntryWrapper(), ({ } class __EntryWrapper extends EntryPoint { @memo() public entry(__memo_context: __memo_context_type, __memo_id: __memo_id_type): void { - const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + ()), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; diff --git a/arkui-plugins/test/ut/ui-plugins/wrap-builder/wrap-builder-in-ui.test.ts b/arkui-plugins/test/ut/ui-plugins/wrap-builder/wrap-builder-in-ui.test.ts index 0b6a8c4ebef6d279b560c4b4b6b64df244ba7d49..7487a427b72ee107c8563c8475895d6a00592e68 100644 --- a/arkui-plugins/test/ut/ui-plugins/wrap-builder/wrap-builder-in-ui.test.ts +++ b/arkui-plugins/test/ut/ui-plugins/wrap-builder/wrap-builder-in-ui.test.ts @@ -117,14 +117,14 @@ function main() {} @memo() function myBuilder(__memo_context: __memo_context_type, __memo_id: __memo_id_type, value: string, size: number) { - const __memo_scope = __memo_context.scope(((__memo_id) + (52041161)), 2); + const __memo_scope = __memo_context.scope(((__memo_id) + (52041161)), 2); const __memo_parameter_value = __memo_scope.param(0, value), __memo_parameter_size = __memo_scope.param(1, size); if (__memo_scope.unchanged) { __memo_scope.cached; return; } Text(__memo_context, ((__memo_id) + (175145513)), @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type, instance: TextAttribute): void => { - const __memo_scope = __memo_context.scope(((__memo_id) + (47330804)), 1); + const __memo_scope = __memo_context.scope(((__memo_id) + (47330804)), 1); const __memo_parameter_instance = __memo_scope.param(0, instance); if (__memo_scope.unchanged) { __memo_scope.cached; @@ -143,14 +143,14 @@ function main() {} } @memo() function yourBuilder(__memo_context: __memo_context_type, __memo_id: __memo_id_type, value: string, size: number) { - const __memo_scope = __memo_context.scope(((__memo_id) + (151467670)), 2); + const __memo_scope = __memo_context.scope(((__memo_id) + (151467670)), 2); const __memo_parameter_value = __memo_scope.param(0, value), __memo_parameter_size = __memo_scope.param(1, size); if (__memo_scope.unchanged) { __memo_scope.cached; return; } Text(__memo_context, ((__memo_id) + (211301233)), @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type, instance: TextAttribute): void => { - const __memo_scope = __memo_context.scope(((__memo_id) + (137225318)), 1); + const __memo_scope = __memo_context.scope(((__memo_id) + (137225318)), 1); const __memo_parameter_instance = __memo_scope.param(0, instance); if (__memo_scope.unchanged) { __memo_scope.cached; @@ -177,7 +177,7 @@ function main() {} public __updateStruct(initializers: (__Options_ImportStruct | undefined)): void {} @memo() public testBuilder(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { - const __memo_scope = __memo_context.scope(((__memo_id) + (194881372)), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + (194881372)), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -185,7 +185,7 @@ function main() {} ForEach(__memo_context, ((__memo_id) + (218979098)), ((): Array> => { return globalBuilderArr; }), ((__memo_context: __memo_context_type, __memo_id: __memo_id_type, item: WrappedBuilder) => { - const __memo_scope = __memo_context.scope(((__memo_id) + (76711614)), 1); + const __memo_scope = __memo_context.scope(((__memo_id) + (76711614)), 1); const __memo_parameter_item = __memo_scope.param(0, item); if (__memo_scope.unchanged) { __memo_scope.cached; @@ -204,13 +204,13 @@ function main() {} } @memo() public build(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { - const __memo_scope = __memo_context.scope(((__memo_id) + (142886843)), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + (142886843)), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; } Column(__memo_context, ((__memo_id) + (54078781)), undefined, undefined, @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + (213687742)), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + (213687742)), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; diff --git a/arkui-plugins/test/ut/ui-plugins/wrap-builder/wrap-builder-with-lambda.test.ts b/arkui-plugins/test/ut/ui-plugins/wrap-builder/wrap-builder-with-lambda.test.ts index 38ef976e6db101c0c27258bd8a3de3cd83ea166f..2ea88399bc5e3174e0d18c51a725cb301824d68f 100644 --- a/arkui-plugins/test/ut/ui-plugins/wrap-builder/wrap-builder-with-lambda.test.ts +++ b/arkui-plugins/test/ut/ui-plugins/wrap-builder/wrap-builder-with-lambda.test.ts @@ -220,14 +220,14 @@ function main() {} @memo() function overBuilder(__memo_context: __memo_context_type, __memo_id: __memo_id_type, param: (()=> Tmp)) { - const __memo_scope = __memo_context.scope(((__memo_id) + (133793681)), 1); + const __memo_scope = __memo_context.scope(((__memo_id) + (133793681)), 1); const __memo_parameter_param = __memo_scope.param(0, param); if (__memo_scope.unchanged) { __memo_scope.cached; return; } Column(__memo_context, ((__memo_id) + (241913892)), undefined, undefined, @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + (175145513)), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + (175145513)), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -314,13 +314,13 @@ function main() {} } @memo() public build(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { - const __memo_scope = __memo_context.scope(((__memo_id) + (69406103)), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + (69406103)), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; } Column(__memo_context, ((__memo_id) + (218979098)), undefined, undefined, @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { - const __memo_scope = __memo_context.scope(((__memo_id) + (76711614)), 0); + const __memo_scope = __memo_context.scope(((__memo_id) + (76711614)), 0); if (__memo_scope.unchanged) { __memo_scope.cached; return; @@ -331,7 +331,7 @@ function main() {} }; })); Button(__memo_context, ((__memo_id) + (46726221)), @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type, instance: ButtonAttribute): void => { - const __memo_scope = __memo_context.scope(((__memo_id) + (213104625)), 1); + const __memo_scope = __memo_context.scope(((__memo_id) + (213104625)), 1); const __memo_parameter_instance = __memo_scope.param(0, instance); if (__memo_scope.unchanged) { __memo_scope.cached;