From bcc7c471e160a6648abf61b1860072b25a9bfbc6 Mon Sep 17 00:00:00 2001 From: Ben Smith Date: Mon, 25 Apr 2016 14:02:22 -0700 Subject: rename memory_size -> current_memory * current_memory and grow_memory return page size, not byte size * also update testsuite, which fixes a couple of spec tests * disable d8/spec tests (in a hacky way), because the binary_0xb v8 support isn't landed yet, so we can't easily test it --- src/wasm-binary-writer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/wasm-binary-writer.c') diff --git a/src/wasm-binary-writer.c b/src/wasm-binary-writer.c index 4606e7ed..5ec95d87 100644 --- a/src/wasm-binary-writer.c +++ b/src/wasm-binary-writer.c @@ -575,6 +575,9 @@ static void write_expr(WasmContext* ctx, write_expr(ctx, module, func, expr->convert.expr); write_opcode(&ctx->stream, expr->convert.opcode); break; + case WASM_EXPR_TYPE_CURRENT_MEMORY: + write_opcode(&ctx->stream, WASM_OPCODE_CURRENT_MEMORY); + break; case WASM_EXPR_TYPE_GET_LOCAL: { int index = wasm_get_local_index_by_var(func, &expr->get_local.var); write_opcode(&ctx->stream, WASM_OPCODE_GET_LOCAL); @@ -637,9 +640,6 @@ static void write_expr(WasmContext* ctx, pop_label(ctx, &expr->loop.outer); break; } - case WASM_EXPR_TYPE_MEMORY_SIZE: - write_opcode(&ctx->stream, WASM_OPCODE_MEMORY_SIZE); - break; case WASM_EXPR_TYPE_NOP: write_opcode(&ctx->stream, WASM_OPCODE_NOP); break; -- cgit v1.2.3