summaryrefslogtreecommitdiff
path: root/src/wasm-interpreter.h
diff options
context:
space:
mode:
authorBen Smith <binji@chromium.org>2016-09-21 11:01:06 -0700
committerBen Smith <binji@chromium.org>2016-09-29 11:37:27 -0700
commitc560aa303e5dae3b8aa27fcef04ad77a635d3264 (patch)
treec46ce5cf2eb8d42d60221d208fe9ed04e36b87d4 /src/wasm-interpreter.h
parent5369f84204d1502ea3cd8e7537fd21c65e730444 (diff)
downloadwabt-c560aa303e5dae3b8aa27fcef04ad77a635d3264.tar.gz
wabt-c560aa303e5dae3b8aa27fcef04ad77a635d3264.tar.bz2
wabt-c560aa303e5dae3b8aa27fcef04ad77a635d3264.zip
ast-writer.c and binary-reader{,-ast}.c compiling
Diffstat (limited to 'src/wasm-interpreter.h')
-rw-r--r--src/wasm-interpreter.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/wasm-interpreter.h b/src/wasm-interpreter.h
index 8fc5f5c4..ca546216 100644
--- a/src/wasm-interpreter.h
+++ b/src/wasm-interpreter.h
@@ -81,8 +81,8 @@ WASM_DEFINE_VECTOR(uint8, WasmUint8);
/* TODO(binji): identical to WasmFuncSignature. Share? */
typedef struct WasmInterpreterFuncSignature {
- WasmType result_type;
WasmTypeVector param_types;
+ WasmTypeVector result_types;
} WasmInterpreterFuncSignature;
WASM_DEFINE_ARRAY(interpreter_func_signature, WasmInterpreterFuncSignature);
@@ -114,6 +114,12 @@ typedef struct WasmInterpreterTypedValue {
} WasmInterpreterTypedValue;
WASM_DEFINE_ARRAY(interpreter_typed_value, WasmInterpreterTypedValue);
+typedef struct WasmInterpreterGlobal {
+ WasmInterpreterTypedValue typed_value;
+ WasmBool mutable_;
+} WasmInterpreterGlobal;
+WASM_DEFINE_ARRAY(interpreter_global, WasmInterpreterGlobal);
+
struct WasmInterpreterModule;
struct WasmInterpreterImport;
@@ -127,7 +133,7 @@ typedef WasmResult (*WasmInterpreterImportCallback)(
typedef struct WasmInterpreterImport {
WasmStringSlice module_name;
- WasmStringSlice func_name;
+ WasmStringSlice field_name;
uint32_t sig_index;
WasmInterpreterImportCallback callback;
void* user_data;
@@ -148,7 +154,7 @@ typedef struct WasmInterpreterModule {
WasmInterpreterFuncTableEntryArray func_table;
WasmInterpreterImportArray imports;
WasmInterpreterExportArray exports;
- WasmInterpreterTypedValueArray globals;
+ WasmInterpreterGlobalArray globals;
WasmOutputBuffer istream;
uint32_t start_func_offset; /* == WASM_INVALID_OFFSET if not defined */
} WasmInterpreterModule;