Commit Graph

1690 Commits

Author SHA1 Message Date
bjorn3
48701d758d Crash on some less code and fix a bug in discriminant read 2018-08-09 15:08:54 +02:00
bjorn3
e9422fd4d4 Implement Rvalue::Aggregate(AggregateKind::Array, ...) 2018-08-09 11:42:35 +02:00
bjorn3
2fd0d52834 Rustfmt 2018-08-09 11:25:14 +02:00
bjorn3
566803f288 Implement raw ptr -> usize, fn ptr -> usize, usize -> raw ptr casts 2018-08-09 11:23:04 +02:00
bjorn3
9a2b1d4ac3 Implement float -> float and int -> float casts 2018-08-09 11:16:46 +02:00
bjorn3
6c86274943 Implement raw ptr -> usize cast 2018-08-09 11:07:10 +02:00
bjorn3
f4e622cedc Add basic ssa analyzer 2018-08-09 10:46:56 +02:00
bjorn3
5b85e0fec8 Rustfmt 2018-08-08 19:33:37 +02:00
bjorn3
620d65c661 Fix some small bugs 2018-08-08 16:00:14 +02:00
bjorn3
7f2e68e38e Better unimplemented stuff handling 2018-08-08 15:38:03 +02:00
bjorn3
c4705af4e2 Implement intrinsics {ctlz,cttz}{,_nonzero} and ctpop 2018-08-08 14:39:46 +02:00
bjorn3
d4b6bce39c Workaround two bugs 2018-08-08 12:53:09 +02:00
bjorn3
21c52c70b3 Rustfmt 2018-08-08 12:45:34 +02:00
bjorn3
822a181c87 Implement NullOp::SizeOf 2018-08-08 12:44:41 +02:00
bjorn3
1305d1ef23 Implement Rvalue::Repeat 2018-08-08 12:30:25 +02:00
bjorn3
efd203aa0b Implement indexing for arrays 2018-08-08 12:22:16 +02:00
bjorn3
ece497cc84 Some misc changes 2018-08-08 10:39:10 +02:00
bjorn3
40176e03fd Fix some bugs 2018-08-08 10:26:25 +02:00
bjorn3
018612cf22 Implement overflowing_* and *_with_overflowing 2018-08-08 09:49:42 +02:00
bjorn3
376ec8c258 Don't crash on checked binops (treated like unchecked ones atm) 2018-08-08 09:35:35 +02:00
bjorn3
5c601f7316 Rustfmt 2018-08-07 16:43:09 +02:00
bjorn3
e0b1176ae5 Update Cargo.lock and rustup to rustc 1.30.0-nightly (73c78734b 2018-08-05) 2018-08-07 16:34:45 +02:00
bjorn3
f001808249 Run rustfmt 0.9.0-nightly (69ad879 2018-07-27) 2018-07-31 12:25:16 +02:00
bjorn3
82dbd07806 Add support for calling C abi functions 2018-07-30 18:20:37 +02:00
bjorn3
37b61e0ca6 Rustup to rustc 1.29.0-nightly (866a71325 2018-07-29) 2018-07-30 16:57:40 +02:00
bjorn3
4901a66df1 Implement intrinsics assume and (un)likely 2018-07-30 16:02:26 +02:00
bjorn3
dc3ec67046 Implement intrinsics copy and copy_nonoverlapping 2018-07-30 15:58:46 +02:00
bjorn3
75a45965bb Add support for binop rem on floats 2018-07-30 15:34:34 +02:00
bjorn3
9b06ec8f1d Implement intrinsic discriminant_value and fix bug in discriminant reading 2018-07-30 14:36:32 +02:00
bjorn3
812fd6daca Implement some intrinsics 2018-07-29 17:22:40 +02:00
bjorn3
dc4f234115 Implement float binops 2018-07-29 17:09:17 +02:00
bjorn3
ebaa122d34 Fix non-closure rust-call functions and fix a field projection bug 2018-07-29 16:58:32 +02:00
bjorn3
3a0f5dc9ec Fix a bug when the same function is called with different signatures 2018-07-27 19:01:38 +02:00
bjorn3
ab00acfb55 Add binop impls for TyBool 2018-07-26 10:59:57 +02:00
bjorn3
7862e2ea1c Implement some intrinsics 2018-07-26 10:48:50 +02:00
bjorn3
874208bcd5 Add closure support (fixes #2) 2018-07-26 10:14:27 +02:00
bjorn3
ae44a1a172 Add support for metadata loading 2018-07-24 14:10:53 +02:00
bjorn3
eb077f67ac Support metadata writing 2018-07-23 11:17:39 +02:00
bjorn3
e40d025843 Eval const values 2018-07-22 18:30:53 +02:00
bjorn3
4fad0f714f Add some basic intrinsic support (only size_of atm) 2018-07-21 18:38:08 +02:00
bjorn3
0350f2faa9 Don't panic on intrinsics 2018-07-20 14:20:37 +02:00
bjorn3
a3b53eb451 Better comment handling 2018-07-20 13:51:34 +02:00
bjorn3
2b5e55fb17 Refactor fn sig handling in preparation for supporting closures 2018-07-20 13:36:53 +02:00
bjorn3
12e129579d Fix a bug 2018-07-19 19:42:07 +02:00
bjorn3
bf2c35f05d Implement char to uint cast 2018-07-19 19:37:34 +02:00
bjorn3
1138d38d87 Extract abi handling to abi.rs 2018-07-19 19:33:42 +02:00
bjorn3
85eaa2c0c9 Better libcore building instructions and rustup 2018-07-19 18:41:37 +02:00
bjorn3
dabfac3df7 Fix a panic 2018-07-19 17:56:52 +02:00
bjorn3
5f57ac5725 Workaround a bug 2018-07-18 16:29:40 +02:00
bjorn3
5951efb748 Implement int casts 2018-07-18 16:22:29 +02:00
bjorn3
f52727b8e6 Implement some binops for TyRawPtr 2018-07-18 15:17:22 +02:00
bjorn3
fdc625e18a Implement casting between TyRef and TyRawPtr 2018-07-18 14:21:13 +02:00
bjorn3
9e45cc490f Monomorphize type of constant 2018-07-18 13:46:56 +02:00
bjorn3
9a9054ad23 Disable define_function to prevent crashing on things cranelift doesn't yet support 2018-07-18 13:43:17 +02:00
bjorn3
d0ef7f455c Add docs and expand some wildcard patterns 2018-07-18 11:55:52 +02:00
bjorn3
af3234cfd7 [WIP] Add arbitrary constant support 2018-07-16 15:13:37 +02:00
bjorn3
42ea584b8e Better handling of ref types equality in write_cvalue 2018-07-15 20:11:49 +02:00
bjorn3
4694fa4f3d Move const val handling to constant.rs 2018-07-14 16:45:20 +02:00
bjorn3
a95a6729b1 Implement some more stuff and ignore some unimplemented stuff instead of panicking 2018-07-14 16:39:49 +02:00
bjorn3
25fef30186 More debugging output 2018-07-14 12:21:45 +02:00
bjorn3
0c592a6bb1 Add some warnings 2018-07-14 12:07:35 +02:00
bjorn3
92b14263a4 Update to cranelift 0.14 2018-07-14 12:04:15 +02:00
bjorn3
aee8d75057 Bug on TyParam in cton_type_from_ty and print mir before creating function§ 2018-06-30 18:55:01 +02:00
bjorn3
4beb931641 Use DefPathBasedNames 2018-06-30 18:22:20 +02:00
bjorn3
24e2eb25d4 Fix some warnings 2018-06-30 16:38:49 +02:00
bjorn3
bb017326be Move some code around 2018-06-30 16:37:02 +02:00
bjorn3
7ca1f256cc Remove some cretonne bug workarounds and add ir comments 2018-06-30 16:27:11 +02:00
bjorn3
4bff31e36d Add drop shim 2018-06-28 20:27:43 +02:00
bjorn3
d8c5152f30 Nicer verifier errors 2018-06-28 20:13:51 +02:00
bjorn3
e7a6890140 Implement Rvalue::Ref 2018-06-27 16:08:56 +02:00
bjorn3
e42ab29517 Implement some UnOp's 2018-06-27 15:57:52 +02:00
bjorn3
518aa42b49 Implement all binops for integers 2018-06-27 15:47:58 +02:00
bjorn3
5508d44e2b Support bool constants and fix a u8 const error 2018-06-27 15:23:40 +02:00
bjorn3
75430b22e3 Be honnest about {u/i}128 support 2018-06-26 20:30:47 +02:00
bjorn3
aee975e0e2 Fix some bugs 2018-06-26 20:29:32 +02:00
bjorn3
a7e674006c Store TyLayout inside CValue and CPlace 2018-06-26 20:23:51 +02:00
bjorn3
bdad2d427d Implement SetDiscriminant 2018-06-24 14:29:56 +02:00
bjorn3
c53d58f923 Implement some traits for FunctionCx 2018-06-24 14:25:29 +02:00
bjorn3
f62381865f Better monomorphization 2018-06-24 14:01:41 +02:00
bjorn3
0479604be1 Implement some more things 2018-06-23 18:54:15 +02:00
bjorn3
6de95c89d9 Implement enums 2018-06-23 18:26:54 +02:00
bjorn3
c7e7e1fe0f Split common utils out of base.rs 2018-06-22 19:18:53 +02:00
bjorn3
c0dce914e3 Mostly fix it 2018-06-22 19:08:59 +02:00
bjorn3
08d17c9ece Better rvalue handling 2018-06-20 15:29:50 +02:00
bjorn3
4adba2553b Use pass by value fro simple simple types 2018-06-20 15:15:28 +02:00
bjorn3
9d40131d81 Add cretonne_module 2018-06-19 19:51:29 +02:00
bjorn3
9f4f9eb1d7 Implement indirect calls 2018-06-18 18:39:07 +02:00
bjorn3
7680a5cdde Implement direct calls 2018-06-17 19:10:06 +02:00
bjorn3
653c67cb6d Use verifier, perform assignment and field projection, fix branching 2018-06-17 18:46:11 +02:00
bjorn3
4d615dba0e Initial commit 2018-06-17 18:05:11 +02:00