Ticket #474 (closed enhancement: fixed)

Opened 3 years ago

Last modified 21 months ago

support non-overridable 'inline' methods

Reported by: scoder Owned by: vitja
Priority: major Milestone: 0.16
Component: Optimization Keywords:
Cc:

Description

When a method is declared 'inline', Cython should emit calling code that bypasses the method vtable. Code like the following would thus use a direct call to the small_method C function:

cdef class MyType:
     cdef list large_list
     cdef size_t y

     cdef big_method(self):
         for x in self.large_list:
             self.small_method(x)

     cdef inline small_method(self, x):
         self.y += x

This implies that 'inline' methods/functions are non-overridable.

Change History

Changed 3 years ago by scoder

A corresponding mailing list thread is here:

 http://comments.gmane.org/gmane.comp.python.cython.devel/8741

Changed 3 years ago by scoder

This is related to the "final" declaration on classes and methods, which is described in ticket #585 and #586.

Changed 3 years ago by scoder

  • component changed from Code Generation to Language Feature

Changed 3 years ago by scoder

  • component changed from Language Feature to Optimization

Changed 21 months ago by vitja

  • status changed from new to closed
  • resolution set to fixed
  • milestone changed from wishlist to 0.15.1

Changed 21 months ago by scoder

  • status changed from closed to reopened
  • resolution fixed deleted

Changed 21 months ago by scoder

  • owner changed from somebody to vitja
  • status changed from reopened to new

Changed 21 months ago by scoder

  • status changed from new to closed
  • resolution set to fixed

Changed 21 months ago by scoder

  • milestone changed from 0.15.1 to 0.16
Note: See TracTickets for help on using tickets.