Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: X10 SVN HEAD
-
Fix Version/s: X10 2.3.2
-
Component/s: Managed X10: Compiler Codegen, Native X10: Compiler Codegen
-
Labels:None
-
Number of attachments :
Description
I created some methods in x10.runtime/src-x10/..., which will be compiled into x10 runtime.
Example: (T is class generics)
----------
@Inline public final def fastResult(worker:Worker):T {
@Ifdef("_CPP_")
@Ifndef("_CPP_")
{ val result = resultRail(worker.id); resultRail.deallocate(); return result; } }
}
------------
The runtime can be compiled correctly.
However, in compiling an application that calls the inline method,
the whole method body will be inlined, including both the part in @Ifdef("_CPP") and the part in @Ifndef("CPP_").
It seems the @Ifdef/@Ifndef do not work here.
However, the annotations can work correctly if they are only used in applications.
defer to 2.2.2.