summaryrefslogtreecommitdiff
path: root/mesonbuild/interpreter/interpreterobjects.py
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2025-01-27 12:48:07 +0100
committerJussi Pakkanen <jussi.pakkanen@mailbox.org>2025-06-17 12:29:56 +0300
commit9b3932abb3bcdd2dc5957e65a5097983efaab0f0 (patch)
tree78924c3529af4f33fb24e6cf64f170f049ffbd0c /mesonbuild/interpreter/interpreterobjects.py
parent2f47d0b4b15e27aa62f439c4b65282771149cc7c (diff)
downloadmeson-9b3932abb3bcdd2dc5957e65a5097983efaab0f0.tar.gz
interpreter: make methods per-class for primitives
Do not call update() and Enum.__hash__ a gazillion times; operators are the same for every instance of the class. In order to access the class, just mark the methods using a decorator and build METHODS later using __init_subclass__. Non-primitive objects are not converted yet to keep the patch small. They are created a lot less than other objects, especially strings and booleans. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'mesonbuild/interpreter/interpreterobjects.py')
0 files changed, 0 insertions, 0 deletions