RFR(L): 8161259: Simplify including platform files.

Kim Barrett kim.barrett at oracle.com
Thu Jul 14 17:19:21 UTC 2016

> On Jul 14, 2016, at 8:42 AM, Lindenmaier, Goetz <goetz.lindenmaier at sap.com> wrote:
> Hi Andrew, 
> unfortunately it's not that simple ... 
> It does not grok the macro INCLUDE_SUFFIX_CPU, nor the dot in .hpp:
> #define CONCAT4(a, b, c, d) a ## b ## c ## d
> #define xcpu_header(x, y)    XSTR(CONCAT4(x, _, INCLUDE_SUFFIX_CPU, y))
> #define cpu_header(basename)            xcpu_header(basename,.hpp)
> cpu_header(globalDefinitions)
> error: pasting "globalDefinitions_INCLUDE_SUFFIX_CPU" and "." does not give a valid preprocessing token

I think part of what you want is called PASTE_TOKENS in macros.hpp.

The “.” might be a significant impediment though.  I need to think about that one.

Note that we can’t make use PP string concatenation here to include a period.
But stringification operates on expressions, so maybe don’t try to paste the file type,
instead just including it directly in the token stream.  But that might run into whitespace
problems if not careful.

More information about the hotspot-compiler-dev mailing list