summaryrefslogtreecommitdiff
path: root/test/dynamicLibrary.fromasm
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2018-09-19 15:50:30 -0700
committerGitHub <noreply@github.com>2018-09-19 15:50:30 -0700
commitfe88b47749115009da0447e340cbdc86edf30984 (patch)
tree7dfd9aba7086c8aa6dff4877ac1ee3b9d78bc5ce /test/dynamicLibrary.fromasm
parenta53356ab155a7d8c2f334dc9a3c1432bacbc78fe (diff)
downloadbinaryen-fe88b47749115009da0447e340cbdc86edf30984.tar.gz
binaryen-fe88b47749115009da0447e340cbdc86edf30984.tar.bz2
binaryen-fe88b47749115009da0447e340cbdc86edf30984.zip
Unify imported and non-imported things (#1678)
Fixes #1649 This moves us to a single object for functions, which can be imported or nor, and likewise for globals (as a result, GetGlobals do not need to check if the global is imported or not, etc.). All imported things now inherit from Importable, which has the module and base of the import, and if they are set then it is an import. For convenient iteration, there are a few helpers like ModuleUtils::iterDefinedGlobals(wasm, [&](Global* global) { .. use global .. }); as often iteration only cares about imported or defined (non-imported) things.
Diffstat (limited to 'test/dynamicLibrary.fromasm')
-rw-r--r--test/dynamicLibrary.fromasm4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/dynamicLibrary.fromasm b/test/dynamicLibrary.fromasm
index edd7a60d0..813f7334a 100644
--- a/test/dynamicLibrary.fromasm
+++ b/test/dynamicLibrary.fromasm
@@ -1,14 +1,14 @@
(module
(type $FUNCSIG$vi (func (param i32)))
(type $FUNCSIG$ii (func (param i32) (result i32)))
- (import "env" "memory" (memory $0 256 256))
+ (import "env" "memory" (memory $memory 256 256))
+ (data (get_global $memoryBase) "dynamicLibrary.asm.js")
(import "env" "memoryBase" (global $memoryBase i32))
(import "env" "abortStackOverflow" (func $abortStackOverflow (param i32)))
(import "env" "_puts" (func $_puts (param i32) (result i32)))
(global $STACKTOP (mut i32) (i32.const 0))
(global $STACK_MAX (mut i32) (i32.const 0))
(global $_global i32 (i32.const 5242912))
- (data (get_global $memoryBase) "dynamicLibrary.asm.js")
(export "__ZN3FooC2Ev" (func $__ZN3FooC2Ev))
(export "__post_instantiate" (func $__post_instantiate))
(export "runPostSets" (func $runPostSets))