From 35ed980d7bf7af3209ba9f6f70aae58e9cf7df56 Mon Sep 17 00:00:00 2001 From: Ben Smith Date: Sun, 13 Sep 2015 20:37:30 -0700 Subject: move common definitions to wasm-internal.h --- src/wasm-parse.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'src/wasm-parse.c') 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 #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; -- cgit v1.2.3