Jef
cbf34a455b
Add factorial tests from spec (after fixing them slightly)
2018-12-19 10:40:31 +01:00
Jef
72855e48c7
Improve behaviour when adding literal to non-literal, materialise local if its value will be changed
...
Currently the implementation of materializing locals causes compilation to be non-linear in degenerate cases
2018-12-18 19:15:29 +01:00
Jef
5418241dc6
Allow blocks to return values in any register
2018-12-18 17:16:38 +01:00
Jef
74ffb8560c
Fix use of locals
2018-12-18 12:12:17 +01:00
Jef
0d1c4f3290
Allow calling functions with any signature
2018-12-17 21:55:03 -08:00
Nicholas Nethercote
46d9a3cd1a
Use an FxHashMap in RegDiversions.
...
Because it's hot and the number of entries can reach the 1000s, so
linear insertion and search is bad.
This reduces runtime for `sqlite` and `UE4Game-HTML5-Shipping` by 3-4%,
and a couple of other benchmarks (`sqlite`, `godot`, `clang`) by smaller
amounts.
It also increases runtime for `mono` and `tanks` by about 1%; this seems
to be due to incidental changes in which functions are inlined more than
algorithmic changes.
2018-12-17 21:36:06 -08:00
Dan Gohman
4d4ecfd812
Bump version to 0.1.0
2018-12-17 13:45:12 -08:00
Jef
53841cdb07
Add loops
2018-12-17 12:50:29 +01:00
Jef
23b5a56a7d
Fix locals not being restored properly (which may cause us to read garbage values from the stack)
2018-12-17 12:16:40 +01:00
Dan Gohman
48f86bde82
Make appveyor.yml more verbose, and other misc fixes.
2018-12-16 15:29:17 -08:00
Dan Gohman
81bbf8f057
Disable the x86-32 build in appveyor, as it isn't supported yet.
2018-12-16 14:28:40 -08:00
Jef
bd2ee53c89
Optimize pop_i32_into, check more fib values
2018-12-15 16:39:38 +01:00
Sergey Pepyakin
5511f92088
Add call alignment requirement.
2018-12-14 12:07:50 -05:00
Sergey Pepyakin
23476e82ff
Fix typo.
2018-12-14 12:07:50 -05:00
Sergey Pepyakin
aab191b460
Comment FuncDef.
2018-12-14 12:07:50 -05:00
Sergey Pepyakin
94e2f0c2a5
Add the fib test.
2018-12-14 12:07:50 -05:00
Sergey Pepyakin
d6b300c87f
Implement returns.
2018-12-14 12:07:50 -05:00
Sergey Pepyakin
38590cbcb9
Add i32 literals support.
2018-12-14 12:07:50 -05:00
Sergey Pepyakin
a3719e08e5
Pass arguments.
2018-12-14 12:07:50 -05:00
Sergey Pepyakin
eb60c2587a
Basic form of a function call
2018-12-14 12:07:50 -05:00
Sergey Pepyakin
635ccc6916
Introduce TranslationContext
2018-12-14 12:07:50 -05:00
Sergey Pepyakin
f22b9903b6
Pass function sig in function_body::translate
2018-12-14 12:07:50 -05:00
Dan Gohman
66120cdede
Prune unnecessary dependencies.
2018-12-14 08:09:01 -08:00
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