From d0d1c3e88321713b12632a4177ed63c5576e54ce Mon Sep 17 00:00:00 2001 From: Romain Beguet Date: Tue, 21 May 2024 11:02:05 +0200 Subject: [PATCH] Remove unhelpful memoization. These properties where unexpectedly *not* memoized before the work on the linked langkit issue. The fix for that issue correctly turned them into memoized properties, but it turns out that memoizing those does not help: performance is not improved while memory footprint increases. This patch therefore makes these properties not memoized again. --- ada/ast.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ada/ast.py b/ada/ast.py index a2ca199b7..915a2bc36 100644 --- a/ada/ast.py +++ b/ada/ast.py @@ -3461,8 +3461,7 @@ def array_ndims(): is_array = Property(Entity.array_ndims > 0, dynamic_vars=[origin]) @langkit_property(return_type=T.BaseTypeDecl.entity, - dynamic_vars=[origin], - memoized=True) + dynamic_vars=[origin]) def expr_type(): """ Return the type declaration corresponding to this basic declaration @@ -7024,7 +7023,7 @@ def direct_primitives_env(): transitive_parent=False ) - @langkit_property(memoized=True) + @langkit_property() def primitives_env(): return EmptyEnv