15
15
#define CPPINTEROP_CPPINTEROP_H
16
16
17
17
#include < cassert>
18
+ #include < cstddef>
18
19
#include < cstdint>
19
20
#include < set>
20
21
#include < string>
@@ -41,7 +42,7 @@ using TCppFuncAddr_t = void*;
41
42
using TInterp_t = void *;
42
43
using TCppObject_t = void *;
43
44
44
- enum Operator {
45
+ enum Operator : unsigned char {
45
46
OP_None,
46
47
OP_New,
47
48
OP_Delete,
@@ -90,7 +91,7 @@ enum Operator {
90
91
OP_Coawait,
91
92
};
92
93
93
- enum OperatorArity { kUnary = 1 , kBinary , kBoth };
94
+ enum OperatorArity : unsigned char { kUnary = 1 , kBinary , kBoth };
94
95
95
96
// / A class modeling function calls for functions produced by the interpreter
96
97
// / in compiled code. It provides an information if we are calling a standard
@@ -108,7 +109,7 @@ class JitCall {
108
109
void ** m_Args = nullptr ;
109
110
size_t m_ArgSize = 0 ;
110
111
// Clang struggles with =default...
111
- ArgList () : m_Args( nullptr ), m_ArgSize( 0 ) {}
112
+ ArgList () {}
112
113
ArgList (void ** Args, size_t ArgSize) : m_Args(Args), m_ArgSize(ArgSize) {}
113
114
};
114
115
// FIXME: Figure out how to unify the wrapper signatures.
@@ -122,13 +123,13 @@ class JitCall {
122
123
GenericCall m_GenericCall;
123
124
DestructorCall m_DestructorCall;
124
125
};
125
- const Kind m_Kind;
126
+ Kind m_Kind;
126
127
TCppConstFunction_t m_FD;
127
- JitCall () : m_Kind( kUnknown ), m_GenericCall( nullptr ), m_FD(nullptr ) {}
128
+ JitCall () : m_GenericCall( nullptr ), m_Kind( kUnknown ), m_FD(nullptr ) {}
128
129
JitCall (Kind K, GenericCall C, TCppConstFunction_t FD)
129
- : m_Kind(K ), m_GenericCall(C ), m_FD(FD) {}
130
+ : m_GenericCall(C ), m_Kind(K ), m_FD(FD) {}
130
131
JitCall (Kind K, DestructorCall C, TCppConstFunction_t Dtor)
131
- : m_Kind(K ), m_DestructorCall(C ), m_FD(Dtor) {}
132
+ : m_DestructorCall(C ), m_Kind(K ), m_FD(Dtor) {}
132
133
133
134
// / Checks if the passed arguments are valid for the given function.
134
135
CPPINTEROP_API bool AreArgumentsValid (void * result, ArgList args,
0 commit comments