Commit Graph

8918 Commits

Author SHA1 Message Date
Dan Gohman
8a5429ce74 Factor out functions for working with table and memory initializers. 2019-01-03 12:04:58 -08:00
Dan Gohman
747dbb23e7 Add fuzz targets for module instantiation. 2019-01-03 12:04:48 -08:00
Dan Gohman
df7724ce2b Update Cargo.toml authors fields. 2019-01-03 12:04:37 -08:00
Dan Gohman
2f04b78ecf Use cast::usize rather than as usize to avoid silent overflow. 2019-01-03 12:04:24 -08:00
Dan Gohman
529de7ca60 Tidy up unneeded '&'s. 2019-01-03 12:03:52 -08:00
Dan Gohman
c66a3c23f3 Tidy up some documentation comments. 2019-01-03 12:03:43 -08:00
Dan Gohman
3ce2127bfa Eliminate the intermediate "base" global variables. 2019-01-03 12:03:33 -08:00
Dan Gohman
3431122440 Update to bindgen 0.46. 2019-01-03 12:03:22 -08:00
Dan Gohman
1ae5c13b8c Signature ID loads are readonly. 2019-01-03 12:03:14 -08:00
Dan Gohman
8939d1252a Document that wasmtime-runtime is meant to be compiled for the target. 2019-01-03 12:02:57 -08:00
Dan Gohman
3270369a69 Restructure VMContext to eliminate a level of indirection. 2019-01-03 12:02:35 -08:00
Dan Gohman
ff6776fe10 Refactor instance accessor routines.
This helps localize the unsafe code needed to access these fields.
2019-01-03 11:49:25 -08:00
Dan Gohman
482a054c75 Move the signature_ids field first. 2019-01-03 11:49:15 -08:00
Dan Gohman
e8e8f453a4 Refactor out the code for creating the signature_ids base global value. 2019-01-03 11:49:04 -08:00
Dan Gohman
087b5b4dff Implement cross-instance indirect calls. 2019-01-03 11:48:53 -08:00
Dan Gohman
b646f9b4e0 Clarify a comment. 2019-01-03 11:48:43 -08:00
Dan Gohman
9d73123e3e Reformat a comment to fit within 100 columns. 2019-01-03 11:48:34 -08:00
Dan Gohman
bec724b501 Whitespace tidying. 2019-01-03 11:48:26 -08:00
Dan Gohman
b704f5ad30 Update to wasmparser 0.23.0. 2019-01-03 11:48:13 -08:00
Dan Gohman
63c9143e87 Update to bindgen 0.45. 2019-01-03 11:48:05 -08:00
Dan Gohman
7592c99f3b Refactor the compilation and instantiation pipeline.
wasmtime-execute is now wasmtime-jit. Move `JITCode` and the TargetIsa
into a new `Compiler` type. `InstancePlus` is no more, with trampoline
functionality now handled by `Compiler`.
2019-01-03 11:47:55 -08:00
Dan Gohman
450a279e18 Rename wasmtime's logfile names. 2019-01-03 11:47:40 -08:00
bjorn3
e9cb50313d Fix emit_small_mem{cpy,set} when size == 0 or access_size > 8 2019-01-02 12:18:49 -08:00
Dan Gohman
c8e47177fc Add an assert to append_ebb_params_for_function_params. 2019-01-02 12:05:32 -08:00
Dan Gohman
831d033471 Add a shrink_to_fit function to PrimaryMap. 2019-01-02 12:01:36 -08:00
Dan Gohman
cd4f96c066 Use Vec::with_capacity when we know the eventual size of the Vec. 2019-01-02 11:59:57 -08:00
Dan Gohman
29edc3fe50 Make ListPool's alloc fill new memory with reserved values.
This makes it harder to misuse, as 0 could be confused for a valid value.
2019-01-02 11:59:22 -08:00
Dan Gohman
8a11bd6af7 Remove BoxedSlice's next_key() function, which is unneeded.
`BoxedSlice` does not support appending elements, so it isn't useful to
look up the next key.
2019-01-02 11:58:44 -08:00
Dan Gohman
b096d0606b Move ifcmp, icmp_imm, and ffcmp into the CPU flags doc section. 2019-01-02 11:46:15 -08:00
bjorn3
ab72eeadf9 Bump faerie to 0.7.0 2019-01-02 11:12:48 +01:00
Muhammad Mominul Huque
effe6c04e4 Update to Rust 2018 edition (#632)
* initial cargo fix run

* Upgrade cranelift-entity crate

* Upgrade bforest crate

* Upgrade the codegen crate

* Upgrade the faerie crate

* Upgrade the filetests crate

* Upgrade the codegen-meta crate

* Upgrade the frontend crate

* Upgrade the cranelift-module crate

* Upgrade the cranelift-native crate

* Upgrade the cranelift-preopt crate

* Upgrade the cranelift-reader crate

* Upgrade the cranelift-serde crate

* Upgrade the cranelift-simplejit crate

* Upgrade the cranelift or cranelift-umbrella crate

* Upgrade the cranelift-wasm crate

* Upgrade cranelift-tools crate

* Use new import style on remaining files

* run format-all.sh

* run test-all.sh, update Readme and travis ci configuration
fixed an AssertionError also

* Remove deprecated functions
2018-12-26 09:49:05 -08:00
bjorn3
e3db942b0c Put default implementations of FuncWriter methods in a seperate method
This is useful when you want to write extra information
2018-12-26 09:21:32 -08:00
Dan Gohman
f997cde2db Don't create Static memories larger than the Tunables' static bound size. 2018-12-24 22:08:36 -08:00
Dan Gohman
57a1618742 Catch EXCEPTION_INT_OVERFLOW exceptions too. 2018-12-24 22:08:36 -08:00
Dan Gohman
a5a23d8c4a Factor WasmNamespace out of lib/wast and into lib/execute as Namespace.
This makes it usable for things other than just wast tests.
2018-12-24 22:08:36 -08:00
Dan Gohman
71c0142cd4 Rename the address field of Table/Memory/Global exports to definition.
For functions, `address` makes sense because it's the address of the
function. Bt for Table/Memory/Global, it points to a `VM*Definition` field.
2018-12-24 18:20:15 -08:00
Dan Gohman
8f74c7f3d5 Add derive(Debug) to Export. 2018-12-24 18:14:00 -08:00
Bruce Mitchener
4f8753fa11 Fix typos. 2018-12-24 10:03:22 -08:00
Bruce Mitchener
4224a95f0d Update wasmparser to 0.23. 2018-12-24 09:49:06 -08:00
Dan Gohman
887451a2eb Fix formatting. 2018-12-24 09:32:50 -08:00
Dan Gohman
998a7d2b6d Mention Wasmtime as a complete implementation of the Environment traits. 2018-12-24 09:32:20 -08:00
bjorn3
95118e7244 Nicer panic when trying to insert instruction before calling switch_to_block 2018-12-24 09:31:51 -08:00
Dan Gohman
c4e10227de Tidy up trap-handling code. 2018-12-19 15:14:30 -08:00
Jef
5eee15ab02 Remove outdated comment 2018-12-19 20:27:16 +00:00
Jef
522818e7d8 Fix compiler bomb 2018-12-19 17:52:26 +00:00
Jef
9decdca525 Add Return 2018-12-19 16:39:20 +00:00
Jef
c52cf1493a Reformat a comment 2018-12-19 14:46:32 +01:00
Jef
f91b9072de Fix some issues with the use of stack depth 2018-12-19 14:42:00 +01:00
Jef
3b5c11a92a Test comparison operators 2018-12-19 12:58:08 +01:00
Jef
2173f4bcca Add other comparison operators, fix materialising locals, add more TODO comments (v. important) 2018-12-19 12:42:35 +01:00