* Implement wasm trap handlers.
This adds signal handlers based on SpiderMonkey's signal-handler code.
The functionality for looking up the trap code and wasm bytecode offset
isn't yet implemented, but this is a start.
I considered rewriting this code in Rust, but decided against it for now
as C++ allows us to talk to the relevant OS APIs more directly.
Fixes#15.
* Compile with -std=c++11.
* Refactor InstallState initialization.
* Compile with -fPIC.
* Factor out the code for calling a wasm function with a given index.
* Fix unclear wording in a comment.
The biggest change is the split from FunctionIndex to
DefinedFuncIndex to FuncIndex. Take better advantage of this by
converting several Vecs to PrimaryMaps.
Also, table_addr can now handle indices of the table index type,
so we don't need to explicitly uextend them anymore.
* Implement.
* Clean and doc
* Collect base addresses instead of leaking them
* Fix code for 1.25.
* Simplify $assert
* Use AbiParam::special.
* Use &mut self in base_addr
With new versions of cretonne-codegen:
- Non-colocated calls are emitted as a movabs with an indirect call.
This uses an Abs8 relocation.
- Colocated calls are emitted as direct calls, but the "+ 4"
adjustment is now folded into the addend, so we don't need to
handle it explicitly in the X86PCRel4 code anymore.
This begins reorganizing how translation and compilation occur, and
setting up infrastructure for imports/exports and relocations. It
splits parts out of StandaloneRuntime, forming Module, Compilation,
and Instance structs, which can be used more independently.
It also simplifies the command-line interface, in a step towards
making simple tools that just expose the functionality of the
libraries.