summaryrefslogtreecommitdiff
path: root/src/wasm-interpreter.c
diff options
context:
space:
mode:
authorBen Smith <binji@chromium.org>2016-04-25 14:02:22 -0700
committerBen Smith <binji@chromium.org>2016-04-28 23:47:03 -0700
commitbcc7c471e160a6648abf61b1860072b25a9bfbc6 (patch)
treeb929dfeb08a682b08945c6447b3f825295e824bf /src/wasm-interpreter.c
parent4b65b16cba2eb3aa173848377079c0523c9c896f (diff)
downloadwabt-bcc7c471e160a6648abf61b1860072b25a9bfbc6.tar.gz
wabt-bcc7c471e160a6648abf61b1860072b25a9bfbc6.tar.bz2
wabt-bcc7c471e160a6648abf61b1860072b25a9bfbc6.zip
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
Diffstat (limited to 'src/wasm-interpreter.c')
-rw-r--r--src/wasm-interpreter.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/wasm-interpreter.c b/src/wasm-interpreter.c
index 00921347..3797ea06 100644
--- a/src/wasm-interpreter.c
+++ b/src/wasm-interpreter.c
@@ -738,8 +738,8 @@ WasmInterpreterResult wasm_run_interpreter(WasmInterpreterModule* module,
STORE(F64, F64);
break;
- case WASM_OPCODE_MEMORY_SIZE:
- PUSH_I32(module->memory.byte_size);
+ case WASM_OPCODE_CURRENT_MEMORY:
+ PUSH_I32(module->memory.page_size);
break;
case WASM_OPCODE_GROW_MEMORY: {
@@ -759,7 +759,7 @@ WasmInterpreterResult wasm_run_interpreter(WasmInterpreterModule* module,
module->memory.data = new_data;
module->memory.page_size = new_page_size;
module->memory.byte_size = new_byte_size;
- PUSH_I32(old_byte_size);
+ PUSH_I32(old_page_size);
break;
}
@@ -1429,7 +1429,7 @@ void wasm_trace_pc(WasmInterpreterModule* module,
case WASM_OPCODE_NOP:
case WASM_OPCODE_RETURN:
case WASM_OPCODE_UNREACHABLE:
- case WASM_OPCODE_MEMORY_SIZE:
+ case WASM_OPCODE_CURRENT_MEMORY:
case WASM_OPCODE_DISCARD:
printf("%s\n", s_opcode_name[opcode]);
break;
@@ -1739,7 +1739,7 @@ void wasm_disassemble_module(WasmInterpreterModule* module,
case WASM_OPCODE_NOP:
case WASM_OPCODE_RETURN:
case WASM_OPCODE_UNREACHABLE:
- case WASM_OPCODE_MEMORY_SIZE:
+ case WASM_OPCODE_CURRENT_MEMORY:
case WASM_OPCODE_DISCARD:
printf("%s\n", s_opcode_name[opcode]);
break;