Commit Graph

634 Commits

Author SHA1 Message Date
Dan Gohman
5a96e022db Update to the rustfmt in rust 1.29, which is now stable. 2018-10-09 14:36:48 -07:00
Dan Gohman
ecae909b9e Add the "wasm" category in Cargo.toml files. 2018-08-28 21:03:07 -07:00
Dan Gohman
da4382802a Add a LICENSE file to published crates.
The individual crates are published separately from the main repository
on crates.io. To ensure that a copy of the LICENSE file accompanies all
published copies of the code, give each crate its own LICENSE file.
2018-08-28 21:02:18 -07:00
Dan Gohman
fb7153ccf4 Update to cranelift 0.20.0.
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.
2018-08-28 20:56:58 -07:00
Dan Gohman
c5f0cd7d5e Enforce the wasm memory size limit on heaps with no maximum. 2018-08-28 16:54:28 -07:00
Dan Gohman
f2ad79963c Add a comment about "dynamic" heaps. 2018-08-28 16:54:28 -07:00
Dan Gohman
d3fcb596b3 Support multiple memory spaces. 2018-08-28 16:54:28 -07:00
Dan Gohman
4e24064251 grow_memory is renamed to memory.grow in the spec. 2018-08-28 16:54:28 -07:00
Dan Gohman
c12ae182c3 Enforce the linear-memory maximum size.
Also, support linear memories with no maximum, and dynamic remapping.
2018-08-28 16:54:28 -07:00
Sergey Pepyakin
7b222190f5 Implement tables and call_indirect (#12)
* Implement tables and call_indirect

* Restore comment about sig checking.

* Widen callee index on 64bit platforms.
2018-08-15 16:25:49 -07:00
Sergey Pepyakin
e7c8d23a42 Implement memory.grow and memory.current (#9)
* 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
2018-08-11 06:52:43 -07:00
Dan Gohman
4992162fab Format with rustfmt. 2018-08-03 15:37:57 -07:00
Dan Gohman
40791787c7 Update repository URLs. 2018-08-03 15:37:30 -07:00
Dan Gohman
a1b4c865d1 Prepare wasmtime-environ for publishing. 2018-08-03 15:33:15 -07:00
Dan Gohman
bba733b7a1 Tidy up a comment. 2018-08-03 15:26:26 -07:00
Dan Gohman
548c45c604 Rename wasmtime-runtime to wasmtime-environ.
This mirrors changes in cranelift.
2018-08-03 15:20:19 -07:00
Dan Gohman
ef5254c0da More code reorganization and cleanups. 2018-08-03 15:06:59 -07:00
Dan Gohman
33b7dfac00 Rename ptr_size. 2018-08-03 14:20:15 -07:00
Dan Gohman
831b481f13 More code reorganization. 2018-08-03 14:18:23 -07:00
Dan Gohman
6659ef7018 More code reorganization. 2018-08-03 13:35:25 -07:00
Dan Gohman
fdd3600f1b Delete a redundant function. 2018-08-03 13:19:21 -07:00
Dan Gohman
0d8a69189c Remove unused TableElement struct. 2018-08-03 13:15:31 -07:00
Dan Gohman
779128d14d Factor out FuncEnvironment and ModuleEnvironment into a separate file. 2018-08-03 13:04:05 -07:00
Dan Gohman
63bc52d9fd Eliminate runtime's direct dependeny on wasmparser. 2018-08-03 12:43:36 -07:00
Dan Gohman
753d650f1a Update to cranelift 0.18.1. 2018-08-02 20:50:28 -07:00
Dan Gohman
dd3a9dab6e Make an initial pass through clippy warnings. 2018-07-21 06:46:53 -07:00
Dan Gohman
f3a6cab472 Make package names consistent with cranelift's. 2018-07-21 06:46:37 -07:00
Dan Gohman
2608dd0c47 Update to cranelift 0.16.1, target-lexicon 0.0.3, faerie 0.4.4. 2018-07-21 06:46:19 -07:00
Dan Gohman
7a26b76521 Change the license to "Apache-2.0 WITH LLVM-exception". 2018-07-21 06:46:02 -07:00
Dan Gohman
c612d48b33 Rename to wasmtime. It's wasmtime!
Also, update to Cretonne 0.13.0.
2018-07-02 16:20:22 -07:00
Dan Gohman
73639e4557 Update to cretonne 0.9.0 and faerie 0.4.1. 2018-06-07 14:37:36 -07:00
Dan Gohman
99ee96ca16 Update to latest stable rustfmt-preview. 2018-06-07 14:17:56 -07:00
Dan Gohman
46a772ba67 Add a TODO about avoiding ReadWriteExecute mappings. 2018-05-17 23:59:40 -07:00
Dan Gohman
52f1171485 Make all the function bodies executable, not just the start function. 2018-05-17 23:56:05 -07:00
Dan Gohman
d162f8bc59 Implement Abs8 relocations, and fix X86PCRel4 relocations.
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.
2018-05-17 23:32:31 -07:00
Dan Gohman
9d41135fe3 Translate from function-body index to function-index-space index.
The wasm function index space consists of the index space of the
imported functions concatenated with the index space of the defined
functions. When iterating through function definitions, it's necessary
to adjust the index when a function-index-space index is needed.
2018-05-17 20:39:19 -07:00
Dan Gohman
b5e794a584 Update to Cretonne 0.8.0. 2018-05-14 12:58:28 -10:00
Dan Gohman
ed734f8ecb Update to Cretonne 0.4.0. 2018-03-16 16:34:20 -07:00
Dan Gohman
5a5f4e4a2f Switch to published packages rather than straight git paths.
We can do this now that all our dependencies are available in published
form, and this should reduce accidental breakage which APIs change.
2018-02-28 12:33:37 -08:00
Dan Gohman
933d8487c1 Minor code simplification. NFC. 2018-02-28 12:26:49 -08:00
Dan Gohman
f276a021cb Update wasmstandalone for API changes.
This updates to the latest faerie and cretonne API changes.
2018-02-22 09:44:02 -08:00
Dan Gohman
29db33e7f8 Replace reserve with reserve_exact when applicable. 2017-11-17 11:14:45 -08:00
Dan Gohman
46ac24d172 Add a comment about call_indirect bounds/signature checking. 2017-11-17 11:14:45 -08:00
m4b
89d3038c1c obj: minor fix to emit_module compile 2017-11-05 00:03:56 -07:00
Dan Gohman
114da83ad6 Avoid using to_string() on ExternalName to create strings for symbol names.
ExternalName's `to_string()` prepends a '%' for Cretonne's text syntax,
but for creating symbol names we just want the raw bytes.
2017-11-04 15:29:16 -07:00
Dan Gohman
2b40f72f00 Update for more Cretonne API changes.
This updates to ExternalName and reloc_external.
2017-10-31 12:36:53 -07:00
Dan Gohman
226fbce0b3 Update for Cretonne API changes. 2017-10-28 06:11:56 -07:00
Dan Gohman
469b7bb5e9 Add a FIXME comment for grow/current_memory. 2017-10-27 16:46:04 -07:00
Dan Gohman
233d2cd773 Initialize function names and signatures before calling translate_from_reader. 2017-10-13 16:42:40 -07:00
Dan Gohman
b87178647b Change get_func_type's return type to SignatureType.
It's the same thing, but provides more readability.
2017-10-13 16:42:01 -07:00