Jef
1e04dc90b6
Make more tests quickcheck-compatible, remove unused code
2018-12-14 16:35:48 +01:00
Jef
b832832c76
Add const folding, fix returning values from blocks
2018-12-14 16:20:28 +01:00
Jef
17ecd049a1
Register allocation V2
...
This lays the groundwork for other on-the-fly optimisations,
like passing literals through in order to do const folding
in linear time, while compiling.
2018-12-14 14:16:43 +01:00
Dan Gohman
0c0ccc5d09
Add unsigned access methods to VMGlobalDefinition.
2018-12-13 15:50:58 -08:00
Dan Gohman
717f60bda1
Misc cleanups in the trap handling code.
2018-12-13 13:14:08 -08:00
Dan Gohman
26eb8131da
Avoid unnecessary clone() calls.
2018-12-13 09:13:04 -08:00
Vincent Esche
c9666381f6
Fixed links in …/docs/compare-llvm.rst
2018-12-13 09:14:20 -05:00
Dan Gohman
bee4ee4b6e
Clarify that cranelift-wasm is just one component.
...
For a complete WebAssembly implementation, see Wasmtime.
2018-12-13 06:03:28 -08:00
Jef
4994e3671c
Remove unused argument from fibonacci example
2018-12-13 12:26:49 +01:00
Jef
912fa83fff
Add benchmarks
2018-12-13 12:26:47 +01:00
Jef
5bb7430976
Add quickcheck, implement simple binary operations
2018-12-13 10:25:37 +01:00
Jef
5b448ce3c7
Stop leaking stack space on function call
2018-12-13 10:25:17 +01:00
Dan Gohman
5c2395ee32
Elaborate on a TODO comment.
2018-12-12 14:16:46 -08:00
Dan Gohman
562a66cc27
Update status.
2018-12-12 13:05:32 -08:00
Dan Gohman
eba0f9925a
no_std fixes.
2018-12-12 13:00:53 -08:00
Dan Gohman
bc4333d857
Implement assert_malformed and assert_invalid.
2018-12-12 12:28:51 -08:00
Dan Gohman
3f24098edc
Implement the remaining valid spec tests.
...
And lots of other miscellaneous changes. Rename InstanceWorld to
InstancePlus and reorganize its contents. This still isn't a great name,
but at least now it has a clear purpose.
2018-12-12 11:49:02 -08:00
Jef
189996accd
Fix receiving more than 6 arguments, allow calling functions with more than 6 arguments
2018-12-12 13:23:43 +01:00
Jef
86353cba5e
Allow calling functions with any signature
2018-12-12 11:52:48 +01:00
Dan Gohman
8bd35e154b
Tidy up some match bindings to be more consistent with the rest of the codebase.
2018-12-11 13:22:28 -08:00
Dan Gohman
6dd39dee6a
Update to Cranelift 0.26.0.
2018-12-11 13:21:03 -08:00
Dan Gohman
c8e457e834
Bump version to 0.26.0
2018-12-11 12:54:23 -08:00
Dan Gohman
56850d481d
Initial support for function, table, memory, and global imports.
2018-12-11 12:49:14 -08:00
Dan Gohman
bc18085ad1
Use EntityRef::from_u32 to reduce casting.
2018-12-11 15:40:24 -05:00
Dan Gohman
a55c933f19
Factor out a MemFlags constructor for trusted notrap/aligned accesses.
2018-12-11 15:40:24 -05:00
Dan Gohman
68a13646f9
Add a from_u32 function to EntityRef.
...
This eliminates the need for casting in common cases.
2018-12-11 15:40:24 -05:00
Dan Gohman
b841652539
Add a Slice to supplement PrimaryMap.
2018-12-11 15:40:24 -05:00
Dan Gohman
5b03581442
Tidy up use declaration syntax.
2018-12-11 15:40:24 -05:00
Dan Gohman
95a6a25db3
Update to pretty_env_logger 0.3.0.
2018-12-11 15:40:24 -05:00
Dan Gohman
7b51195f49
Add an offset to cranelift-wasm's GlobalVariable.
2018-12-11 15:40:24 -05:00
Dan Gohman
605f34257b
Fix a missing #[test].
2018-12-11 15:40:24 -05:00
Dan Gohman
30a0890319
Rename GlobalInit::GlobalRef to GlobalInit::GetGlobal.
...
"Ref" is an increasingly overloaded term.
2018-12-11 15:40:24 -05:00
Dan Gohman
566c160c37
Add a function to return the pointer type for a given triple.
...
Also use a slightly tidier naming convention for such functions.
2018-12-11 15:40:24 -05:00
Dan Gohman
38d1d58e06
Change GlobalInit::Import() to GlobalInit::Import.
2018-12-11 15:40:24 -05:00
Dan Gohman
76583192a8
Change ZeroOneOrMore::Zero() to TableElementType::Zero.
2018-12-11 15:40:24 -05:00
Dan Gohman
42e35c4c57
Implement PrimaryMap::with_capacity.
2018-12-11 15:40:24 -05:00
Dan Gohman
6e17bebf44
Publish TableElementType for library users.
2018-12-11 15:40:24 -05:00
Dan Gohman
f0dbba0ec8
Change TableElementType::Func() to TableElementType::Func.
2018-12-11 15:40:24 -05:00
Dan Gohman
c287231720
Implement FromIterator for PrimaryMap.
2018-12-11 15:40:24 -05:00
Dan Gohman
e623da51c6
Suppress dead-code warnings on functions expanded from entity_impl!.
2018-12-11 15:40:24 -05:00
Dan Gohman
91477d21c8
Add an as_u32() member to entity_impl types.
...
This allows us to avoid a lot of casting indices back to u32.
2018-12-11 15:40:24 -05:00
Dan Gohman
954573440d
Remove ModuleEnvironment::get_func_name, which is unused.
2018-12-11 15:40:24 -05:00
Dan Gohman
a20c852148
Support heaps with no offset-guard pages.
...
Also, say "guard-offset pages" rather than just "guard pages" to describe the
region of a heap which is never accessible and which exists to support
optimizations for heap accesses with offsets.
And, introduce a `Uimm64` immediate type, and make all heap fields use
`Uimm64` instead of `Imm64` since they really are unsigned.
2018-12-11 15:40:24 -05:00
Sergey Pepyakin
b32f77ea02
Add the fib test.
2018-12-11 20:15:26 +01:00
Sergey Pepyakin
0cd70c649a
Implement returns.
2018-12-11 20:13:20 +01:00
Sergey Pepyakin
e02dbf1bc2
Add i32 literals support.
2018-12-11 20:12:55 +01:00
Sergey Pepyakin
0e9ba8332f
Pass arguments.
2018-12-11 19:46:41 +01:00
Benjamin Bouvier
93696a80bb
Fixes #614 : Implement a debug trap;
2018-12-10 14:14:04 -05:00
Dan Gohman
93f33141e9
Introduce VMFunctionBody to add extra type safety.
2018-12-08 21:00:42 -05:00
Dan Gohman
10bb311aea
Reorganize unsafe code.
2018-12-08 21:00:42 -05:00