Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(594)

Unified Diff: src/wasm/wasm-module.h

Issue 2395133002: Revert of [wasm] Refactor import handling for 0xC. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/wasm/module-decoder.cc ('k') | src/wasm/wasm-module.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/wasm-module.h
diff --git a/src/wasm/wasm-module.h b/src/wasm/wasm-module.h
index bbee2ad889b13806f8334b404e216691ac4d7106..ac75042392ddf1d7c77acd31fa11f6c8f916e65c 100644
--- a/src/wasm/wasm-module.h
+++ b/src/wasm/wasm-module.h
@@ -86,16 +86,12 @@
double f64_const;
uint32_t global_index;
} val;
-
- WasmInitExpr() : kind(kNone) {}
- explicit WasmInitExpr(int32_t v) : kind(kI32Const) { val.i32_const = v; }
- explicit WasmInitExpr(int64_t v) : kind(kI64Const) { val.i64_const = v; }
- explicit WasmInitExpr(float v) : kind(kF32Const) { val.f32_const = v; }
- explicit WasmInitExpr(double v) : kind(kF64Const) { val.f64_const = v; }
- WasmInitExpr(WasmInitKind kind, uint32_t global_index) : kind(kGlobalIndex) {
- val.global_index = global_index;
- }
-};
+};
+
+#define NO_INIT \
+ { \
+ WasmInitExpr::kNone, { 0u } \
+ }
// Static representation of a WASM function.
struct WasmFunction {
@@ -388,9 +384,8 @@
#define CORE_WCM_PROPERTY_TABLE(MACRO) \
MACRO(OBJECT, FixedArray, code_table) \
- MACRO(OBJECT, FixedArray, imports) \
+ MACRO(OBJECT, FixedArray, import_data) \
MACRO(OBJECT, FixedArray, exports) \
- MACRO(OBJECT, FixedArray, inits) \
MACRO(OBJECT, FixedArray, startup_function) \
MACRO(OBJECT, FixedArray, indirect_function_tables) \
MACRO(OBJECT, String, module_bytes) \
@@ -400,6 +395,7 @@
MACRO(OBJECT, ByteArray, data_segments) \
MACRO(SMALL_NUMBER, uint32_t, globals_size) \
MACRO(OBJECT, JSArrayBuffer, heap) \
+ MACRO(SMALL_NUMBER, bool, export_memory) \
MACRO(SMALL_NUMBER, ModuleOrigin, origin) \
MACRO(WEAK_LINK, WasmCompiledModule, next_instance) \
MACRO(WEAK_LINK, WasmCompiledModule, prev_instance) \
@@ -428,6 +424,7 @@
static Handle<WasmCompiledModule> New(Isolate* isolate,
uint32_t min_memory_pages,
uint32_t globals_size,
+ bool export_memory,
ModuleOrigin origin);
static Handle<WasmCompiledModule> Clone(Isolate* isolate,
@@ -457,6 +454,9 @@
void PrintInstancesChain();
private:
+#if DEBUG
+ static uint32_t instance_id_counter_;
+#endif
void Init();
DISALLOW_IMPLICIT_CONSTRUCTORS(WasmCompiledModule);
« no previous file with comments | « src/wasm/module-decoder.cc ('k') | src/wasm/wasm-module.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698