Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Requesting more information about @inline from the compiler?

Tags:

The documentation for @inline states:

An annotation on methods that requests that the compiler should try especially hard to inline the annotated method.

However, unlike the similar @tailrec annotation, the compiler does not (by default) offer any information about whether or not it managed to inline a method.

Is there any way to determine if the compiler managed to inline an annotated method?

Specifically, I'd like for the compiler to tell me, for example, that in all reasonable cases it will be able to inline a method I marked. (Some situtations I can think of where it would warn me that it cannot inline a method is if it is not final, and hence requires a vtable lookup if the class is subclassed)

Related questions:

  • When should I (and should I not) use Scala's @inline annotation?
  • Does the @inline annotation in Scala really help performance?