nit icon indicating copy to clipboard operation
nit copied to clipboard

Inline annotation

Open lbajolet opened this issue 10 years ago • 1 comments

Hi,

Sometimes, when dealing with extremely low-level issues and micro-optimization, we could use some more inlining to shave some more instructions from a function.

It could go something like this

class A
    fun foo is force_inline do
        # do stuff
    end
end

Anyone to approve of this ?

lbajolet avatar Dec 02 '15 21:12 lbajolet

I can add it, but what is the behavior of

class A
   fun foo is force_inline do print "A"
end

class B
   super A
   redef foo do print "B"
end

var a: A = new B #  a is statically an A
a.foo # prints A or B?

privat avatar Dec 03 '15 01:12 privat