summaryrefslogtreecommitdiff
path: root/src/wasm-binary-reader-opcnt.c
diff options
context:
space:
mode:
authorBen Smith <binji@chromium.org>2016-10-07 16:29:25 -0700
committerBen Smith <binji@chromium.org>2016-10-10 11:23:58 -0700
commite90079d4b7fc07136cb05a6b31e473e1f90931da (patch)
treed1fc5c14ab94fa1630cd5163dfb3fb75ddcbb230 /src/wasm-binary-reader-opcnt.c
parent244833d60643d0741abb45c24f254884799749a1 (diff)
downloadwabt-e90079d4b7fc07136cb05a6b31e473e1f90931da.tar.gz
wabt-e90079d4b7fc07136cb05a6b31e473e1f90931da.tar.bz2
wabt-e90079d4b7fc07136cb05a6b31e473e1f90931da.zip
Add wasmopcodecnt tests
Also rename the last few places using SexprWasm, WasmWast. Make formatting a little nicer too.
Diffstat (limited to 'src/wasm-binary-reader-opcnt.c')
-rw-r--r--src/wasm-binary-reader-opcnt.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/wasm-binary-reader-opcnt.c b/src/wasm-binary-reader-opcnt.c
index 74e34c93..1a6a4ff7 100644
--- a/src/wasm-binary-reader-opcnt.c
+++ b/src/wasm-binary-reader-opcnt.c
@@ -149,11 +149,10 @@ static WasmBinaryReader s_binary_reader = {
.on_store_expr = on_store_expr
};
-WasmOpcntData* wasm_new_opcnt_data(struct WasmAllocator* allocator) {
- WasmOpcntData* result = wasm_alloc_zero(allocator, sizeof(WasmOpcntData),
- WASM_DEFAULT_ALIGN);
- result->allocator = allocator;
- return result;
+void wasm_init_opcnt_data(struct WasmAllocator* allocator,
+ WasmOpcntData* data) {
+ WASM_ZERO_MEMORY(*data);
+ data->allocator = allocator;
}
void wasm_destroy_opcnt_data(struct WasmAllocator* allocator,