diff options
author | Ben Smith <binji@chromium.org> | 2015-09-13 20:37:30 -0700 |
---|---|---|
committer | Ben Smith <binji@chromium.org> | 2015-09-13 20:41:07 -0700 |
commit | 35ed980d7bf7af3209ba9f6f70aae58e9cf7df56 (patch) | |
tree | db2f09fc2f265c8d18cc43227c69dfae00335369 /src/wasm-parse.c | |
parent | 1cc694b599fdf11ffa5cdd05265d6755d99a5623 (diff) | |
download | wabt-35ed980d7bf7af3209ba9f6f70aae58e9cf7df56.tar.gz wabt-35ed980d7bf7af3209ba9f6f70aae58e9cf7df56.tar.bz2 wabt-35ed980d7bf7af3209ba9f6f70aae58e9cf7df56.zip |
move common definitions to wasm-internal.h
Diffstat (limited to 'src/wasm-parse.c')
-rw-r--r-- | src/wasm-parse.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/wasm-parse.c b/src/wasm-parse.c index 7e60c14d..df3d194e 100644 --- a/src/wasm-parse.c +++ b/src/wasm-parse.c @@ -7,21 +7,17 @@ #include <string.h> #include "wasm.h" +#include "wasm-internal.h" #include "wasm-parse.h" +#include "hash.h" + #define TABS_TO_SPACES 8 -#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) -#define FATAL(...) fprintf(stderr, __VA_ARGS__), exit(1) +#define INITIAL_VECTOR_CAPACITY 8 + #define FATAL_AT(loc, ...) \ fprintf(stderr, "%d:%d: ", (loc).line, (loc).col), \ fprintf(stderr, __VA_ARGS__), exit(1) -#define STATIC_ASSERT__(x, c) typedef char static_assert_##c[x ? 1 : -1] -#define STATIC_ASSERT_(x, c) STATIC_ASSERT__(x, c) -#define STATIC_ASSERT(x) STATIC_ASSERT_(x, __COUNTER__) - -#define INITIAL_VECTOR_CAPACITY 8 - -#include "hash.h" typedef struct OpInfo OpInfo; typedef uint8_t MemAccess; |