In allocation.hpp
of the jdk8
source code, there is
#define METASPACE_OBJ_TYPE_DECLARE(name) name ## Type,
#define METASPACE_OBJ_TYPE_NAME_CASE(name) case name ## Type: return #name;
enum Type {
// Types are MetaspaceObj::ClassType, MetaspaceObj::SymbolType, etc
METASPACE_OBJ_TYPES_DO(METASPACE_OBJ_TYPE_DECLARE)
_number_of_types
};
I don’t understand what grammatical rules ## are in
define
.
某草草2017-06-05 11:13:07
#define
is to define variables, the two ## are connection operators, you can view