29 #define NEEDS_CLEANUP
30
31 // Makes a string of the argument (which is not macro-expanded)
32 #define STR(a) #a
33
34 // Makes a string of the macro expansion of a
35 #define XSTR(a) STR(a)
36
37 // Allow commas in macro arguments.
38 #define COMMA ,
39
40 // Apply pre-processor token pasting to the expansions of x and y.
41 // The token pasting operator (##) prevents its arguments from being
42 // expanded. This macro allows expansion of its arguments before the
43 // concatenation is performed. Note: One auxilliary level ought to be
44 // sufficient, but two are used because of bugs in some preprocesors.
45 #define PASTE_TOKENS(x, y) PASTE_TOKENS_AUX(x, y)
46 #define PASTE_TOKENS_AUX(x, y) PASTE_TOKENS_AUX2(x, y)
47 #define PASTE_TOKENS_AUX2(x, y) x ## y
48
49 // -DINCLUDE_<something>=0 | 1 can be specified on the command line to include
50 // or exclude functionality.
51
52 #ifndef INCLUDE_JVMTI
53 #define INCLUDE_JVMTI 1
54 #endif // INCLUDE_JVMTI
55
56 #if INCLUDE_JVMTI
57 #define JVMTI_ONLY(x) x
58 #define NOT_JVMTI(x)
59 #define NOT_JVMTI_RETURN
60 #define NOT_JVMTI_RETURN_(code) /* next token must be ; */
61 #else
62 #define JVMTI_ONLY(x)
63 #define NOT_JVMTI(x) x
64 #define NOT_JVMTI_RETURN { return; }
65 #define NOT_JVMTI_RETURN_(code) { return code; }
66 #endif // INCLUDE_JVMTI
67
68 #ifndef INCLUDE_VM_STRUCTS
|
29 #define NEEDS_CLEANUP
30
31 // Makes a string of the argument (which is not macro-expanded)
32 #define STR(a) #a
33
34 // Makes a string of the macro expansion of a
35 #define XSTR(a) STR(a)
36
37 // Allow commas in macro arguments.
38 #define COMMA ,
39
40 // Apply pre-processor token pasting to the expansions of x and y.
41 // The token pasting operator (##) prevents its arguments from being
42 // expanded. This macro allows expansion of its arguments before the
43 // concatenation is performed. Note: One auxilliary level ought to be
44 // sufficient, but two are used because of bugs in some preprocesors.
45 #define PASTE_TOKENS(x, y) PASTE_TOKENS_AUX(x, y)
46 #define PASTE_TOKENS_AUX(x, y) PASTE_TOKENS_AUX2(x, y)
47 #define PASTE_TOKENS_AUX2(x, y) x ## y
48
49 // Declare the named class to be noncopyable. This macro must be used in
50 // a private part of the class's definition, followed by a semi-colon.
51 // Doing so provides private declarations for the class's copy constructor
52 // and assignment operator. Because these operations are private, most
53 // potential callers will fail to compile because they are inaccessible.
54 // The operations intentionally lack a definition, to provoke link-time
55 // failures for calls from contexts where they are accessible, e.g. from
56 // within the class or from a friend of the class.
57 // Note: The lack of definitions is still not completely bullet-proof, as
58 // an apparent call might be optimized away by copy elision.
59 // For C++11 the declarations should be changed to deleted definitions.
60 #define NONCOPYABLE(C) C(C const&); C& operator=(C const&) /* next token must be ; */
61
62 // -DINCLUDE_<something>=0 | 1 can be specified on the command line to include
63 // or exclude functionality.
64
65 #ifndef INCLUDE_JVMTI
66 #define INCLUDE_JVMTI 1
67 #endif // INCLUDE_JVMTI
68
69 #if INCLUDE_JVMTI
70 #define JVMTI_ONLY(x) x
71 #define NOT_JVMTI(x)
72 #define NOT_JVMTI_RETURN
73 #define NOT_JVMTI_RETURN_(code) /* next token must be ; */
74 #else
75 #define JVMTI_ONLY(x)
76 #define NOT_JVMTI(x) x
77 #define NOT_JVMTI_RETURN { return; }
78 #define NOT_JVMTI_RETURN_(code) { return code; }
79 #endif // INCLUDE_JVMTI
80
81 #ifndef INCLUDE_VM_STRUCTS
|