Skip to content

py/objtype: Use locals_ptr directly instead of getting it from the slot. #17885

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

dpgeorge
Copy link
Member

Summary

This is a very minor code simplification. It should have no functional change.

Testing

To be tested by CI.

@dpgeorge dpgeorge added the py-core Relates to py/ directory in source label Aug 11, 2025
Copy link

Code size report:

   bare-arm:    -8 -0.014% 
minimal x86:    +0 +0.000% 
   unix x64:   -16 -0.002% standard
      stm32:    -8 -0.002% PYBV10
     mimxrt:    -8 -0.002% TEENSY40
        rp2:   -16 -0.002% RPI_PICO_W
       samd:    -8 -0.003% ADAFRUIT_ITSYBITSY_M4_EXPRESS
  qemu rv32:    -6 -0.001% VIRT_RV32

This is a very minor code simplification, which reduces code size by about
-8 bytes.  It should have no functional change.

Signed-off-by: Damien George <damien@micropython.org>
@dpgeorge dpgeorge force-pushed the py-objtype-minor-simplification-locals-ptr branch from d4a879c to 3650196 Compare August 19, 2025 02:59
@dpgeorge dpgeorge merged commit 3650196 into micropython:master Aug 19, 2025
@dpgeorge dpgeorge deleted the py-objtype-minor-simplification-locals-ptr branch August 19, 2025 03:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
py-core Relates to py/ directory in source
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant