Improved instance & module data pointers location

# Conflicts:
#	src/webassembly/instance.rs
#	src/webassembly/module.rs
This commit is contained in:
Syrus Akbary
2018-11-14 11:05:57 -08:00
parent ac2d605472
commit e4ed4cc532
2 changed files with 6 additions and 0 deletions

View File

@ -67,6 +67,7 @@ fn get_function_addr(
/// first field
#[repr(C)]
#[derive(Debug)]
#[repr(C)]
pub struct Instance {
// C-like pointers to data (heaps, globals, tables)
pub data_pointers: DataPointers,
@ -99,6 +100,7 @@ pub struct Instance {
/// NOTE: Rearranging the fields will break the memory arrangement model
#[repr(C)]
#[derive(Debug)]
#[repr(C)]
pub struct DataPointers {
// Pointer to tables
pub tables: TablesSlice,