How to understand `#define` with parameters?
阿神
阿神 2017-06-05 11:10:42
0
1
742

part1

VM_STRUCTS(GENERATE_NONSTATIC_VM_STRUCT_ENTRY, GENERATE_STATIC_VM_STRUCT_ENTRY, GENERATE_UNCHECKED_NONSTATIC_VM_STRUCT_ENTRY, GENERATE_NONSTATIC_VM_STRUCT_ENTRY, GENERATE_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY, GENERATE_C1_NONSTATIC_VM_STRUCT_ENTRY, GENERATE_C2_NONSTATIC_VM_STRUCT_ENTRY, GENERATE_C1_UNCHECKED_STATIC_VM_STRUCT_ENTRY, GENERATE_C2_UNCHECKED_STATIC_VM_STRUCT_ENTRY)

part2

//-------------------------------------------------------------------------------- // VM_STRUCTS // // This list enumerates all of the fields the serviceability agent // needs to know about. Be sure to see also the type table below this one. // NOTE that there are platform-specific additions to this table in // vmStructs__.hpp. #define VM_STRUCTS(nonstatic_field, \ static_field, \ unchecked_nonstatic_field, \ volatile_nonstatic_field, \ nonproduct_nonstatic_field, \ c1_nonstatic_field, \ c2_nonstatic_field, \ unchecked_c1_static_field, \ unchecked_c2_static_field) \

is usually

#define type alias

But here we see

#define type ___

I underline it to mean nothing.

If you really just "bring people" to replace it, then there will be nothing above it. Even if you substitute all the parameters,
but#define type ___is Nothing.

How do you understand the above syntax?

Source code comes from jdk8.

阿神
阿神

闭关修行中......

reply all (1)
伊谢尔伦

Help you find the complete source code http://hg.openjdk.java.net/jd...

From line 50 to line 794, all these codes are one line.

The following is not nothing, but more than 700 lines of code.

    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!